summaryrefslogtreecommitdiffstats
path: root/org/madore/damlengine/Resolver.java
diff options
context:
space:
mode:
Diffstat (limited to 'org/madore/damlengine/Resolver.java')
-rw-r--r--org/madore/damlengine/Resolver.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/org/madore/damlengine/Resolver.java b/org/madore/damlengine/Resolver.java
index 103659c..e04d1b2 100644
--- a/org/madore/damlengine/Resolver.java
+++ b/org/madore/damlengine/Resolver.java
@@ -29,6 +29,7 @@ public final class Resolver
public static final class BootstrapResolver
extends org.apache.xml.resolver.helpers.BootstrapResolver {
+ @Override
public InputSource resolveEntity(String publicId, String systemId) {
String resolved = null;
if ( publicId.equals("-//GlobalTransCorp//DTD XML Catalogs "
@@ -65,7 +66,9 @@ public final class Resolver
try {
catalog.parseCatalog(f);
} catch (MalformedURLException e) {
+ throw new RuntimeException(e);
} catch (IOException e) {
+ throw new RuntimeException(e);
}
}
}
@@ -74,9 +77,9 @@ public final class Resolver
try {
return catalog.resolvePublic(publicId, systemId);
} catch (MalformedURLException e) {
- return null;
+ throw new RuntimeException(e);
} catch (IOException e) {
- return null;
+ throw new RuntimeException(e);
}
}
@@ -84,9 +87,9 @@ public final class Resolver
try {
return catalog.resolveSystem(systemId);
} catch (MalformedURLException e) {
- return null;
+ throw new RuntimeException(e);
} catch (IOException e) {
- return null;
+ throw new RuntimeException(e);
}
}
@@ -107,6 +110,7 @@ public final class Resolver
URI v = u.resolve(systemId);
return v.toString();
} catch ( URISyntaxException e ) {
+ // Fail and continue to next return.
}
}
return systemId;