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 129665 - XmlFileEncodingQueryImpl does not handle unknown and illegal charsets
Summary: XmlFileEncodingQueryImpl does not handle unknown and illegal charsets
Status: RESOLVED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks: 129454
  Show dependency tree
 
Reported: 2008-03-10 14:57 UTC by Andrei Badea
Modified: 2008-03-11 11:35 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Proposed fix (3.49 KB, text/plain)
2008-03-10 15:01 UTC, Andrei Badea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Badea 2008-03-10 14:57:27 UTC
When given a XML file with an illegal or unknown encoding XmlFileEncodingQueryImpl throws IllegalCharsetNameException or
UnsupportedCharsetException instead of just calling FileEncodingQueryImplementation.throwException and letting the proxy
charset delegate to another charset.
Comment 1 Andrei Badea 2008-03-10 15:01:55 UTC
Created attachment 58066 [details]
Proposed fix
Comment 2 Andrei Badea 2008-03-10 15:03:28 UTC
Since I need this in order to fix another P2 issue, I want to commit this tomorrow. Tomasi and Samaresh, can you please
review the patch? Thanks.
Comment 3 Samaresh Panda 2008-03-10 15:27:00 UTC
I see that you're using the same code in two places. Please make a private method and use it instead. Other than that,
it looks good.
Comment 4 Andrei Badea 2008-03-11 10:59:47 UTC
Doesn't seem doable. The code is in two different classes (XMLDecoder and XMLEncoder) with no common ancestor, still the
code needs to access the buffer field.
Comment 5 Andrei Badea 2008-03-11 11:35:34 UTC
Fixed in a32f2472d04f.