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 221299 - java.nio.charset.IllegalCharsetNameException: ${project.encoding}
Summary: java.nio.charset.IllegalCharsetNameException: ${project.encoding}
Status: RESOLVED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-01 22:35 UTC by Martin Fousek
Modified: 2012-11-07 03:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 193599


Attachments
stacktrace (1.58 KB, text/plain)
2012-11-01 22:35 UTC, Martin Fousek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Fousek 2012-11-01 22:35:39 UTC
Build: NetBeans IDE 7.2 (Build 201207171143)
VM: Java HotSpot(TM) 64-Bit Server VM, 20.4-b02, Java(TM) SE Runtime Environment, 1.6.0_29-b11
OS: Linux

User Comments:
marfous: I'm saving netbeans template file (springXMLCongif.template) which contains this xml definition tag:
<?xml version="1.0" encoding="${project.encoding}"?>

I think that UTF8 could be used as fallback instead of the Exception.




Stacktrace: 
java.nio.charset.IllegalCharsetNameException: ${project.encoding}
   at java.nio.charset.Charset.checkName(Charset.java:284)
   at java.nio.charset.Charset.lookup2(Charset.java:458)
   at java.nio.charset.Charset.lookup(Charset.java:437)
   at java.nio.charset.Charset.forName(Charset.java:502)
   at org.netbeans.modules.xml.text.TextEditorSupport.saveDocument(TextEditorSupport.java:396)
   at org.netbeans.modules.xml.text.TextEditorSupport$Env.save(TextEditorSupport.java:646)
Comment 1 Martin Fousek 2012-11-01 22:35:41 UTC
Created attachment 126962 [details]
stacktrace
Comment 2 Svata Dedic 2012-11-06 09:51:57 UTC
Changeset: b4fd72122142
Author:    Svata Dedic <sdedic@netbeans.org>
Date:      2012-11-06 10:51
Message:   Added handling for invalid charset names
Comment 3 Quality Engineering 2012-11-07 03:38:59 UTC
Integrated into 'main-golden', will be available in build *201211070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b4fd72122142
User: Svata Dedic <sdedic@netbeans.org>
Log: Issue #221299 - java.nio.charset.IllegalCharsetNameException: ${project.encoding}: fixed
Added handling for invalid charset names