Have you tried the support for null/notnull checks that are supported in
the Eclipse Java compiler? http://wiki.eclipse.org/JDT_Core/Null_Analysis -
this compiler can be used outside of eclipse. I don't know if it precisely
checks the kind of thing you are describing though.
As already discussed h
On 06.01.2014 15:59, Alexander Kriegisch wrote:
A) Returning null is not necessarily a programming error. Not handling null
results gracefully might be though.
I'm aware of that, that's why we allow the @Nullable annotation for such
cases.
B) How should it be possible to statically determi
A) Returning null is not necessarily a programming error. Not handling null
results gracefully might be though.
B) How should it be possible to statically determine a non-trivial (dynamically
created) return value during compile time? If you want to catch typical,
statically determinable bugs u
On 06.01.2014 15:26, Alexander Kriegisch wrote:
You can neither match "return null" nor assignments to local variables, only
assignments to member variables.
What you can do is match returning calls or executions and check their results
dynamically like this:
after() returning(Object res
You can neither match "return null" nor assignments to local variables, only
assignments to member variables.
What you can do is match returning calls or executions and check their results
dynamically like this:
after() returning(Object result) : execution(!void *(..)) {
if (result
Hi,
is there any way for me to match "return null" statements statically?
I would like to create a policy enforcement aspect that forbids null
returns unless the method is marked as @Nullable.
I'm aware this check wouldn't be perfect because it could always be tricked
with a variable:
String res