Hi all,

If you scan the source for all senders of "printStackTrace" you'll find  21
references.

Are all of those correct instead of logging to StatusLogger or throwing an
exception or a different exception in the case where this is done in
response to catching an exception.

Also, in some cases like
org.apache.logging.log4j.ReflectionComparison.setupCallerCheck(), both are
done:

        } catch (final ClassNotFoundException cnfe) {
            cnfe.printStackTrace();
            throw new RuntimeException(cnfe);
        }

In this case, should we not call StatusLogger?

I'd also rather never throw a RuntimeException*, *instead an
IllegalStateException.

Also, this method is undocumented and uses a dynamic reference to the Java
7 sun.reflect.Reflection class. How is that going to work on an IBM JVM?

Gary


-- 
E-Mail: [email protected] | [email protected]
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Reply via email to