Skip to content

Commit

Permalink
Support assrtThrows detection in commit
Browse files Browse the repository at this point in the history
zalando/problem@1b987b8
problem/src/test/java/org/zalando/problem/GenericProblemsTest.java
  • Loading branch information
tsantalis committed Jan 17, 2025
1 parent ff76382 commit 9b2cc97
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/java/gr/uom/java/xmi/decomposition/AbstractCall.java
Original file line number Diff line number Diff line change
Expand Up @@ -1270,12 +1270,24 @@ private static boolean equalsIgnoringExtraParenthesis(String s1, String s2) {
if(s2.endsWith(methodReferenceName + "()")) {
return true;
}
if(methodReferenceName.equals("new")) {
String type = s1.substring(0, s1.indexOf(JAVA.METHOD_REFERENCE));
if(s2.startsWith("new " + type)) {
return true;
}
}
}
if(s2.contains(JAVA.METHOD_REFERENCE) && !s1.contains(JAVA.METHOD_REFERENCE)) {
String methodReferenceName = s2.substring(s2.indexOf(JAVA.METHOD_REFERENCE) + 2, s2.length());
if(s1.endsWith(methodReferenceName + "()")) {
return true;
}
if(methodReferenceName.equals("new")) {
String type = s2.substring(0, s2.indexOf(JAVA.METHOD_REFERENCE));
if(s1.startsWith("new " + type)) {
return true;
}
}
}
String reservedTokens1 = ReplacementUtil.keepReservedTokens(s1);
String reservedTokens2 = ReplacementUtil.keepReservedTokens(s2);
Expand Down

0 comments on commit 9b2cc97

Please sign in to comment.