Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 341105

Summary: Stack trace is printed for an ignored exception
Product: [RT] Jetty Reporter: Anders Båtstrand <anderius>
Component: otherAssignee: Project Inbox <jetty-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: anderius, mgorovoy
Version: 7.3.1   
Target Milestone: 7.2.x   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Anders Båtstrand CLA 2011-03-28 09:49:01 EDT
Build Identifier: 7.3.1.v20110307

org.eclipse.jetty.xml.XmlConfiguration contains the following code:

 try
        {
            // Use reflection to look up 1.6 service loader
            // loader=ServiceLoader.load(ConfigurationProcessorFactory.class); 
            Class<?> slc = ClassLoader.getSystemClassLoader().loadClass("java.util.ServiceLoader");
            Method load = slc.getMethod("load",Class.class);
            loader=(Iterable<?>)load.invoke(null,ConfigurationProcessorFactory.class);
        }
        catch(Exception e)
        {
            e.printStackTrace();
            Log.ignore(e);
        }
        finally
        {
            __factoryLoader=loader;
        }

This produces a nasty stacktrace using Java 1.5. I suggest removing "e.printStackTrace();".

Reproducible: Always

Steps to Reproduce:
Create an instance of XmlConfiguration.
Comment 1 Michael Gorovoy CLA 2011-03-28 10:09:06 EDT
Removed printStackTrace() call, as it apparently it was left over from debugging.

Committed r2917.
Comment 2 Anders Båtstrand CLA 2011-03-31 06:27:27 EDT
(In reply to comment #1)
> Removed printStackTrace() call, as it apparently it was left over from
> debugging.
> 
> Committed r2917.

Thank you for the extremely fast response!

Then I will look forward to the next version.