Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Null annotations: alter severity of IDE warnings #4402

Merged
merged 2 commits into from
Oct 13, 2017

Conversation

htreu
Copy link
Contributor

@htreu htreu commented Oct 11, 2017

This addresses the proposal mentioned here #4321 (comment) to reduce the severity of some null annotation warnings. Also the "Null Reference" check was raised to Error.

Also: Make null reference check happy in AbstractManagedProvider.

Signed-off-by: Henning Treu henning.treu@telekom.de

Also: Make null reference check happy.

Signed-off-by: Henning Treu <henning.treu@telekom.de>
Copy link
Contributor

@maggu2810 maggu2810 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, if reducing the level in the IDE will let us move a step further in API annotation... let's go.

notifyListenersAboutUpdatedElement(oldElement, element);
logger.debug("Updated element {} in {}.", key, this.getClass().getSimpleName());
return oldElement;
if (persistableElement != null) { // redundant but makes null reference check happy.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not redundant.
The storage member could be changed between storage.get(key) and storage.put(key, ....

Or am I wrong? I don't see any synchronized statements that ensure storage isn't changed.
So, I agree with the change but IMHO the comment should be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right. The comment actually refers only to storage.get(key) but parallel modification does indeed require this call. I will remove the comment.

@maggu2810 maggu2810 merged commit b4be492 into eclipse-archived:master Oct 13, 2017
@kaikreuzer kaikreuzer added this to the 0.9.0 milestone Nov 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants