Non-qualified inner class types are no longer trimmed by UMLType.toString()
This is an enhancement to display correctly type Map.Entry in commit
@@ -101,12 +101,18 @@ public class UMLType implements Serializable {
}
private String simpleNameOf(String name) {
- int dotPosition = name.lastIndexOf('.');
- if (dotPosition < 0) {
- return name;
+ int numberOfDots = 0;
+ for (int i = 0; i < name.length(); i++) {
+ if (name.charAt(i) == '.') {
+ numberOfDots++;
+ }
}
+ if(numberOfDots > 1) {
+ int dotPosition = name.lastIndexOf('.');
return name.substring(dotPosition + 1);
}
+ return name;
+ }
public static UMLType extractTypeObject(String qualifiedName) {
int arrayDimension = 0;
