Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-core-dev] Released experimental support for null refs static analysis: feedback welcome

Team,

We've just released an experimental release for bug 110030, adding null
refs analysis to JDT Core capabilities.

For now, it is essentially meant to be exposed to the team for test and
feedback. To get a feel of the function, you'll need to self host on v_634a
or to use a nightly build more recent than the integration build of this
week, and to add to your preferences the following line:
org.eclipse.jdt.core.compiler.problem.nullReference=warning

As a result, you'll get new warnings where we believe that some problems
may lie into the code regarding the value of object references, their being
null of non null, and their use.
For example, the following will report a warning on line 2 because o is
known to be non null:

void foo() {
  Object o = new Object();    // 1: assign to newly allocated
  if (o == null) {                  // 2: test against null
    return;
  }
}

Only local variables and parameters are involved in the analysis.

Thanks in advance for your feedback.

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



Back to the top