Silently ignoring exceptions in the example projects. -----------------------------------------------------
Key: CXF-3890 URL: https://issues.apache.org/jira/browse/CXF-3890 Project: CXF Issue Type: Improvement Affects Versions: 2.4.2 Reporter: Robert Liguori Priority: Trivial I'm wondering if all of the instances of silenced exceptions in the example projects really need to be silenced. Note: "Don't silently ignore exceptions, except in those few cases where you can't do anything anyway." -- http://leepoint.net/notes-java/principles_and_practices/style/style-practices-summary.html What I'm implying is that [ex].printStackTrace() or [ex].getMessage() should be applied where appropriate. ======================================================================= C:\apache-cxf-2.4.2\samples\js_browser_client_java_first\src\demo\hw\server\data\Ingredient.java ... } catch (ClassCastException cce) { return false; } ... ======================================================================= c:\apache-cxf-2.4.2\samples\sts_issue_operation\src\test\java\demo\sts\provider\operation\IssueDelegateTest.java ... } catch (NullPointerException e) { // expected } ... } catch (STSException e) { // expected } ... } catch (STSException e) { // expected } ... } catch (STSException e) { // expected } ... ======================================================================= C:\apache-cxf-2.4.2\samples\integration\jca\outbound.was61\src\demo\servlet\HelloWorldServlet.java ... catch (Exception e) { // report error from close } ... ======================================================================= C:\apache-cxf-2.4.2\samples\integration\jca\outbound\src\demo\servlet\HelloWorldServlet.java ... } catch (ResourceException e) { // report error from close } ... ======================================================================= C:\apache-cxf-2.4.2\samples\integration\JBI\external_provider_internal_consumer\service-unit\src\test\consumer\HelloWorldConsumer.java ... } catch (Exception ex) { //ignore it } ... ======================================================================= C:\apache-cxf-2.4.2\samples\integration\JBI\handlers\service-unit\src\test\consumer\HelloWorldConsumer.java ... } catch (Exception ex) { //ignore it } ... ======================================================================= C:\apache-cxf-2.4.2\samples\integration\JBI\internal_provider_internal_consumer\service-unit\src\test\consumer\HelloWorldConsumer.java ... } catch (Exception ex) { //ignore it } ... ======================================================================= C:\apache-cxf-2.4.2\samples\jms_spring_config\src\main\java\com\example\customerservice\server\CustomerServiceImpl.java ... } catch (InterruptedException e) { // Nothing to do here } ... ======================================================================= C:\apache-cxf-2.4.2\samples\wsdl_first\src\main\java\com\example\customerservice\server\CustomerServiceImpl.java ... } catch (InterruptedException e) { // Nothing to do here } ...======================================================================= C:\apache-cxf-2.4.2\samples\ws_security\interopfest\wssc\src\main\java\interop\client\Client.java ... } catch (Exception e) { isLocal = false; } ... ======================================================================= C:\apache-cxf-2.4.2\samples\ws_security\interopfest\wssec10\src\main\java\interop\client\Client.java ... } catch (MalformedURLException mue) { return null; ...======================================================================= C:\apache-cxf-2.4.2\samples\corba\bank_ws_addressing\src\corba\server\BankImpl.java ... } catch (Exception ex) { //Ignore } ... } catch (Exception ex) { //Ignore } ... ======================================================================= -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira