Uff, finally I've noticed that neither BufferedReader nor InputStreamReader
throw any exception. So reader != null is really always true...
However we have problems with try/finally in #611. Hope they are fixed in
#612.

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


----- Original Message -----
From: "Thomas Singer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 12, 2002 6:11 PM
Subject: [Eap-list] Wrong "Condition is always false" detection


> In the following piece of code, IDEA tells me, that the condition (reader
> != null) in the finally block is always false. That isn't the case.
>
> Tom
>
>    BufferedReader reader = null;
>    try {
>      reader = new BufferedReader(new InputStreamReader(is));
>      return reader.readLine();
>    }
>    finally {
>      if (reader != null) {
>        try {
>          reader.close();
>        }
>        catch (IOException ex) {
>          // ignore
>        }
>      }
>    }
>
>
> _______________________________________________
> Eap-list mailing list
> [EMAIL PROTECTED]
> 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