diff --git a/bin/tests/scenarios/method_parameters_differ_on_final_keyword/base.java b/bin/tests/scenarios/method_parameters_differ_on_final_keyword/base.java new file mode 100644 index 0000000..023f369 --- /dev/null +++ b/bin/tests/scenarios/method_parameters_differ_on_final_keyword/base.java @@ -0,0 +1,3 @@ +public abstract class Artifact { + public abstract T addChild(final T child) throws IOException; +} diff --git a/bin/tests/scenarios/method_parameters_differ_on_final_keyword/left.java b/bin/tests/scenarios/method_parameters_differ_on_final_keyword/left.java new file mode 100644 index 0000000..8311bf5 --- /dev/null +++ b/bin/tests/scenarios/method_parameters_differ_on_final_keyword/left.java @@ -0,0 +1,3 @@ +public abstract class Artifact { + public abstract T addChild(final T child); +} diff --git a/bin/tests/scenarios/method_parameters_differ_on_final_keyword/merge.java b/bin/tests/scenarios/method_parameters_differ_on_final_keyword/merge.java new file mode 100644 index 0000000..184ad0b --- /dev/null +++ b/bin/tests/scenarios/method_parameters_differ_on_final_keyword/merge.java @@ -0,0 +1 @@ +public abstract class Artifact { public abstract T addChild ( T child ) ; } \ No newline at end of file diff --git a/bin/tests/scenarios/method_parameters_differ_on_final_keyword/right.java b/bin/tests/scenarios/method_parameters_differ_on_final_keyword/right.java new file mode 100644 index 0000000..0574a7a --- /dev/null +++ b/bin/tests/scenarios/method_parameters_differ_on_final_keyword/right.java @@ -0,0 +1,3 @@ +public abstract class Artifact { + public abstract T addChild(T child); +} \ No newline at end of file diff --git a/matching_handlers/src/java/method_declaration.rs b/matching_handlers/src/java/method_declaration.rs index 350804b..a2262d7 100644 --- a/matching_handlers/src/java/method_declaration.rs +++ b/matching_handlers/src/java/method_declaration.rs @@ -54,7 +54,7 @@ fn extract_argument_types_from_formal_parameters(node: &CSTNode) -> Vec non_terminal .children .iter() - .filter(|node| node.kind() != "identifier") + .filter(|node| node.kind() != "modifiers" && node.kind() != "identifier") .fold(String::new(), |acc, cur| { format!("{} {}", acc, cur.contents()) }),