Skip to content

Commit

Permalink
1.10.2-SNAPSHOT | use #matches, not #find
Browse files Browse the repository at this point in the history
  • Loading branch information
inventivetalent committed Jul 1, 2016
1 parent 5d0fa92 commit 0c7fb62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

<groupId>org.inventivetalent</groupId>
<artifactId>reflectionhelper</artifactId>
<version>1.10.1</version>
<version>1.10.2-SNAPSHOT</version>

<build>
<finalName>ReflectionHelper_v${project.version}</finalName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,15 @@ public boolean matches(MethodSignature other) {
// }
// }

if (!Pattern.compile(returnType.replace("?", "\\w").replace("*", "\\w*")).matcher(other.returnType).find()) {
if (!Pattern.compile(returnType.replace("?", "\\w").replace("*", "\\w*")).matcher(other.returnType).matches()) {
return false;
}
if (!Pattern.compile(name.replace("?", "\\w").replace("*", "\\w*")).matcher(other.name).find()) {
if (!Pattern.compile(name.replace("?", "\\w").replace("*", "\\w*")).matcher(other.name).matches()) {
return false;
}
if (parameterTypes.length != other.parameterTypes.length) { return false; }
for (int i = 0; i < parameterTypes.length; i++) {
if (!Pattern.compile(getParameterType(i).replace("?", "\\w").replace("*", "\\w*")).matcher(other.getParameterType(i)).find()) {
if (!Pattern.compile(getParameterType(i).replace("?", "\\w").replace("*", "\\w*")).matcher(other.getParameterType(i)).matches()) {
return false;
}
}
Expand Down

0 comments on commit 0c7fb62

Please sign in to comment.