diff options
author | Stephan Herrmann | 2015-11-10 19:35:30 +0000 |
---|---|---|
committer | Stephan Herrmann | 2015-11-10 19:35:30 +0000 |
commit | 15b69006b6b89186ed4c8aa4fc4b4014ad0e1faf (patch) | |
tree | b04514b4e8884f8a7df755473f85330bc6faedc0 | |
parent | 6d8387c1f033a3b22edafa1349a4254d02ea9f91 (diff) | |
download | org.eclipse.objectteams-15b69006b6b89186ed4c8aa4fc4b4014ad0e1faf.tar.gz org.eclipse.objectteams-15b69006b6b89186ed4c8aa4fc4b4014ad0e1faf.tar.xz org.eclipse.objectteams-15b69006b6b89186ed4c8aa4fc4b4014ad0e1faf.zip |
Harness for an NPE seen in RL
-rw-r--r-- | plugins/org.eclipse.objectteams.otdt/src/org/eclipse/objectteams/otdt/core/hierarchy/OTTypeHierarchies.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/org.eclipse.objectteams.otdt/src/org/eclipse/objectteams/otdt/core/hierarchy/OTTypeHierarchies.java b/plugins/org.eclipse.objectteams.otdt/src/org/eclipse/objectteams/otdt/core/hierarchy/OTTypeHierarchies.java index a175128ff..ecab0e052 100644 --- a/plugins/org.eclipse.objectteams.otdt/src/org/eclipse/objectteams/otdt/core/hierarchy/OTTypeHierarchies.java +++ b/plugins/org.eclipse.objectteams.otdt/src/org/eclipse/objectteams/otdt/core/hierarchy/OTTypeHierarchies.java @@ -588,7 +588,13 @@ public team class OTTypeHierarchies { } callin void ensureJavaType(IType type) { - if (type instanceof IOTType) type = (IType) ((IOTType)type).getCorrespondingJavaElement(); + if (type instanceof IOTType) { + IJavaElement jElem = ((IOTType)type).getCorrespondingJavaElement(); + if (jElem instanceof IType) + type = (IType) jElem; + else + OTDTPlugin.getDefault().getLog().log(new Status(IStatus.WARNING, OTDTPlugin.PLUGIN_ID, "OTType has not corresponding JavaElement: "+type)); + } base.ensureJavaType(type); } |