Welcome to PlantUML Q&A, where you can ask questions and receive answers from other members of the community.

You can also submit new features request and vote for them.

SyntaxChecker produces IndexOutOfBoundsException

0 votes
 
present in version 8020:
 
public static void main(String[] args) {
    SyntaxChecker.checkSyntax("@startuml\n" +
            "Alice -> Bob: Request\n" +
            "Alice <-- Bob: Reply\n" +
            "* @enduml");
}
 
 
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at java.util.Collections$UnmodifiableList.get(Collections.java:1152)
at java.util.Collections$UnmodifiableList.get(Collections.java:1152)
at net.sourceforge.plantuml.syntax.SyntaxChecker.checkSyntax(Unknown Source)
 
 
 
closed with the note: fixed
asked Mar 11, 2015 in bug by Meo (910 points)
closed Mar 19, 2015 by Meo

1 Answer

0 votes
 
Best answer
Hi,

Thanks for the feedback : we will correct this in next beta and release.

Even if there is a bug in PlantUML, note that you have an extra "* " near the @enduml, and this causes PlantUML to crash.

Thanks again,
answered Mar 11, 2015 by plantuml (117,910 points)
selected Mar 19, 2015 by Meo
v8021 works fine, but #checkSyntaxFair has the same problem

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.RangeCheck(ArrayList.java:547)
    at java.util.ArrayList.get(ArrayList.java:322)
    at java.util.Collections$UnmodifiableList.get(Collections.java:1152)
    at java.util.Collections$UnmodifiableList.get(Collections.java:1152)
    at net.sourceforge.plantuml.syntax.SyntaxChecker.checkSyntaxFair(SyntaxChecker.java:112)
Hello,

Thanks for the feedback, it should be solved in last beta: https://dl.dropboxusercontent.com/u/13064071/plantuml.jar
works fine. thanks.
Support This Project Offer 250 Mo! Follow PlantUML on Twitter
...