Community
Participate
Working Groups
Created attachment 288282 [details] Repro project The attached project uses custom annotations from JSR-305 for Null analysis (Nullable: javax.annotation.Nullable, NonNull: javax.annotation.Nonnull, NonNullByDefault: ea.definitions.GoodByeNull). E.g. annotated subclass of ColumnLabelProvider @GoodByeNull public class MyColumnLabelProvider extends ColumnLabelProvider { @Override protected void initialize(ColumnViewer viewer, @Nullable ViewerColumn column) { ... } @Override public @Nullable String getText(Object element) { ... return null; } } leads to following errors/warnings: MyColumnLabelProvider ===================== * Illegal redefinition of parameter viewer, inherited method from CellLabelProvider does not constrain this parameter * Illegal redefinition of parameter element, inherited method from ColumnLabelProvider does not constrain this parameter GoodByeNull =========== * The nullness annotation 'Nonnull' is not applicable at this location It seems the external annotations aren't applied to ColumnLabelProvider and CellLabelProvider resp. When annotations from org.eclipse.jdt.annotation package are used then errors disappear.
A long time ago I had similar problems and I recall Stephen mentioning problems when using annotations that are NOT TYPE_USE like JSR 305. That is the default annotations (not the extra ones) need to be TYPE_USE. Try using TYPE_USE ones like checker, jspecify, eclipse's or intellij's newer annotations.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.