Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-pmc] Seeking approval for compiler options modification

+1.



                                                                           
             Maxime                                                        
             Daniel/France/IBM                                             
             @IBMFR                                                     To 
             Sent by:                  eclipse-pmc@xxxxxxxxxxx             
             eclipse-pmc-bounc                                          cc 
             es@xxxxxxxxxxx                                                
                                                                   Subject 
                                       [eclipse-pmc] Seeking approval for  
             02/20/2007 07:26          compiler options modification       
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
             eclipse-pmc@eclip                                             
                  se.org                                                   
                                                                           
                                                                           





https://bugs.eclipse.org/bugs/show_bug.cgi?id=170704

We would like to split the compiler option that commands the error level
for null reference issues into three different options.

The current OPTION_ReportNullReference would be replaced by the following
set:
OPTION_ReportNullReference
OPTION_ReportPotentialNullReference
OPTION_ReportRedundantNullCheck

This is a breaking change because, assuming that OPTION_ReportNullReference
is positioned to warning, the new options being left at their default value
(aka ignore), the second and third warnings of the code snippet below would
no more be reported:

void foo(Object p) {
Object l = null;
if (p == null) {} // taint p: it may be null
l.toString(); // warning 1: l can only be null
p.toString(); // warning 2: p may be null; no more present unless
OPTION_ReportPotentialNullReference is set to warning
if (l == null) {} // warning 3: l can only be null; no more present unless
OPTION_ReportRedundantNullCheck is set to warning
}

In fact, OPTION_ReportNullReference would then only control how cases that
would certainly raise an NPE at runtime are reported.

The value of doing so is to enable the user to focus on the most dangerous
and most certain errors amongst those that the null analysis reports. This
has enabled us to detect a very few such cases in Eclipse code (that have
been reported separately), amongst which none was a false alarm.

We would then be glad to had that change to 3.3.

Cheers,
Maxime DANIEL
Developer, Eclipse JDT Core
IBM Paris Laboratory
69, rue de la Vecquerie
44600 Saint-Nazaire
maxime_daniel@xxxxxxxxxx / +33 (0) 2 51 16 40 13 / tl 87 40 13 / FAX - 40
01 / Mob. +33 (0) 6 84 63 99 62
' It takes nine months to make a baby, and it takes focused concentration
to make great breakthroughs.' - Stever Robbins - in HBS Working Knowledge,
Jan 2005
'The easiest way to predict the future is to invent it.' - Alan Kay

_______________________________________________
eclipse-pmc mailing list
eclipse-pmc@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipse-pmc




Back to the top