Author: bdube Date: Fri Apr 23 02:50:47 2010 New Revision: 937141 URL: http://svn.apache.org/viewvc?rev=937141&view=rev Log: Change from deprecated File.toURL() to File.toURI().toURL()
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherWrapperTransformer.java Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java?rev=937141&r1=937140&r2=937141&view=diff ============================================================================== --- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java (original) +++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java Fri Apr 23 02:50:47 2010 @@ -1037,7 +1037,18 @@ public class DispatcherTransformer exten } else { File parent = new File(base.substring(5)); File parent2 = new File(parent.getParentFile(), href); - xslSource = m_resolver.resolveURI(parent2.toURL().toExternalForm()); + + try { + xslSource = m_resolver.resolveURI(parent2.toURI().toURL().toExternalForm()); + } catch (IllegalArgumentException e1) { + getLogger().error(e1.getMessage()); + + return null; + } catch (java.net.MalformedURLException e2) { + getLogger().error(e2.getMessage()); + + return null; + } } } Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherWrapperTransformer.java URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherWrapperTransformer.java?rev=937141&r1=937140&r2=937141&view=diff ============================================================================== --- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherWrapperTransformer.java (original) +++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherWrapperTransformer.java Fri Apr 23 02:50:47 2010 @@ -502,7 +502,18 @@ public class DispatcherWrapperTransforme } else { File parent = new File(base.substring(5)); File parent2 = new File(parent.getParentFile(), href); - xslSource = m_resolver.resolveURI(parent2.toURL().toExternalForm()); + + try { + xslSource = m_resolver.resolveURI(parent2.toURI().toURL().toExternalForm()); + } catch (IllegalArgumentException e1) { + getLogger().error(e1.getMessage()); + + return null; + } catch (java.net.MalformedURLException e2) { + getLogger().error(e2.getMessage()); + + return null; + } } }