Notes on fields when some fields have visibility modifiers causes an exception

0 votes
asked Feb 15, 2019 in Bug by Remco

While it is not in the official documentation, I found on the forum that it is possible to add notes to individual attributes. This is great and I use it a lot. I did find a problem with it. 

In particular, this:


note right of TestAttrributeNote::attribute1
This is a note that breaks.
end note

class String{

class TestAttrributeNote {
 String attribute1
# attribute2 : String


If either both attributes are given a visibility modifier, or neither, it does work.

I traced the problem down to:

private TextBlock getUBlock(final VisibilityModifier modifier, Url url) {

changing the definition of:

return new AbstractTextBlock() {

  public void drawU(UGraphic ug) {}


  public Rectangle2D getInnerPosition(String member, StringBounder stringBounder,    InnerStrategy strategy) {

    return null;


   public Dimension2D calculateDimension(StringBounder stringBounder) {

   return new Dimension2DDouble(1, 1);



(Bold code added). The problem goes away. 
It only works with the long style notes though, and top or bottom don't work either. 

1 Answer

0 votes
answered Feb 22, 2019 by plantuml (257,860 points)
Thanks for the feeback.

This is fixed in last beta

Tell us if it's not working for you.