You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by rw...@apache.org on 2012/04/03 12:43:22 UTC

svn commit: r1308810 - /incubator/stanbol/trunk/entityhub/indexing/core/src/main/java/org/apache/stanbol/entityhub/indexing/core/config/IndexingConfig.java

Author: rwesten
Date: Tue Apr  3 10:43:21 2012
New Revision: 1308810

URL: http://svn.apache.org/viewvc?rev=1308810&view=rev
Log:
fixes STANBOL-568

Modified:
    incubator/stanbol/trunk/entityhub/indexing/core/src/main/java/org/apache/stanbol/entityhub/indexing/core/config/IndexingConfig.java

Modified: incubator/stanbol/trunk/entityhub/indexing/core/src/main/java/org/apache/stanbol/entityhub/indexing/core/config/IndexingConfig.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/indexing/core/src/main/java/org/apache/stanbol/entityhub/indexing/core/config/IndexingConfig.java?rev=1308810&r1=1308809&r2=1308810&view=diff
==============================================================================
--- incubator/stanbol/trunk/entityhub/indexing/core/src/main/java/org/apache/stanbol/entityhub/indexing/core/config/IndexingConfig.java (original)
+++ incubator/stanbol/trunk/entityhub/indexing/core/src/main/java/org/apache/stanbol/entityhub/indexing/core/config/IndexingConfig.java Tue Apr  3 10:43:21 2012
@@ -32,7 +32,9 @@ import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
 import java.net.URL;
+import java.net.URLDecoder;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -530,7 +532,12 @@ public class IndexingConfig {
             //URLs with jar:file:/{jarPath}!{classPath} can cause problems
             //so try to parse manually by using the substring from the first
             //'/' to (including '!')
-            String urlString = contextUrl.toString();
+            String urlString;
+            try {
+                urlString = URLDecoder.decode(contextUrl.toString(),"UTF-8");
+            } catch (UnsupportedEncodingException e1) {
+                throw new IllegalStateException("Encoding 'UTF-8' is not supported",e);
+            }
             int slashIndex =  urlString.indexOf('/');
             int exclamationIndex = urlString.indexOf('!');
             if(slashIndex >=0 && exclamationIndex > 0){