Note for abstract class's method

0 votes
asked Apr 6, 2024 in Closed bug by anonymous
edited Apr 6, 2024
The goal I am trying to achieve is that a note would appear on the left side of the method IsCropFarm(), yet it doesn't appear and gives me a java.lang.NullPointerException error.
I've already tried to create the CropFarm class as abstract class, and it works when I don't want to make a note to the method.

The code that I am using:

abstract CropFarm
{
    +IsCropFarm(): bool {override}
}
note left of CropFarm::IsCropFarm
    return true
end note

Any help is thanked.

EDIT:
It is surely a bug, once I put it into a new file, it works...
Once I set it to the right side it works. Seems funny.
commented Apr 8, 2024 by The-Lu (89,080 points)

Yes, it works...

1 Answer

0 votes
answered Mar 8, 2025 by dickmaley (4,160 points)

It works for me.

image

@startuml
abstract CropFarm
{
    +IsCropFarm(): bool {override}
}
note left of CropFarm::IsCropFarm
    return true
end note
@enduml

...