Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #32965

Re: A hypothetical compiler extension

From Brixomatic <brixomatic@yahoo.com>
Newsgroups comp.lang.java.programmer
Subject Re: A hypothetical compiler extension
Date 2015-11-01 22:40 +0100
Organization Aioe.org NNTP Server
Message-ID <MPG.30a0a524c4a3e4769896a5@news.aioe.org> (permalink)
References <extension-20151027221547@ram.dialup.fu-berlin.de>

Show all headers | View raw


In article <extension-20151027221547@ram.dialup.fu-berlin.de>, Stefan 
Ram (ram@zedat.fu-berlin.de) says...

>   ( o.toString() ); }
>     ^
> Warning: o might be null.
> 
>   . One rewrites to
> 
> void m( final java.lang.Object o )
> { if( o != null )
>   java.lang.System.out.println
>   ( o.toString() ); }
> 
>   and the warning disappears.

Use Eclipse or IntelliJ IDEA and check the appropriate compiler warning.
If you need javac and want these warnings on the command line, 
incorporate "Checkstyle", "FindBugs" or "PMD" in your build script, they 
have the appropriate warning and many more.
You may also use "Coverity Scan", if you fancy a commercial application 
that allows you to triage the findings among multiple team members.

It kind of shocks me that you don't seem to know or use any of these 
tools, under which stone have you been sleeping the past 10 years?

Kind regards,
Wanja


-- 
..Alesi's problem was that the back of the car was jumping up and down 
dangerously - and I can assure you from having been teammate to 
Jean Alesi and knowing what kind of cars that he can pull up with, 
when Jean Alesi says that a car is dangerous - it is. [Jonathan Palmer]

Back to comp.lang.java.programmer | Previous | Next | Find similar | Unroll thread


Thread

Re: A hypothetical compiler extension Brixomatic <brixomatic@yahoo.com> - 2015-11-01 22:40 +0100

csiph-web