Hello Carlos,

We're currently working on more detailed reporting but it seems to be
a big problem in some situations...

-- 
Best regards,
Maxim Shafirov
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"


CCeS> Inspector is right, but the message is misleading.

CCeS> What this means is: strLine can't be null because it's used before this 
CCeS> (strLine.indexOf(...) and an NPE would already have been thrown.

CCeS> Maybe the inspector message should be changed to something like:

CCeS> strLine != null is always true because strLine is used before this 
CCeS> point.

CCeS> Carlos


>> String strLine = lineRdr.readLine();
>> int nIndex = strLine.indexOf( "public void test" );
>> if ( strLine != null && nIndex != -1 ) {
>>     strLastMethod = strLine.substring( nIndex + 12, 
>> strLine.indexOf( "(" ) );
>> }
>> 
>> 
>> The strLine != null part of the if statement is marked as 
>> "always being true"
>> in the Constant Conditions tab of inspection.
>> 
>> -- Rick


CCeS> _______________________________________________
CCeS> Eap-list mailing list
CCeS> [EMAIL PROTECTED]
CCeS> http://www.intellij.com/mailman/listinfo/eap-list


_______________________________________________
Eap-list mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-list

Reply via email to