Browse Source

checkstyle

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277301 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 20 years ago
parent
commit
51200a05ac
1 changed files with 12 additions and 5 deletions
  1. +12
    -5
      src/main/org/apache/tools/ant/taskdefs/Redirector.java

+ 12
- 5
src/main/org/apache/tools/ant/taskdefs/Redirector.java View File

@@ -52,7 +52,7 @@ import org.apache.tools.ant.util.KeepAliveOutputStream;
*/ */
public class Redirector { public class Redirector {


private static final String defaultEncoding
private static final String DEFAULT_ENCODING
= System.getProperty("file.encoding"); = System.getProperty("file.encoding");


private class PropertyOutputStream extends ByteArrayOutputStream { private class PropertyOutputStream extends ByteArrayOutputStream {
@@ -152,13 +152,13 @@ public class Redirector {
private Vector inputFilterChains; private Vector inputFilterChains;


/** The output encoding */ /** The output encoding */
private String outputEncoding = defaultEncoding;
private String outputEncoding = DEFAULT_ENCODING;


/** The error encoding */ /** The error encoding */
private String errorEncoding = defaultEncoding;
private String errorEncoding = DEFAULT_ENCODING;


/** The input encoding */ /** The input encoding */
private String inputEncoding = defaultEncoding;
private String inputEncoding = DEFAULT_ENCODING;


/** Whether to complete properties settings **/ /** Whether to complete properties settings **/
private boolean appendProperties = true; private boolean appendProperties = true;
@@ -725,17 +725,22 @@ public class Redirector {
try { try {
managingTask.log(thread[i].toString(), Project.MSG_DEBUG); managingTask.log(thread[i].toString(), Project.MSG_DEBUG);
} catch (NullPointerException enPeaEx) { } catch (NullPointerException enPeaEx) {
// Ignore exception
} }
} }
Thread.sleep(1000); Thread.sleep(1000);
} catch (InterruptedException eyeEx) { } catch (InterruptedException eyeEx) {
// Ignore exception
} }
} }


setProperties(); setProperties();


inputStream = null; inputStream = null;
outputStream = errorStream = outPrintStream = errorPrintStream = null;
outputStream = null;
errorStream = null;
outPrintStream = null;
errorPrintStream = null;
} }


/** /**
@@ -747,12 +752,14 @@ public class Redirector {
try { try {
baos.close(); baos.close();
} catch (IOException eyeOhEx) { } catch (IOException eyeOhEx) {
// Ignore exception
} }
} }
if (errorBaos != null) { if (errorBaos != null) {
try { try {
errorBaos.close(); errorBaos.close();
} catch (IOException eyeOhEx) { } catch (IOException eyeOhEx) {
// Ignore exception
} }
} }
} }


Loading…
Cancel
Save