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 999ddd23d79..bd66548a04a 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 @@ -49,8 +49,9 @@ import com.sun.tools.javac.parser.ParserFactory; import com.sun.tools.javac.parser.Tokens.Comment; import com.sun.tools.javac.parser.Tokens.Comment.CommentStyle; -import com.sun.tools.javac.tree.DCTree.DCDocComment; import com.sun.tools.javac.tree.JCTree; +import com.sun.tools.javac.tree.TreeInfo; +import com.sun.tools.javac.tree.DCTree.DCDocComment; import com.sun.tools.javac.tree.JCTree.JCAnnotatedType; import com.sun.tools.javac.tree.JCTree.JCAnnotation; import com.sun.tools.javac.tree.JCTree.JCAnyPattern; @@ -124,7 +125,6 @@ import com.sun.tools.javac.tree.JCTree.JCWildcard; import com.sun.tools.javac.tree.JCTree.JCYield; import com.sun.tools.javac.tree.JCTree.Tag; -import com.sun.tools.javac.tree.TreeInfo; import com.sun.tools.javac.util.Context; import com.sun.tools.javac.util.JCDiagnostic; import com.sun.tools.javac.util.Log; @@ -2877,8 +2877,7 @@ private IfStatement convertIfStatement(JCIf javac) { Type convertToType(JCTree javac) { if (javac instanceof JCIdent ident) { Name name = convertName(ident.name); - int len = FAKE_IDENTIFIER.equals(name.toString()) ? 0 : ident.name.length(); - name.setSourceRange(ident.getStartPosition(), len); + name.setSourceRange(ident.getStartPosition(), ident.name.length()); SimpleType res = this.ast.newSimpleType(name); commonSettings(res, ident); commonSettings(name, ident);