Skip to content

Commit

Permalink
fix #12 ImplicitWebAnnotationNames ClassCastException:. J.Ident canno…
Browse files Browse the repository at this point in the history
…t be cast to J.Literal
  • Loading branch information
sambsnyd committed Oct 30, 2020
1 parent b083cce commit 3510221
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ private Optional<J.Literal> nameArgumentValue(J.Annotation annotation) {
.filter(assign -> assign.getVariable().whenType(J.Ident.class)
.map(key -> key.getSimpleName().equals("value") || key.getSimpleName().equals("name"))
.orElse(false))
.filter(assign -> assign.getAssignment() instanceof J.Literal)
.map(assign -> (J.Literal) assign.getAssignment())
.isPresent() || arg.whenType(J.Literal.class).isPresent())
.findAny()
Expand Down

0 comments on commit 3510221

Please sign in to comment.