Skip to content

Commit

Permalink
Fix type assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
Quinn-With-Two-Ns committed Nov 22, 2024
1 parent 1946c22 commit df1d518
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,17 +210,15 @@ private static POJOWorkflowInterfaceMetadata newInstanceInternal(
+ methodMetadata.getWorkflowMethod().getName()
+ "\"");
}
if (Arrays.equals(
update.getWorkflowMethod().getGenericParameterTypes(),
methodMetadata.getWorkflowMethod().getGenericParameterTypes())
|| update.getWorkflowMethod().getGenericReturnType()
== methodMetadata.getWorkflowMethod().getGenericReturnType()) {
if (!Arrays.equals(
update.getWorkflowMethod().getGenericParameterTypes(),
methodMetadata.getWorkflowMethod().getGenericParameterTypes())) {
throw new IllegalArgumentException(
"Update method \""
+ update.getWorkflowMethod().getName()
+ "\" and validator method \""
+ "\" and Validator method \""
+ methodMetadata.getWorkflowMethod().getName()
+ "\" have the same signature");
+ "\" do not have the same parameters");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ private Class<?> generateWorkflowInterfaceWithQueryMethod(
public void workflowInterfaceWithUpdateValidator() {
POJOWorkflowInterfaceMetadata metadata =
POJOWorkflowInterfaceMetadata.newInstance(GUpdate.class);
System.out.println(metadata);
}

@Test
Expand Down

0 comments on commit df1d518

Please sign in to comment.