[Schmitzm-commits] r189 - trunk/src/schmitzm/jfree/chart/style
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Jul 3 17:21:47 CEST 2009
Author: mojays
Date: 2009-07-03 17:21:47 +0200 (Fri, 03 Jul 2009)
New Revision: 189
Modified:
trunk/src/schmitzm/jfree/chart/style/ChartStyleUtil.java
Log:
Modified: trunk/src/schmitzm/jfree/chart/style/ChartStyleUtil.java
===================================================================
--- trunk/src/schmitzm/jfree/chart/style/ChartStyleUtil.java 2009-07-03 15:17:21 UTC (rev 188)
+++ trunk/src/schmitzm/jfree/chart/style/ChartStyleUtil.java 2009-07-03 15:21:47 UTC (rev 189)
@@ -48,7 +48,7 @@
* <b>The filename is taken as chart ID</b>
* @param url refers to XML resource
*/
- public static ChartStyle readStyleFromXML(URL url) throws IOException, JDOMException {
+ public static ChartStyle readStyleFromXML(URL url) throws IOException {
String id = IOUtil.urlToFile(url).getName();
return readStyleFromXML(url, id);
}
@@ -60,10 +60,13 @@
* @param id the ID for the style (if {@code null} the
* ID is taken from "id" attribute)
*/
- public static ChartStyle readStyleFromXML(URL url, String id) throws IOException, JDOMException {
- Document document = SAX_BUILDER.build(url);
-
- return( createStyleFromXML(document.getRootElement(),null) );
+ public static ChartStyle readStyleFromXML(URL url, String id) throws IOException {
+ try {
+ Document document = SAX_BUILDER.build(url);
+ return( createStyleFromXML(document.getRootElement(),null) );
+ } catch (JDOMException err) {
+ throw new IOException(err);
+ }
}
/**
More information about the Schmitzm-commits
mailing list