Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
None
-
Operating System: Windows
Platform: PC
-
70
Description
When calling getBaseType() on a built in type, it should return null.
Currently it seems to be returning itself.
This would allow code like that below to work.
public static TypeDefinition getRootType(final TypeDefinition typeDef) {
assert typeDef != null;
TypeDefinition t = typeDef;
while (t.getBaseType() != null)
{ t = t.getBaseType(); }return t;
}
currently I need to do :
public static TypeDefinition getRootType(final TypeDefinition typeDef) {
assert typeDef != null;
TypeDefinition t = typeDef;
while ((t.getBaseType() != null) && (!t.getQName().getLocalName().equals(t.getBaseType().getQName().getLocalName()))) { t = t.getBaseType(); }
return t;
}