Author: dgeraskov
Date: 2010-01-21 03:11:08 -0500 (Thu, 21 Jan 2010)
New Revision: 19836
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/Utils.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5718
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/Utils.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/Utils.java 2010-01-21
07:40:47 UTC (rev 19835)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/Utils.java 2010-01-21
08:11:08 UTC (rev 19836)
@@ -192,6 +192,7 @@
public static boolean isImplementInterface(ITypeBinding[] interfaces, String
parentInterface){
for (int i = 0; i < interfaces.length; i++) {
ITypeBinding typeBinding = interfaces[i];
+ if (typeBinding==null) continue;
if (parentInterface.equals(typeBinding.getBinaryName())) return true;
if (isImplementInterface(typeBinding.getInterfaces(), parentInterface)) return true;
}
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java 2010-01-21
07:40:47 UTC (rev 19835)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java 2010-01-21
08:11:08 UTC (rev 19836)
@@ -443,6 +443,7 @@
Array array = null;
Type componentType = type.getComponentType();
ITypeBinding tb = componentType.resolveBinding();
+ if (tb == null) return false;//Unresolved binding. Omit the property.
if (tb.isPrimitive()){
array = new PrimitiveArray(rootClass);
@@ -485,7 +486,7 @@
Assert.isNotNull(type, "Type object cannot be null"); //$NON-NLS-1$
Assert.isNotNull(entityInfo, "EntityInfo object cannot be null");
//$NON-NLS-1$
ITypeBinding tb = type.resolveBinding();
- Assert.isNotNull(tb, "Type binding not resolved."); //$NON-NLS-1$
+ if (tb == null) return false;//Unresolved binding. Omit the property.
rootClass = rootClasses.get(entityInfo.getFullyQualifiedName());
Assert.isNotNull(rootClass, "RootClass not found."); //$NON-NLS-1$
@@ -543,7 +544,7 @@
@Override
public boolean visit(SimpleType type) {
ITypeBinding tb = type.resolveBinding();
- Assert.isNotNull(tb);
+ if (tb == null) return false;//Unresolved binding. Omit the property.
ITypeBinding[] interfaces = Utils.getAllInterfaces(tb);
Value value = buildCollectionValue(interfaces);
if (value != null){