Community
Participate
Working Groups
Simple case: 3 classes: Base with Nonnull constructor, Complex extends Base and IdHolder that contains Nonnull static String. package org.jresearch; import javax.annotation.Nonnull; public class IdHolder { @Nonnull public static final String ID = "id"; //$NON-NLS-1$ } package org.jresearch; import javax.annotation.Nonnull; public class Base { @Nonnull private final String id; public Base(@Nonnull final String id) { this.id = id; } @Nonnull public String getId() { return id; } } package org.jresearch; public class Complex extends Base { // @SuppressWarnings("all") // @SuppressWarnings("null") public Complex() { super(IdHolder.ID); } } In class Complex on the line super(IdHolder.ID); I have warning "Null type safety: The expression of type 'String' needs unchecked conversion to conform to '@Nonnull String'" If I uncomment line with @SuppressWarnings("null") the warning disappeared, but I have the new one "Unnecessary @SuppressWarnings("null")" And even @SuppressWarnings("all") complete removes all warnings
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. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. 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.
I can reproduce in 4.2.x but this works since 4.3M5, likely due to fix for bug 331649 (2013). I specifically tested the mentioned version 4.5.1 (OK). *** This bug has been marked as a duplicate of bug 331649 ***