NPE suggestion

Here's a novel thought..

It seems we're all getting burned by NPEs. This presents a great
opportunity for JB.

1. Create an Inspect Code test that specifically checks for possible NPEs.

2. Use it to catch them prior to releasing a build.


NPEs are killing the most recent EAP builds for JB. It will probably be
just as destructive for us in our normal jobs. This new test helps us both.
Build it into the product.

Thoughts?


0

I'm working on a plugin that adds such an inspection, when you decorate variables
and methods with @NonNull annotations.

-Keith

Here's a novel thought..

It seems we're all getting burned by NPEs. This presents a great
opportunity for JB.

1. Create an Inspect Code test that specifically checks for possible
NPEs.

2. Use it to catch them prior to releasing a build.

NPEs are killing the most recent EAP builds for JB. It will probably
be just as destructive for us in our normal jobs. This new test helps
us both. Build it into the product.

Thoughts?



0

NPE can occur almost anywhere. I think there might only be a few cases that would absolutely require "NOT NULL" conditions.

I am not sure how useful such inspection would really be. Anyways I would definitely try out Keith Lea's Plugin and see it for myself. May be others might be able to throw more light on this.

0

Better enhance Java for references, which cannot be null, so the compiler
can avoid NPEs from the ground-up.

Tom

0

请先登录再写评论。