Hello Rick, Inspector is absolutely right here! In the line preceeding if statement you're calling indexOf on strLine which will throw NPE if strLine == null. So if will never get control if lineRdr.readLine() returns null.
-- Best regards, Maxim Shafirov JetBrains, Inc / IntelliJ Software http://www.intellij.com "Develop with pleasure!" RV> This was with IDEA build 614, Red Hat Linux 7.2 RV> On Thursday 28 March 2002 10:04 am, Rick Vestal wrote: >> Hi all, >> >> With the following code: >> >> 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 RV> _______________________________________________ RV> Eap-list mailing list RV> [EMAIL PROTECTED] RV> http://www.intellij.com/mailman/listinfo/eap-list _______________________________________________ Eap-list mailing list [EMAIL PROTECTED] http://www.intellij.com/mailman/listinfo/eap-list
