Bug 73397

Summary: Setting ErrorHandlers for XML parsing
Product: [Eclipse Project] Platform Reporter: Darin Swanson <Darin_Swanson>
Component: DebugAssignee: Darin Swanson <Darin_Swanson>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P2    
Version: 3.0   
Target Milestone: 3.1 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Darin Swanson CLA 2004-09-07 14:51:35 EDT
With XML parsing on the IBM VMs if an error occurs and no error handler has 
been registered with the document builder, a message is set to system err.

We should consider adding a "null" error handler for all cases where it would 
be possible to have attempts to parse XML source that will fail with errors.
Comment 1 Darin Swanson CLA 2004-09-07 14:53:43 EDT
See bug 67980 for a specific case in point.
Comment 2 Jared Burns CLA 2005-02-10 16:23:44 EST
I found references to DocumentBuilder in the following plugins:
org.apache.ant
org.eclipse.ant.tests.ui
org.eclipse.ant.ui
org.eclipse.core.variables
org.eclipse.debug.core
org.eclipse.debug.ui
org.eclipse.jdt.debug.tests
org.eclipse.jdt.launching

Personally, I don't think we should do anything about this. If the IBM VM wants
to write all parse errors to System.err, that seems like the VM's prerogative.
Why should we go to the effort of preventing the VM from writing the errors if
that's what they want to do?
Comment 3 Darin Swanson CLA 2005-02-10 16:34:17 EST
My point it is not an error the user is interested in. They have no interest 
and no way to turn it off and really no way to fix the problem. 
As well a log of "Fatal Error" does sound pretty harsh.

The precendance has been set in other components as well that this behavior is 
not acceptable: see bug 18350

We also have bug 68103 as a friend of this one.
Comment 4 Jared Burns CLA 2005-02-10 17:15:35 EST
Added a DefaultHandler everywhere we call DocumentBuilder.parse(...). The
library behavior here is totally wrong, but since it's already been shipped we
need to handle it. Changes to:

org.eclipse.ant.ui:
TaskDescriptionProvider.java

org.eclipse.core.variables:
StringVariableManager.java

org.eclipse.debug.core:
DebugPlugin.java
LaunchConfiguration.java
LaunchManager.java

org.eclipse.debug.ui:
LaunchConfigurationManager.java
PerspectiveManager.java
WorkingSetSourceContainerType.java

org.eclipse.jdt.launching:
LaunchingPlugin.java
VMDefinitionsContainer.java
ArchiveSourceLocation.java
DirectorySourceLocation.java
JavaProjectSourceLocation.java
JavaSourceLocator.java
PackageFragmentRootSourceLocation.java

Please verify, DarinS.
Comment 5 Darin Swanson CLA 2005-02-14 17:19:45 EST
Verified