-
Bug
-
Resolution: Unresolved
-
P4
-
16, 17, 18
Some methods defined in the `com.sun.source.doctree` and `com.sun.source.util` packages accept or return `null`. For example, subtypes of `DocTree` that have components of type `ReferenceTree` may return `null` when accessing such components. Similarly, `DocTreeFactory` may accept `null` when creating trees that have `ReferenceTree` components.
To relieve users of any guess-work or experimenting, this should be explicitly specified.
While at it, it's also a good idea to specify if particular methods in those packages are allowed to return or accept `null` instead of an empty `List<...>`. If there are no such methods, perhaps this "empty lists, not nulls" policy should be specified on a type or even package level.
To relieve users of any guess-work or experimenting, this should be explicitly specified.
While at it, it's also a good idea to specify if particular methods in those packages are allowed to return or accept `null` instead of an empty `List<...>`. If there are no such methods, perhaps this "empty lists, not nulls" policy should be specified on a type or even package level.
- relates to
-
JDK-8266826 Document general design principles of DocTree
-
- Open
-