Skip to content

Commit

Permalink
Fix MerthodMatcher syntax for NEW_ARRAY_LIST_MATCHER (#67)
Browse files Browse the repository at this point in the history
The MerthodMatcher syntax used in the NoCollectionMutation example for NEW_ARRAY_LIST_MATCHER is incorrect and prints an error while running unit tests. I suspect `<init>` was an earlier syntax for `<constructor>`.
  • Loading branch information
tobli authored Dec 4, 2024
1 parent bce6fb6 commit cdd4861
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/yourorg/NoCollectionMutation.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private static boolean isListMutationSelect(Cursor cursor) {
SORT_MATCHER.matches(mt);
}

private static final MethodMatcher NEW_ARRAY_LIST_MATCHER = new MethodMatcher("java.util.ArrayList <init>(java.util.Collection)");
private static final MethodMatcher NEW_ARRAY_LIST_MATCHER = new MethodMatcher("java.util.ArrayList <constructor>(java.util.Collection)");

/**
* @param cursor a stack of LST elements with parent/child relationships connecting an individual LST element to the root of the tree
Expand Down

0 comments on commit cdd4861

Please sign in to comment.