Class diagram: Crash when specifying visibility on a method/attribute and attaching a note to it

0 votes
asked Aug 27, 2015 in bug by anonymous
This diagram renders well:

@startuml
class A {
attribute
}
note right of A::attribute
  This member is annotated
end note
@enduml

 

But this other diagram crashes:

@startuml
class A {
+attribute
}
note right of A::attribute
  This member is annotated
end note
@enduml

 

The only difference is the public modifier on the attribute.

This is the backtrace:

java.lang.UnsupportedOperationException: class net.sourceforge.plantuml.skin.VisibilityModifier$2
    at net.sourceforge.plantuml.graphic.AbstractTextBlock.getInnerPosition(AbstractTextBlock.java:41)
    at net.sourceforge.plantuml.ugraphic.ULayoutGroup.getInnerPosition(ULayoutGroup.java:67)
    at net.sourceforge.plantuml.cucadiagram.MethodsOrFieldsArea.getInnerPosition(MethodsOrFieldsArea.java:212)
    at net.sourceforge.plantuml.graphic.TextBlockMarged.getInnerPosition(TextBlockMarged.java:71)
    at net.sourceforge.plantuml.graphic.TextBlockLineBefore.getInnerPosition(TextBlockLineBefore.java:87)
    at net.sourceforge.plantuml.graphic.TextBlockVertical2.getInnerPosition(TextBlockVertical2.java:94)
    at net.sourceforge.plantuml.svek.image.EntityImageClass.getInnerPosition(EntityImageClass.java:104)
    at net.sourceforge.plantuml.svek.image.EntityImageTips.drawU(EntityImageTips.java:133)
    at net.sourceforge.plantuml.svek.SvekResult.drawU(SvekResult.java:79)
    at net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageTOBEMOVED(ImageBuilder.java:131)
    at net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageTOBEMOVED(ImageBuilder.java:125)
    at net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFileInternal(CucaDiagramFileMakerSvek.java:136)
    at net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFile(CucaDiagramFileMakerSvek.java:87)
    at net.sourceforge.plantuml.cucadiagram.CucaDiagram.exportDiagramInternal(CucaDiagram.java:314)
    at net.sourceforge.plantuml.classdiagram.ClassDiagram.exportDiagramInternal(ClassDiagram.java:205)
    at net.sourceforge.plantuml.UmlDiagram.exportDiagram(UmlDiagram.java:249)
    at net.sourceforge.plantuml.PSystemUtils.exportDiagramsCuca(PSystemUtils.java:206)
    at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:69)
    at net.sourceforge.plantuml.SourceFileReader.getGeneratedImages(SourceFileReader.java:209)
    at net.sourceforge.plantuml.Run.manageFileInternal(Run.java:394)
    at net.sourceforge.plantuml.Run.processArgs(Run.java:316)
    at net.sourceforge.plantuml.Run.manageAllFiles(Run.java:291)
    at net.sourceforge.plantuml.Run.main(Run.java:135)

OS: Debian Jessie

Java version: 1.7.0_79

PlantUML version: 8029

graphviz version: 2.38.0

1 Answer

0 votes
answered Aug 29, 2015 by plantuml (131,770 points)
Many thanks for the report.

This has been fixed in last beta  https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

Regards,
commented Aug 29, 2015 by anonymous
Thank you! It works perfectly with this version :)
...