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 - XMLUtil.toXXX (...) throws IOException
Summary: XMLUtil.toXXX (...) throws IOException
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Linux
: P1 blocker (vote)
Assignee: _ pkuzel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-17 09:30 UTC by Jaroslav Tulach
Modified: 2008-12-22 18:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

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