You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2013/01/18 15:11:05 UTC

svn commit: r1435148 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/analysis/ lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/ lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/

Author: uschindler
Date: Fri Jan 18 14:11:05 2013
New Revision: 1435148

URL: http://svn.apache.org/viewvc?rev=1435148&view=rev
Log:
Merged revision(s) 1435146 from lucene/dev/trunk:
LUCENE-4570: Fix deprecated API usage (otherwise may lead to bugs if Hyphenation filters load files from directories with non-ascii path names)

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/analysis/   (props changed)
    lucene/dev/branches/branch_4x/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/HyphenationCompoundWordTokenFilter.java
    lucene/dev/branches/branch_4x/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/HyphenationTree.java
    lucene/dev/branches/branch_4x/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/PatternParser.java

Modified: lucene/dev/branches/branch_4x/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/HyphenationCompoundWordTokenFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/HyphenationCompoundWordTokenFilter.java?rev=1435148&r1=1435147&r2=1435148&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/HyphenationCompoundWordTokenFilter.java (original)
+++ lucene/dev/branches/branch_4x/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/HyphenationCompoundWordTokenFilter.java Fri Jan 18 14:11:05 2013
@@ -148,7 +148,7 @@ public class HyphenationCompoundWordToke
    */
   public static HyphenationTree getHyphenationTree(File hyphenationFile)
       throws IOException {
-    return getHyphenationTree(new InputSource(hyphenationFile.toURL().toExternalForm()));
+    return getHyphenationTree(new InputSource(hyphenationFile.toURI().toASCIIString()));
   }
 
   /**

Modified: lucene/dev/branches/branch_4x/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/HyphenationTree.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/HyphenationTree.java?rev=1435148&r1=1435147&r2=1435148&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/HyphenationTree.java (original)
+++ lucene/dev/branches/branch_4x/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/HyphenationTree.java Fri Jan 18 14:11:05 2013
@@ -111,7 +111,7 @@ public class HyphenationTree extends Ter
    * @throws IOException In case the parsing fails
    */
   public void loadPatterns(File f) throws IOException {
-    InputSource src = new InputSource(f.toURL().toExternalForm());
+    InputSource src = new InputSource(f.toURI().toASCIIString());
     loadPatterns(src);
   }
 

Modified: lucene/dev/branches/branch_4x/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/PatternParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/PatternParser.java?rev=1435148&r1=1435147&r2=1435148&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/PatternParser.java (original)
+++ lucene/dev/branches/branch_4x/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/PatternParser.java Fri Jan 18 14:11:05 2013
@@ -98,7 +98,7 @@ public class PatternParser extends Defau
    * @throws IOException In case of an exception while parsing
    */
   public void parse(File file) throws IOException {
-    InputSource src = new InputSource(file.toURL().toExternalForm());
+    InputSource src = new InputSource(file.toURI().toASCIIString());
     parse(src);
   }