You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm writing a NetBeans Plugin which adds external code formatters to the IDE (you can find it in externalcodeformatter_for_netbeans in my GitHub repositories). It supports the Eclipse Java Code Formatter (JDT) and the Spring Java Code Formatter amongst others. Since I changed my Eclipse dependencies to the newest versions (3.22.0) of Eclipse JDT, I get this exception when I try to format with the Spring code formatter
java.lang.IndexOutOfBoundsException: Index 13 out of bounds for length 13
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
at java.base/java.util.Objects.checkIndex(Objects.java:373)
at java.base/java.util.ArrayList.get(ArrayList.java:425)
at io.spring.javaformat.formatter.eclipse.TokenManager.get(TokenManager.java:75)
at io.spring.javaformat.formatter.eclipse.TokenManager.findIndex(TokenManager.java:168)
at io.spring.javaformat.formatter.eclipse.SpacePreparator.handleToken(SpacePreparator.java:1098)
at io.spring.javaformat.formatter.eclipse.SpacePreparator.visit(SpacePreparator.java:197)
at org.eclipse.jdt.core.dom.EnumDeclaration.accept0(EnumDeclaration.java:253)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2971)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:3042)
at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:258)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2971)
at io.spring.javaformat.formatter.eclipse.DefaultCodeFormatter.prepareSpaces(DefaultCodeFormatter.java:412)
at io.spring.javaformat.formatter.eclipse.DefaultCodeFormatter.prepareFormattedCode(DefaultCodeFormatter.java:229)
at io.spring.javaformat.formatter.eclipse.DefaultCodeFormatter.format(DefaultCodeFormatter.java:186)
at io.spring.javaformat.formatter.Formatter.lambda$format$1(Formatter.java:129)
at io.spring.javaformat.formatter.Formatter.nlsSafe(Formatter.java:149)
at io.spring.javaformat.formatter.Formatter.format(Formatter.java:129)
at io.spring.javaformat.formatter.Formatter.format(Formatter.java:124)
Maybe you could have a look into this?
Best regards,
Fabian
The text was updated successfully, but these errors were encountered:
funfried
added a commit
to funfried/externalcodeformatter_for_netbeans
that referenced
this issue
Jun 29, 2020
…ich switches to new line sometimes when it shouldn't and 3.22.0 seems to be incompatible with the current version of the Spring Java Code Formatter (0.0.22), see spring-io/spring-javaformat#204
Hi,
I'm writing a NetBeans Plugin which adds external code formatters to the IDE (you can find it in externalcodeformatter_for_netbeans in my GitHub repositories). It supports the Eclipse Java Code Formatter (JDT) and the Spring Java Code Formatter amongst others. Since I changed my Eclipse dependencies to the newest versions (3.22.0) of Eclipse JDT, I get this exception when I try to format with the Spring code formatter
Maybe you could have a look into this?
Best regards,
Fabian
The text was updated successfully, but these errors were encountered: