jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig <mdue...@apache.org>
Subject Re: nullability annotations - https://issues.apache.org/jira/browse/OAK-37
Date Wed, 23 May 2012 16:43:00 GMT

Hi,

IntelliJ gives me the warning

"Not annotated method overrides method annotated with @NotNull"

whenever a method is not annotated with @NotNull and the method it 
overrides is annotated with @NotNull.

Should we add annotations in all those places? Or should we ignore the 
warning?

Michael

On 18.5.12 11:16, Julian Reschke wrote:
> Hi there,
>
> - oak-core and oak-jcr now include the necessary findbugs dependency
> (jsr305)
>
> - I have started annotating methods on JCR interface impls (SessionImpl
> & friends), plus a few internal classes (*Delegate)
>
> I believe this is useful, it already revealed a number of potential
> problems (see below).
>
> Adding the annotation *is* a bit verbose, but we can probably reduce the
> noise by adding class-wide (or even package-wide) defaults.
>
> Feedback appreciated,
>
> Julian
>
>
> -- snip --
>
>
> Description Resource Path Location Type
> Possible null pointer dereference in
> org.apache.jackrabbit.oak.jcr.PropertyDelegate.getPath() due to return
> value of called method PropertyDelegate.java
> /oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr line 67 FindBugs
> Problem (Troubling)
> Possible null pointer dereference in
> org.apache.jackrabbit.oak.jcr.PropertyImpl.getParent() due to return
> value of called method PropertyImpl.java
> /oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr line 75 FindBugs
> Problem (Troubling)
> Possible null pointer dereference in
> org.apache.jackrabbit.oak.jcr.query.QueryResultImpl$2.fetch() due to
> return value of called method QueryResultImpl.java
> /oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query line 140
> FindBugs Problem (Troubling)
> Possible null pointer dereference in
> org.apache.jackrabbit.oak.jcr.query.RowImpl.getNodeForPath(String) due
> to return value of called method RowImpl.java
> /oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query line 60
> FindBugs Problem (Troubling)
> Possible null pointer dereference in
> org.apache.jackrabbit.oak.jcr.security.user.UserManagerImpl.removeInternalProperty(Node,
> String) due to return value of called method UserManagerImpl.java
> /oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user line
> 352 FindBugs Problem (Troubling)
> Possible null pointer dereference in
> org.apache.jackrabbit.oak.jcr.security.user.UserManagerImpl.setInternalProperty(Node,
> String, String, int) due to return value of called method
> UserManagerImpl.java
> /oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user line
> 338 FindBugs Problem (Troubling)
> Possible null pointer dereference in
> org.apache.jackrabbit.oak.jcr.security.user.UserManagerImpl.setInternalProperty(Node,
> String, String[], int) due to return value of called method
> UserManagerImpl.java
> /oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user line
> 343 FindBugs Problem (Troubling)
> Possible null pointer dereference in
> org.apache.jackrabbit.oak.jcr.security.user.UserManagerImpl.setInternalProperty(Node,
> String, Value[]) due to return value of called method
> UserManagerImpl.java
> /oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user line
> 348 FindBugs Problem (Troubling)

Mime
View raw message