Skip to content

Commit

Permalink
Undo commit 839aa80
Browse files Browse the repository at this point in the history
  • Loading branch information
tsantalis committed Dec 18, 2024
1 parent a0f1525 commit 2dd85df
Showing 1 changed file with 1 addition and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -358,13 +358,7 @@ else if((parentFieldDeclarationMap != null && parentFieldDeclarationMap.contains
}
}
else {
String numberType = handleNumber(arg);
if(numberType != null) {
inferredArgumentTypes.add(UMLType.extractTypeObject(numberType));
}
else {
inferredArgumentTypes.add(null);
}
inferredArgumentTypes.add(null);
}
}
int i=0;
Expand Down Expand Up @@ -448,39 +442,6 @@ private static boolean exactlyMatchingArgumentType(UMLType parameterType, UMLTyp
return parameterType.getClassType().equals(argumentType.toString()) || parameterType.toString().equals(argumentType.toString());
}

private static String handleNumber(String argument) {
try {
Integer.parseInt(argument);
return "int";
} catch (NumberFormatException e) {}
try {
Long.parseLong(argument);
return "long";
} catch (NumberFormatException e) {}
try {
Float.parseFloat(argument);
return "float";
} catch (NumberFormatException e) {}
try {
Double.parseDouble(argument);
return "double";
} catch (NumberFormatException e) {}
/*if(argument.contains(".")) {
String beforeDot = argument.substring(0, argument.lastIndexOf("."));
String afterDot = argument.substring(argument.lastIndexOf(".") + 1, argument.length());
int counter = 0;
for(int i=0; i<afterDot.length(); i++) {
if(Character.isUpperCase(afterDot.charAt(i)) || afterDot.charAt(i) == '_') {
counter++;
}
}
if(counter == afterDot.length()) {
return beforeDot;
}
}*/
return null;
}

public static boolean compatibleTypes(UMLParameter parameter, UMLType type, UMLAbstractClassDiff classDiff, UMLModelDiff modelDiff) {
String type1 = parameter.getType().toString();
String type2 = type.toString();
Expand Down

0 comments on commit 2dd85df

Please sign in to comment.