mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-17 05:52:26 +00:00
one more optimization.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@29308 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
f43ecdd93e
commit
987ff580e2
1 file changed
+4
-1
@@ -74,7 +74,10 @@ public class StreamTaskListener implements TaskListener, Serializable, Closeable
|
||||
|
||||
public StreamTaskListener(OutputStream out, Charset charset) {
|
||||
try {
|
||||
this.out = charset==null ? new PrintStream(out,false) : new PrintStream(out,false,charset.name());
|
||||
if (charset == null)
|
||||
this.out = (out instanceof PrintStream) ? (PrintStream)out : new PrintStream(out, false);
|
||||
else
|
||||
this.out = new PrintStream(out, false, charset.name());
|
||||
this.charset = charset;
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
// it's not very pretty to do this, but otherwise we'd have to touch too many call sites.
|
||||
|
||||
Reference in new issue
Block a user