[jbossws-dev] jbossws-cxf and try-catch blocks
Rostislav Svoboda
rsvoboda at redhat.com
Tue May 24 09:49:26 EDT 2016
Hi.
I'd like to have your feedback on 2 logging items related to jbossws-cxf and try-catch [1].
1) Usage of Exception.printStackTrace() instead of logging feature
https://github.com/jbossws/jbossws-cxf/blob/master/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFHandlerResolverImpl.java#L331
https://github.com/jbossws/jbossws-cxf/blob/master/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFHandlerResolverImpl.java#L373
https://github.com/jbossws/jbossws-cxf/blob/master/modules/addons/transports/udp/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/udp/UDPDestination.java#L113
https://github.com/jbossws/jbossws-cxf/blob/master/modules/addons/transports/udp/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/udp/UDPDestination.java#L200
Is there any reason to call printStackTrace() directly ? If not I can create JIRA for cleanup ++ check other jbossws-* projects.
2) // ignore in catch block
https://github.com/jbossws/jbossws-cxf/blob/master/modules/client/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java#L251
https://github.com/jbossws/jbossws-cxf/blob/master/modules/addons/transports/udp/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/udp/UDPConduit.java#L165
https://github.com/jbossws/jbossws-cxf/blob/master/modules/addons/transports/udp/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/udp/UDPConduit.java#L179
https://github.com/jbossws/jbossws-cxf/blob/master/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSServerAuthConfig.java#L193
What about logging on trace level ? In case of UDPConduid it's catching exception on socket.send() while looping across all network interfaces ... logging at trace could potentially help when troubleshooting
What do you think about these items? Should I proceed with JIRA and other jbossws-* projects?
Thank you.
Rostislav
[1] grep -b8 catch . -R | grep -v 'modules/test' | grep -v 'Test\.java' | grep -v "\.xml" | uniq > ~/Downloads/jbossws-cxf-try-catch.txt
More information about the jbossws-dev
mailing list