Turning off nullity assertions in javac2

Is it possible to disable the automatic insertion of nullity assertions via the javac2 Ant task? We use javac2 for ui form compilation, but do our own checking for null arguments explicitly in our code. Using javac2 thus pollutes our code coverage numbers, since our null checks never get a chance to fail.

Not a big deal, but there should be such an option, if there isn't currently.

--Dave Griffith

3 comments
Comment actions Permalink

Well, the source code of javac2 is distributed in the redist folder. And there you'll find that the not-null instrumentation can't be turned off. But as this source code is distributed under the Apache license, it should be legal to adapt it to your needs.

0
Comment actions Permalink

Just for the novelty of actually coding up a fix when some smart-aleck says "It's open-source, you can just code up your own fix!", I have done as you suggest. I've now got a version of the javac2 Ant task that allows you to turn off the nullity assertions. If anyone (including JetBrains) wants it, drop me a line.

--Dave Griffith

0
Comment actions Permalink

Hello Dave,

Just for the novelty of actually coding up a fix when some smart-aleck
says "It's open-source, you can just code up your own fix!", I have
done as you suggest. I've now got a version of the javac2 Ant task
that allows you to turn off the nullity assertions. If anyone
(including JetBrains) wants it, drop me a line.


We do. :)

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.