On 7 May 2012 22:42,  <[email protected]> wrote:
> Author: pmouawad
> Date: Mon May  7 21:42:42 2012
> New Revision: 1335274
>
> URL: http://svn.apache.org/viewvc?rev=1335274&view=rev
> Log:
> Bug 53136 - Catching Throwable needs to be carefully handled
>
> Modified:
>    
> jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/StreamGobbler.java
>
> Modified: 
> jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/StreamGobbler.java
> URL: 
> http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/StreamGobbler.java?rev=1335274&r1=1335273&r2=1335274&view=diff
> ==============================================================================
> --- 
> jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/StreamGobbler.java
>  (original)
> +++ 
> jmeter/trunk/src/protocol/native/org/apache/jmeter/protocol/system/StreamGobbler.java
>  Mon May  7 21:42:42 2012
> @@ -23,6 +23,8 @@ import java.io.IOException;
>  import java.io.InputStream;
>  import java.io.InputStreamReader;
>
> +import org.apache.jorphan.util.JOrphanUtils;
> +
>  /**
>  * Thread that eats Output and Error Stream to avoid Deadlock on Windows 
> Machines
>  * Inspired from:
> @@ -58,11 +60,7 @@ class StreamGobbler extends Thread {
>                {
>                        if(br != null)
>                        {
> -                               try {
> -                                       br.close();
> -                               } catch (Throwable e) {
> -                                       // NOOP
> -                               }
> +                           JOrphanUtils.closeQuietly(br);

Good catch, but the check for br != null is done by the closeQuietly method.

>                        }
>                }
>        }
>
>

Reply via email to