diff --git a/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java b/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java index a2de6791fb6..df615706f85 100644 --- a/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java +++ b/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java @@ -1967,8 +1967,13 @@ private Annotation convert(JCAnnotation javac) { commonSettings(result, javac); result.setTypeName(toName(javac.annotationType)); JCTree value = javac.getArguments().get(0); - if (value != null) - result.setValue(toName(value)); + if (value != null) { + if( value instanceof JCExpression jce) { + result.setValue(convertExpression(jce)); + } else { + result.setValue(toName(value)); + } + } return result;