Skip to content

Commit

Permalink
[JBWS-3997] usage of Exception.printStackTrace() instead of logging f…
Browse files Browse the repository at this point in the history
…eature
  • Loading branch information
iweiss authored and asoldano committed Jun 28, 2016
1 parent d9d44f3 commit ccc6d77
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
11 changes: 7 additions & 4 deletions src/main/java/org/jboss/ws/common/concurrent/CopyJob.java
Expand Up @@ -21,6 +21,8 @@
*/
package org.jboss.ws.common.concurrent;

import org.jboss.logging.Logger;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
Expand All @@ -46,6 +48,7 @@
*/
public final class CopyJob implements Runnable
{
private static Logger log = Logger.getLogger(CopyJob.class);

/**
* Input stream to data read from.
Expand Down Expand Up @@ -104,7 +107,7 @@ public final void run()
}
catch ( IOException ioe )
{
ioe.printStackTrace(System.err);
log.error(ioe);
}
finally
{
Expand All @@ -114,7 +117,7 @@ public final void run()
}
catch (IOException ioe)
{
ioe.printStackTrace(System.err);
log.error(ioe);
}
if (this.closeOsOnExit)
{
Expand All @@ -125,7 +128,7 @@ public final void run()
}
catch (IOException ioe)
{
ioe.printStackTrace(System.err);
log.error(ioe);
}
}
}
Expand Down Expand Up @@ -155,7 +158,7 @@ private void copy( final InputStream is, final OutputStream os ) throws IOExcept
}
catch ( InterruptedException ie )
{
ie.printStackTrace( System.err );
log.error(ie);
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/jboss/ws/common/utils/Base64.java
Expand Up @@ -336,7 +336,7 @@ public static String encodeObject(java.io.Serializable serializableObject, int o
} // end try
catch (java.io.IOException e)
{
e.printStackTrace();
log.error(e);
return null;
} // end catch
finally
Expand Down Expand Up @@ -485,7 +485,7 @@ public static String encodeBytes(byte[] source, int off, int len, int options)
} // end try
catch (java.io.IOException e)
{
e.printStackTrace();
log.error(e);
return null;
} // end catch
finally
Expand Down Expand Up @@ -824,12 +824,12 @@ public static Object decodeToObject(String encodedObject)
} // end try
catch (java.io.IOException e)
{
e.printStackTrace();
log.error(e);
obj = null;
} // end catch
catch (java.lang.ClassNotFoundException e)
{
e.printStackTrace();
log.error(e);
obj = null;
} // end catch
finally
Expand Down

0 comments on commit ccc6d77

Please sign in to comment.