Nullable Methods in FacetEditorContext

Hi,

In FacetEditorContext the methods getModule, getProject and getModuleBuilder are annotated as @Nullable. I wonder why that is the case. Since a facet is always added to a module and a FacetEditorTab is always used to change the settings of a facet in the context of a module, those three methods should never return null, should they?

Cheers,
Robert

2 comments
Avatar
Nikolay Chashnikov
Comment actions Permalink

Hello Robert,

A facet can be added from the new project wizard dialog. In that case the
getProject() and getModule() methods will return 'null' but getModuleBuilder()
will return not-null value. In case of editing an existing facet's settings
the getModule() and getProject() methods will return not-null values but
getModuleBuilder() will return 'null'.

Hi,

In FacetEditorContext the methods getModule, getProject and
getModuleBuilder are annotated as @Nullable. I wonder why that is the
case. Since a facet is always added to a module and a FacetEditorTab
is always used to change the settings of a facet in the context of a
module, those three methods should never return null, should they?

Cheers,
Robert



0
Comment actions Permalink

Thanks, that explains it.

0

Please sign in to leave a comment.