apache / pekko

Build highly concurrent, distributed, and resilient message-driven applications using Java/Scala
https://pekko.apache.org/
Apache License 2.0
1.13k stars 137 forks source link

Mark some internal sealed trait @DoNotInherit #1270

Open He-Pin opened 3 months ago

He-Pin commented 3 months ago

There are classes is not marked with @DoNotInherent, then Java user may extends that classes. We should mark it with @DoNotInherent.

And there are some classes should be annotated with @InternalApi.

refs: https://github.com/apache/pekko-connectors/pull/588

mdedetrich commented 3 months ago

Is @DoNotInherent necessary if the class is final, that is already implied?

Typically @ DoNotInherent is used for classes which can be extended but only for private cases

He-Pin commented 3 months ago

no, I mean we should mark on sealed trait and sealed abstract class

mdedetrich commented 3 months ago

no, I mean we should mark on sealed trait and sealed abstract class

That makes perfect sense, :+1 from me