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 16629

Summary: XMLUtil.toXXX (...) throws IOException
Product: platform Reporter: Jaroslav Tulach <jtulach>
Component: -- Other --Assignee: _ pkuzel <pkuzel>
Status: CLOSED FIXED    
Severity: blocker    
Priority: P1    
Version: 3.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description Jaroslav Tulach 2001-10-17 09:30:24 UTC
Do not throw the IOException, please.
Comment 1 _ pkuzel 2001-10-17 10:15:20 UTC
Some parameter values are not allowed (e.g. ASCII control characters).
So it is about whether to throw IllegalArgumentException or
IOException. IOException makes more sence for me because this methods
is typically used during serializing XML to some I/O resourse, so the
whole serialization process needs to catch an IOException anyway.

REOPEN if you prefer the IllegalArgumentException solution or any
other.
Comment 2 _ pkuzel 2001-10-17 10:24:01 UTC
IOException is also safer than IlleagalArgument as it is checked
exception.
Comment 3 _ pkuzel 2001-10-18 14:40:08 UTC
Fix caused API change.
Comment 4 _ pkuzel 2001-10-18 14:41:17 UTC
new openide spec number 1.40

New public static methods signatures:

  String toElementContent(String) throws CharConversionException
  String toAttributeValue(String) throws CharConversionException
Comment 5 _ pkuzel 2001-10-18 14:54:28 UTC
Flame war at
http://openide.netbeans.org/servlets/ReadMsg?msgId=170271&listName=dev
gives reasons why name and parameters had to be changed.
Comment 6 Quality Engineering 2003-07-01 16:05:33 UTC
Resolved for 3.4.x or earlier, no new info since then -> verified
Comment 7 Quality Engineering 2003-07-01 16:25:23 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.