Author: spepping
Date: Thu Jan 20 16:05:42 2011
New Revision: 1061362
URL: http://svn.apache.org/viewvc?rev=1061362&view=rev
Log:
Avoid deconstructing and reconstructing the base URI of the
configuration; the location string is obtained from a sax.Locator with
system ID, line number and optionally column number
(avalon.framework.configuration.SAXConfigurationHandler.getLocationString),
and can be used as a URI string directly.
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactoryConfigurator.java
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactoryConfigurator.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactoryConfigurator.java?rev=1061362&r1=1061361&r2=1061362&view=diff
==============================================================================
---
xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactoryConfigurator.java
(original)
+++
xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactoryConfigurator.java
Thu Jan 20 16:05:42 2011
@@ -378,15 +378,9 @@ public class FopFactoryConfigurator {
private void setBaseURI() throws FOPException {
String loc = cfg.getLocation();
- String[] locationParts = (loc != null ? cfg.getLocation().split(":") :
null);
try {
- if (locationParts != null && locationParts.length >= 2
- && "file".equals(locationParts[0])) {
- StringBuilder sb = new StringBuilder(locationParts[1]);
- for (int idx = 2; idx < locationParts.length; idx++) {
- sb.append(":").append(locationParts[idx]);
- }
- baseURI = new URI(locationParts[0], sb.toString(), null);
+ if (loc != null && loc.startsWith("file:")) {
+ baseURI = new URI(loc);
baseURI = baseURI.resolve(".").normalize();
}
if (baseURI == null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]