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 - Missing ErrorHandler for xml parsing in FileEntityResolver
Summary: Missing ErrorHandler for xml parsing in FileEntityResolver
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Data Systems (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Jaroslav Havlin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-22 15:52 UTC by Tomas Pavek
Modified: 2013-10-30 13:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
patch adding missing setErrorHandler(this), works equally, just does not print messages to System.err (1003 bytes, patch)
2013-10-22 15:55 UTC, Tomas Pavek
Details | Diff

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