This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 237485

Summary: Missing ErrorHandler for xml parsing in FileEntityResolver
Product: platform Reporter: Tomas Pavek <tpavek>
Component: Data SystemsAssignee: Jaroslav Havlin <jhavlin>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 7.4   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: patch adding missing setErrorHandler(this), works equally, just does not print messages to System.err

Description Tomas Pavek 2013-10-22 15:52:46 UTC
DTDParser in FileEntityResolver that is used for parsing .settings files seems to be missing a setter for the error handler (as it is usual - e.g. in XMLDataObjectInfoParser).

The effect is that if some error happens during parsing, an error message is printed to std err by the xml default error handler. This is superfluous since there is custom logging of the parsing errors in FileEntityResolver.DTDParser. Specifically for window system settings files that are knowingly failing sometimes there is no error notification - this is broken by printing the error message from DefaultErrorHandler. In SQLDeveloper there are conditions that cause this happen frequently - filling console with bogus Fatal Error messages.

The fix seems to be trivial, I'll attach a patch.
Comment 1 Tomas Pavek 2013-10-22 15:55:21 UTC
Created attachment 141420 [details]
patch adding missing setErrorHandler(this), works equally, just does not print messages to System.err
Comment 2 Jaroslav Havlin 2013-10-23 13:27:06 UTC
Integrated as http://hg.netbeans.org/core-main/rev/959120ac6a9f
Thank you very much for the patch, Tomas.
Comment 3 Quality Engineering 2013-10-24 02:39:16 UTC
Integrated into 'main-silver', will be available in build *201310240001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/959120ac6a9f
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #237485: Missing ErrorHandler for xml parsing in FileEntityResolver

Patch by Tomas Pavek.
Comment 4 Tomas Pavek 2013-10-30 13:45:59 UTC
Integrated into 'releases' jdev_aspen branch as 71228c2dcc99.