Avoid unnecessary Throwable.fillInStackTrace.
@@ -167,8 +167,10 @@ public class StreamTaskListener extends AbstractTaskListener implements TaskList
private void writeObject(ObjectOutputStream out) throws IOException {
out.writeObject(new RemoteOutputStream(new CloseProofOutputStream(this.out)));
out.writeObject(charset==null? null : charset.name());
+ if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, null, new Throwable("serializing here with AUTO_FLUSH=" + AUTO_FLUSH));
}
+ }
/**
* Restores eager remote flushing behavior.
@@ -182,8 +184,10 @@ public class StreamTaskListener extends AbstractTaskListener implements TaskList
out = new PrintStream((OutputStream)in.readObject(), AUTO_FLUSH);
String name = (String)in.readObject();
charset = name==null ? null : Charset.forName(name);
+ if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, null, new Throwable("deserializing here with AUTO_FLUSH=" + AUTO_FLUSH));
}
+ }
@Override
public void close() throws IOException {
