Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341105 - Stack trace is printed for an ignored exception
Summary: Stack trace is printed for an ignored exception
Status: RESOLVED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: other (show other bugs)
Version: 7.3.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 7.2.x   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-28 09:49 EDT by Anders Båtstrand CLA
Modified: 2011-03-31 06:27 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.