Skip to content

Commit

Permalink
Align with latest changes in rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
knutwannheden committed Dec 18, 2023
1 parent 1a65c15 commit aabf288
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ public J.VariableDeclarations visitVariableDeclarations(J.VariableDeclarations m
}

private static boolean anyAnnotationApplied(J.VariableDeclarations mv) {
return !mv.getAllAnnotations().isEmpty();
return !mv.getLeadingAnnotations().isEmpty()
|| mv.getTypeExpression() instanceof J.AnnotatedType;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static Expression className(JavaType type, boolean qualified) {
Scanner scanner = new Scanner(qualifiedName.replace('$', '.')).useDelimiter("\\.");
for (int i = 0; scanner.hasNext(); i++) {
String part = scanner.next();
JavaType typeOfContaining = scanner.hasNext() ? null : type;
JavaType typeOfContaining = scanner.hasNext() ? JavaType.Unknown.getInstance() : type;
if (i > 0) {
name = new J.FieldAccess(
randomId(),
Expand Down

0 comments on commit aabf288

Please sign in to comment.