You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2012/06/20 21:04:12 UTC

svn commit: r1352268 [3/5] - in /commons/proper/codec/trunk/src: main/java/org/apache/commons/codec/ main/java/org/apache/commons/codec/binary/ main/java/org/apache/commons/codec/digest/ main/java/org/apache/commons/codec/language/ main/java/org/apache...

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java?rev=1352268&r1=1352267&r2=1352268&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java Wed Jun 20 19:04:08 2012
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -32,8 +32,8 @@ import org.apache.commons.codec.StringEn
  * but is not volatile, and accesses are not synchronized.
  * If an instance of the class is shared between threads, the caller needs to ensure that suitable synchronization
  * is used to ensure safe publication of the value between threads, and must not invoke {@link #setMaxCodeLen(int)}
- * after initial setup. 
- * 
+ * after initial setup.
+ *
  * @version $Id$
  */
 public class DoubleMetaphone implements StringEncoder {
@@ -46,13 +46,13 @@ public class DoubleMetaphone implements 
     /**
      * Prefixes when present which are not pronounced
      */
-    private static final String[] SILENT_START = 
+    private static final String[] SILENT_START =
     { "GN", "KN", "PN", "WR", "PS" };
-    private static final String[] L_R_N_M_B_H_F_V_W_SPACE = 
+    private static final String[] L_R_N_M_B_H_F_V_W_SPACE =
     { "L", "R", "N", "M", "B", "H", "F", "V", "W", " " };
-    private static final String[] ES_EP_EB_EL_EY_IB_IL_IN_IE_EI_ER = 
+    private static final String[] ES_EP_EB_EL_EY_IB_IL_IN_IE_EI_ER =
     { "ES", "EP", "EB", "EL", "EY", "IB", "IL", "IN", "IE", "EI", "ER" };
-    private static final String[] L_T_K_S_N_M_B_Z = 
+    private static final String[] L_T_K_S_N_M_B_Z =
     { "L", "T", "K", "S", "N", "M", "B", "Z" };
 
     /**
@@ -66,7 +66,7 @@ public class DoubleMetaphone implements 
     public DoubleMetaphone() {
         super();
     }
-    
+
     /**
      * Encode a value with Double Metaphone
      *
@@ -76,7 +76,7 @@ public class DoubleMetaphone implements 
     public String doubleMetaphone(String value) {
         return doubleMetaphone(value, false);
     }
-    
+
     /**
      * Encode a value with Double Metaphone, optionally using the alternate
      * encoding.
@@ -90,12 +90,12 @@ public class DoubleMetaphone implements 
         if (value == null) {
             return null;
         }
-        
+
         boolean slavoGermanic = isSlavoGermanic(value);
         int index = isSilentStart(value) ? 1 : 0;
-        
+
         DoubleMetaphoneResult result = new DoubleMetaphoneResult(this.getMaxCodeLen());
-        
+
         while (!result.isComplete() && index <= value.length() - 1) {
             switch (value.charAt(index)) {
             case 'A':
@@ -114,7 +114,7 @@ public class DoubleMetaphone implements 
                 // A C with a Cedilla
                 result.append('S');
                 index++;
-                break; 
+                break;
             case 'C':
                 index = handleC(value, result, index);
                 break;
@@ -191,9 +191,9 @@ public class DoubleMetaphone implements 
 
         return alternate ? result.getAlternate() : result.getPrimary();
     }
-    
+
     /**
-     * Encode the value using DoubleMetaphone.  It will only work if 
+     * Encode the value using DoubleMetaphone.  It will only work if
      * <code>obj</code> is a <code>String</code> (like <code>Metaphone</code>).
      *
      * @param obj Object to encode (should be of type String)
@@ -203,8 +203,8 @@ public class DoubleMetaphone implements 
     @Override
     public Object encode(Object obj) throws EncoderException {
         if (!(obj instanceof String)) {
-            throw new EncoderException("DoubleMetaphone encode parameter is not of type String"); 
-        } 
+            throw new EncoderException("DoubleMetaphone encode parameter is not of type String");
+        }
         return doubleMetaphone((String) obj);
     }
 
@@ -216,13 +216,13 @@ public class DoubleMetaphone implements 
      */
     @Override
     public String encode(String value) {
-        return doubleMetaphone(value);   
+        return doubleMetaphone(value);
     }
 
     /**
      * Check if the Double Metaphone values of two <code>String</code> values
      * are equal.
-     * 
+     *
      * @param value1 The left-hand side of the encoded {@link String#equals(Object)}.
      * @param value2 The right-hand side of the encoded {@link String#equals(Object)}.
      * @return {@code true} if the encoded <code>String</code>s are equal;
@@ -232,24 +232,24 @@ public class DoubleMetaphone implements 
     public boolean isDoubleMetaphoneEqual(String value1, String value2) {
         return isDoubleMetaphoneEqual(value1, value2, false);
     }
-    
+
     /**
      * Check if the Double Metaphone values of two <code>String</code> values
      * are equal, optionally using the alternate value.
-     * 
+     *
      * @param value1 The left-hand side of the encoded {@link String#equals(Object)}.
      * @param value2 The right-hand side of the encoded {@link String#equals(Object)}.
      * @param alternate use the alternate value if {@code true}.
      * @return {@code true} if the encoded <code>String</code>s are equal;
      *          {@code false} otherwise.
      */
-    public boolean isDoubleMetaphoneEqual(String value1, 
-                                          String value2, 
+    public boolean isDoubleMetaphoneEqual(String value1,
+                                          String value2,
                                           boolean alternate) {
         return doubleMetaphone(value1, alternate).equals(doubleMetaphone
                                                          (value2, alternate));
     }
-    
+
     /**
      * Returns the maxCodeLen.
      * @return int
@@ -271,19 +271,19 @@ public class DoubleMetaphone implements 
     /**
      * Handles 'A', 'E', 'I', 'O', 'U', and 'Y' cases
      */
-    private int handleAEIOUY(DoubleMetaphoneResult result, int 
+    private int handleAEIOUY(DoubleMetaphoneResult result, int
                              index) {
         if (index == 0) {
             result.append('A');
         }
         return index + 1;
     }
-    
+
     /**
      * Handles 'C' cases
      */
-    private int handleC(String value, 
-                        DoubleMetaphoneResult result, 
+    private int handleC(String value,
+                        DoubleMetaphoneResult result,
                         int index) {
         if (conditionC0(value, index)) {  // very confusing, moved out
             result.append('K');
@@ -293,7 +293,7 @@ public class DoubleMetaphone implements 
             index += 2;
         } else if (contains(value, index, 2, "CH")) {
             index = handleCH(value, result, index);
-        } else if (contains(value, index, 2, "CZ") && 
+        } else if (contains(value, index, 2, "CZ") &&
                    !contains(value, index - 2, 4, "WICZ")) {
             //-- "Czerny" --//
             result.append('S', 'X');
@@ -302,7 +302,7 @@ public class DoubleMetaphone implements 
             //-- "focaccia" --//
             result.append('X');
             index += 3;
-        } else if (contains(value, index, 2, "CC") && 
+        } else if (contains(value, index, 2, "CC") &&
                    !(index == 1 && charAt(value, 0) == 'M')) {
             //-- double "cc" but not "McClelland" --//
             return handleCC(value, result, index);
@@ -319,30 +319,30 @@ public class DoubleMetaphone implements 
             index += 2;
         } else {
             result.append('K');
-            if (contains(value, index + 1, 2, " C", " Q", " G")) { 
+            if (contains(value, index + 1, 2, " C", " Q", " G")) {
                 //-- Mac Caffrey, Mac Gregor --//
                 index += 3;
-            } else if (contains(value, index + 1, 1, "C", "K", "Q") && 
+            } else if (contains(value, index + 1, 1, "C", "K", "Q") &&
                        !contains(value, index + 1, 2, "CE", "CI")) {
                 index += 2;
             } else {
                 index++;
             }
         }
-        
+
         return index;
     }
 
     /**
      * Handles 'CC' cases
      */
-    private int handleCC(String value, 
-                         DoubleMetaphoneResult result, 
+    private int handleCC(String value,
+                         DoubleMetaphoneResult result,
                          int index) {
-        if (contains(value, index + 2, 1, "I", "E", "H") && 
+        if (contains(value, index + 2, 1, "I", "E", "H") &&
             !contains(value, index + 2, 2, "HU")) {
             //-- "bellocchio" but not "bacchus" --//
-            if ((index == 1 && charAt(value, index - 1) == 'A') || 
+            if ((index == 1 && charAt(value, index - 1) == 'A') ||
                 contains(value, index - 1, 5, "UCCEE", "UCCES")) {
                 //-- "accident", "accede", "succeed" --//
                 result.append("KS");
@@ -355,15 +355,15 @@ public class DoubleMetaphone implements 
             result.append('K');
             index += 2;
         }
-        
+
         return index;
     }
-    
+
     /**
      * Handles 'CH' cases
      */
-    private int handleCH(String value, 
-                         DoubleMetaphoneResult result, 
+    private int handleCH(String value,
+                         DoubleMetaphoneResult result,
                          int index) {
         if (index > 0 && contains(value, index, 4, "CHAE")) {   // Michael
             result.append('K', 'X');
@@ -393,8 +393,8 @@ public class DoubleMetaphone implements 
     /**
      * Handles 'D' cases
      */
-    private int handleD(String value, 
-                        DoubleMetaphoneResult result, 
+    private int handleD(String value,
+                        DoubleMetaphoneResult result,
                         int index) {
         if (contains(value, index, 2, "DG")) {
             //-- "Edge" --//
@@ -419,16 +419,16 @@ public class DoubleMetaphone implements 
     /**
      * Handles 'G' cases
      */
-    private int handleG(String value, 
-                        DoubleMetaphoneResult result, 
-                        int index, 
+    private int handleG(String value,
+                        DoubleMetaphoneResult result,
+                        int index,
                         boolean slavoGermanic) {
         if (charAt(value, index + 1) == 'H') {
             index = handleGH(value, result, index);
         } else if (charAt(value, index + 1) == 'N') {
             if (index == 1 && isVowel(charAt(value, 0)) && !slavoGermanic) {
                 result.append("KN", "N");
-            } else if (!contains(value, index + 2, 2, "EY") && 
+            } else if (!contains(value, index + 2, 2, "EY") &&
                        charAt(value, index + 1) != 'Y' && !slavoGermanic) {
                 result.append("N", "KN");
             } else {
@@ -442,15 +442,15 @@ public class DoubleMetaphone implements 
             //-- -ges-, -gep-, -gel-, -gie- at beginning --//
             result.append('K', 'J');
             index += 2;
-        } else if ((contains(value, index + 1, 2, "ER") || 
+        } else if ((contains(value, index + 1, 2, "ER") ||
                     charAt(value, index + 1) == 'Y') &&
                    !contains(value, 0, 6, "DANGER", "RANGER", "MANGER") &&
-                   !contains(value, index - 1, 1, "E", "I") && 
+                   !contains(value, index - 1, 1, "E", "I") &&
                    !contains(value, index - 1, 3, "RGY", "OGY")) {
             //-- -ger-, -gy- --//
             result.append('K', 'J');
             index += 2;
-        } else if (contains(value, index + 1, 1, "E", "I", "Y") || 
+        } else if (contains(value, index + 1, 1, "E", "I", "Y") ||
                    contains(value, index - 1, 4, "AGGI", "OGGI")) {
             //-- Italian "biaggi" --//
             if ((contains(value, 0 ,4, "VAN ", "VON ") || contains(value, 0, 3, "SCH")) || contains(value, index + 1, 2, "ET")) {
@@ -471,12 +471,12 @@ public class DoubleMetaphone implements 
         }
         return index;
     }
-    
+
     /**
      * Handles 'GH' cases
      */
-    private int handleGH(String value, 
-                         DoubleMetaphoneResult result, 
+    private int handleGH(String value,
+                         DoubleMetaphoneResult result,
                          int index) {
         if (index > 0 && !isVowel(charAt(value, index - 1))) {
             result.append('K');
@@ -494,7 +494,7 @@ public class DoubleMetaphone implements 
             //-- Parker's rule (with some further refinements) - "hugh"
             index += 2;
         } else {
-            if (index > 2 && charAt(value, index - 1) == 'U' && 
+            if (index > 2 && charAt(value, index - 1) == 'U' &&
                 contains(value, index - 3, 1, "C", "G", "L", "R", "T")) {
                 //-- "laugh", "McLaughlin", "cough", "gough", "rough", "tough"
                 result.append('F');
@@ -509,11 +509,11 @@ public class DoubleMetaphone implements 
     /**
      * Handles 'H' cases
      */
-    private int handleH(String value, 
-                        DoubleMetaphoneResult result, 
+    private int handleH(String value,
+                        DoubleMetaphoneResult result,
                         int index) {
         //-- only keep if first & before vowel or between 2 vowels --//
-        if ((index == 0 || isVowel(charAt(value, index - 1))) && 
+        if ((index == 0 || isVowel(charAt(value, index - 1))) &&
             isVowel(charAt(value, index + 1))) {
             result.append('H');
             index += 2;
@@ -523,15 +523,15 @@ public class DoubleMetaphone implements 
         }
         return index;
     }
-    
+
     /**
      * Handles 'J' cases
      */
-    private int handleJ(String value, DoubleMetaphoneResult result, int index, 
+    private int handleJ(String value, DoubleMetaphoneResult result, int index,
                         boolean slavoGermanic) {
         if (contains(value, index, 4, "JOSE") || contains(value, 0, 4, "SAN ")) {
                 //-- obvious Spanish, "Jose", "San Jacinto" --//
-                if ((index == 0 && (charAt(value, index + 4) == ' ') || 
+                if ((index == 0 && (charAt(value, index + 4) == ' ') ||
                      value.length() == 4) || contains(value, 0, 4, "SAN ")) {
                     result.append('H');
                 } else {
@@ -541,7 +541,7 @@ public class DoubleMetaphone implements 
             } else {
                 if (index == 0 && !contains(value, index, 4, "JOSE")) {
                     result.append('J', 'A');
-                } else if (isVowel(charAt(value, index - 1)) && !slavoGermanic && 
+                } else if (isVowel(charAt(value, index - 1)) && !slavoGermanic &&
                               (charAt(value, index + 1) == 'A' || charAt(value, index + 1) == 'O')) {
                     result.append('J', 'H');
                 } else if (index == value.length() - 1) {
@@ -558,12 +558,12 @@ public class DoubleMetaphone implements 
             }
         return index;
     }
-    
+
     /**
      * Handles 'L' cases
      */
-    private int handleL(String value, 
-                        DoubleMetaphoneResult result, 
+    private int handleL(String value,
+                        DoubleMetaphoneResult result,
                         int index) {
         if (charAt(value, index + 1) == 'L') {
             if (conditionL0(value, index)) {
@@ -582,8 +582,8 @@ public class DoubleMetaphone implements 
     /**
      * Handles 'P' cases
      */
-    private int handleP(String value, 
-                        DoubleMetaphoneResult result, 
+    private int handleP(String value,
+                        DoubleMetaphoneResult result,
                         int index) {
         if (charAt(value, index + 1) == 'H') {
             result.append('F');
@@ -598,12 +598,12 @@ public class DoubleMetaphone implements 
     /**
      * Handles 'R' cases
      */
-    private int handleR(String value, 
-                        DoubleMetaphoneResult result, 
-                        int index, 
+    private int handleR(String value,
+                        DoubleMetaphoneResult result,
+                        int index,
                         boolean slavoGermanic) {
-        if (index == value.length() - 1 && !slavoGermanic && 
-            contains(value, index - 2, 2, "IE") && 
+        if (index == value.length() - 1 && !slavoGermanic &&
+            contains(value, index - 2, 2, "IE") &&
             !contains(value, index - 4, 2, "ME", "MA")) {
             result.appendAlternate('R');
         } else {
@@ -615,9 +615,9 @@ public class DoubleMetaphone implements 
     /**
      * Handles 'S' cases
      */
-    private int handleS(String value, 
-                        DoubleMetaphoneResult result, 
-                        int index, 
+    private int handleS(String value,
+                        DoubleMetaphoneResult result,
+                        int index,
                         boolean slavoGermanic) {
         if (contains(value, index - 1, 3, "ISL", "YSL")) {
             //-- special cases "island", "isle", "carlisle", "carlysle" --//
@@ -627,7 +627,7 @@ public class DoubleMetaphone implements 
             result.append('X', 'S');
             index++;
         } else if (contains(value, index, 2, "SH")) {
-            if (contains(value, index + 1, 4, 
+            if (contains(value, index + 1, 4,
                          "HEIM", "HOEK", "HOLM", "HOLZ")) {
                 //-- germanic --//
                 result.append('S');
@@ -653,7 +653,7 @@ public class DoubleMetaphone implements 
         } else if (contains(value, index, 2, "SC")) {
             index = handleSC(value, result, index);
         } else {
-            if (index == value.length() - 1 && contains(value, index - 2, 
+            if (index == value.length() - 1 && contains(value, index - 2,
                                                         2, "AI", "OI")){
                 //-- french e.g. "resnais", "artois" --//
                 result.appendAlternate('S');
@@ -668,12 +668,12 @@ public class DoubleMetaphone implements 
     /**
      * Handles 'SC' cases
      */
-    private int handleSC(String value, 
-                         DoubleMetaphoneResult result, 
+    private int handleSC(String value,
+                         DoubleMetaphoneResult result,
                          int index) {
         if (charAt(value, index + 2) == 'H') {
             //-- Schlesinger's rule --//
-            if (contains(value, index + 3, 
+            if (contains(value, index + 3,
                          2, "OO", "ER", "EN", "UY", "ED", "EM")) {
                 //-- Dutch origin, e.g. "school", "schooner" --//
                 if (contains(value, index + 3, 2, "ER", "EN")) {
@@ -700,8 +700,8 @@ public class DoubleMetaphone implements 
     /**
      * Handles 'T' cases
      */
-    private int handleT(String value, 
-                        DoubleMetaphoneResult result, 
+    private int handleT(String value,
+                        DoubleMetaphoneResult result,
                         int index) {
         if (contains(value, index, 4, "TION")) {
             result.append('X');
@@ -709,11 +709,11 @@ public class DoubleMetaphone implements 
         } else if (contains(value, index, 3, "TIA", "TCH")) {
             result.append('X');
             index += 3;
-        } else if (contains(value, index, 2, "TH") || contains(value, index, 
+        } else if (contains(value, index, 2, "TH") || contains(value, index,
                                                                3, "TTH")) {
-            if (contains(value, index + 2, 2, "OM", "AM") || 
+            if (contains(value, index + 2, 2, "OM", "AM") ||
                 //-- special case "thomas", "thames" or germanic --//
-                contains(value, 0, 4, "VAN ", "VON ") || 
+                contains(value, 0, 4, "VAN ", "VON ") ||
                 contains(value, 0, 3, "SCH")) {
                 result.append('T');
             } else {
@@ -730,15 +730,15 @@ public class DoubleMetaphone implements 
     /**
      * Handles 'W' cases
      */
-    private int handleW(String value, 
-                        DoubleMetaphoneResult result, 
+    private int handleW(String value,
+                        DoubleMetaphoneResult result,
                         int index) {
         if (contains(value, index, 2, "WR")) {
             //-- can also be in middle of word --//
             result.append('R');
             index += 2;
         } else {
-            if (index == 0 && (isVowel(charAt(value, index + 1)) || 
+            if (index == 0 && (isVowel(charAt(value, index + 1)) ||
                                contains(value, index, 2, "WH"))) {
                 if (isVowel(charAt(value, index + 1))) {
                     //-- Wasserman should match Vasserman --//
@@ -749,7 +749,7 @@ public class DoubleMetaphone implements 
                 }
                 index++;
             } else if ((index == value.length() - 1 && isVowel(charAt(value, index - 1))) ||
-                       contains(value, index - 1, 
+                       contains(value, index - 1,
                                 5, "EWSKI", "EWSKY", "OWSKI", "OWSKY") ||
                        contains(value, 0, 3, "SCH")) {
                 //-- Arnow should match Arnoff --//
@@ -765,19 +765,19 @@ public class DoubleMetaphone implements 
         }
         return index;
     }
-    
+
     /**
      * Handles 'X' cases
      */
-    private int handleX(String value, 
-                        DoubleMetaphoneResult result, 
+    private int handleX(String value,
+                        DoubleMetaphoneResult result,
                         int index) {
         if (index == 0) {
             result.append('S');
             index++;
         } else {
-            if (!((index == value.length() - 1) && 
-                  (contains(value, index - 3, 3, "IAU", "EAU") || 
+            if (!((index == value.length() - 1) &&
+                  (contains(value, index - 3, 3, "IAU", "EAU") ||
                    contains(value, index - 2, 2, "AU", "OU")))) {
                 //-- French e.g. breaux --//
                 result.append("KS");
@@ -790,7 +790,7 @@ public class DoubleMetaphone implements 
     /**
      * Handles 'Z' cases
      */
-    private int handleZ(String value, DoubleMetaphoneResult result, int index, 
+    private int handleZ(String value, DoubleMetaphoneResult result, int index,
                         boolean slavoGermanic) {
         if (charAt(value, index + 1) == 'H') {
             //-- Chinese pinyin e.g. "zhao" or Angelina "Zhang" --//
@@ -827,14 +827,14 @@ public class DoubleMetaphone implements 
                     contains(value, index - 2, 6, "BACHER", "MACHER");
         }
     }
-    
+
     /**
      * Complex condition 0 for 'CH'
      */
     private boolean conditionCH0(String value, int index) {
         if (index != 0) {
             return false;
-        } else if (!contains(value, index + 1, 5, "HARAC", "HARIS") && 
+        } else if (!contains(value, index + 1, 5, "HARAC", "HARIS") &&
                    !contains(value, index + 1, 3, "HOR", "HYM", "HIA", "HEM")) {
             return false;
         } else if (contains(value, 0, 5, "CHORE")) {
@@ -843,27 +843,27 @@ public class DoubleMetaphone implements 
             return true;
         }
     }
-    
+
     /**
      * Complex condition 1 for 'CH'
      */
     private boolean conditionCH1(String value, int index) {
-        return ((contains(value, 0, 4, "VAN ", "VON ") || contains(value, 0, 
+        return ((contains(value, 0, 4, "VAN ", "VON ") || contains(value, 0,
                                                                    3, "SCH")) ||
                 contains(value, index - 2, 6, "ORCHES", "ARCHIT", "ORCHID") ||
                 contains(value, index + 2, 1, "T", "S") ||
                 ((contains(value, index - 1, 1, "A", "O", "U", "E") || index == 0) &&
                  (contains(value, index + 2, 1, L_R_N_M_B_H_F_V_W_SPACE) || index + 1 == value.length() - 1)));
     }
-    
+
     /**
      * Complex condition 0 for 'L'
      */
     private boolean conditionL0(String value, int index) {
-        if (index == value.length() - 3 && 
+        if (index == value.length() - 3 &&
             contains(value, index - 1, 4, "ILLO", "ILLA", "ALLE")) {
             return true;
-        } else if ((contains(value, value.length() - 2, 2, "AS", "OS") || 
+        } else if ((contains(value, value.length() - 2, 2, "AS", "OS") ||
                     contains(value, value.length() - 1, 1, "A", "O")) &&
                    contains(value, index - 1, 4, "ALLE")) {
             return true;
@@ -871,7 +871,7 @@ public class DoubleMetaphone implements 
             return false;
         }
     }
-    
+
     /**
      * Complex condition 0 for 'M'
      */
@@ -883,7 +883,7 @@ public class DoubleMetaphone implements 
                 ((index + 1) == value.length() - 1 || contains(value,
                         index + 2, 2, "ER"));
     }
-    
+
     //-- BEGIN HELPER FUNCTIONS --//
 
     /**
@@ -891,7 +891,7 @@ public class DoubleMetaphone implements 
      * of slavo-germanic origin if it contians any of 'W', 'K', 'CZ', or 'WITZ'.
      */
     private boolean isSlavoGermanic(String value) {
-        return value.indexOf('W') > -1 || value.indexOf('K') > -1 || 
+        return value.indexOf('W') > -1 || value.indexOf('K') > -1 ||
             value.indexOf("CZ") > -1 || value.indexOf("WITZ") > -1;
     }
 
@@ -906,7 +906,7 @@ public class DoubleMetaphone implements 
      * Determines whether or not the value starts with a silent letter.  It will
      * return {@code true} if the value starts with any of 'GN', 'KN',
      * 'PN', 'WR' or 'PS'.
-     */    
+     */
     private boolean isSilentStart(String value) {
         boolean result = false;
         for (String element : SILENT_START) {
@@ -920,7 +920,7 @@ public class DoubleMetaphone implements 
 
     /**
      * Cleans the input
-     */    
+     */
     private String cleanInput(String input) {
         if (input == null) {
             return null;
@@ -936,82 +936,82 @@ public class DoubleMetaphone implements 
      * Gets the character at index <code>index</code> if available, otherwise
      * it returns <code>Character.MIN_VALUE</code> so that there is some sort
      * of a default
-     */    
+     */
     protected char charAt(String value, int index) {
         if (index < 0 || index >= value.length()) {
             return Character.MIN_VALUE;
-        } 
+        }
         return value.charAt(index);
     }
 
     /**
      * Shortcut method with 1 criteria
-     */    
-    private static boolean contains(String value, int start, int length, 
+     */
+    private static boolean contains(String value, int start, int length,
                                     String criteria) {
-        return contains(value, start, length, 
+        return contains(value, start, length,
                         new String[] { criteria });
     }
 
     /**
      * Shortcut method with 2 criteria
-     */    
-    private static boolean contains(String value, int start, int length, 
+     */
+    private static boolean contains(String value, int start, int length,
                                     String criteria1, String criteria2) {
-        return contains(value, start, length, 
+        return contains(value, start, length,
                         new String[] { criteria1, criteria2 });
     }
 
     /**
      * Shortcut method with 3 criteria
-     */    
-    private static boolean contains(String value, int start, int length, 
-                                    String criteria1, String criteria2, 
+     */
+    private static boolean contains(String value, int start, int length,
+                                    String criteria1, String criteria2,
                                     String criteria3) {
-        return contains(value, start, length, 
+        return contains(value, start, length,
                         new String[] { criteria1, criteria2, criteria3 });
     }
 
     /**
      * Shortcut method with 4 criteria
-     */    
-    private static boolean contains(String value, int start, int length, 
-                                    String criteria1, String criteria2, 
+     */
+    private static boolean contains(String value, int start, int length,
+                                    String criteria1, String criteria2,
                                     String criteria3, String criteria4) {
-        return contains(value, start, length, 
-                        new String[] { criteria1, criteria2, criteria3, 
+        return contains(value, start, length,
+                        new String[] { criteria1, criteria2, criteria3,
                                        criteria4 });
     }
 
     /**
      * Shortcut method with 5 criteria
-     */    
-    private static boolean contains(String value, int start, int length, 
-                                    String criteria1, String criteria2, 
-                                    String criteria3, String criteria4, 
+     */
+    private static boolean contains(String value, int start, int length,
+                                    String criteria1, String criteria2,
+                                    String criteria3, String criteria4,
                                     String criteria5) {
-        return contains(value, start, length, 
-                        new String[] { criteria1, criteria2, criteria3, 
+        return contains(value, start, length,
+                        new String[] { criteria1, criteria2, criteria3,
                                        criteria4, criteria5 });
     }
 
     /**
      * Shortcut method with 6 criteria
-     */    
-    private static boolean contains(String value, int start, int length, 
-                                    String criteria1, String criteria2, 
-                                    String criteria3, String criteria4, 
+     */
+    private static boolean contains(String value, int start, int length,
+                                    String criteria1, String criteria2,
+                                    String criteria3, String criteria4,
                                     String criteria5, String criteria6) {
-        return contains(value, start, length, 
-                        new String[] { criteria1, criteria2, criteria3, 
+        return contains(value, start, length,
+                        new String[] { criteria1, criteria2, criteria3,
                                        criteria4, criteria5, criteria6 });
     }
-    
+
     /**
      * Determines whether <code>value</code> contains any of the criteria starting at index <code>start</code> and
      * matching up to length <code>length</code>
      */
-    protected static boolean contains(String value, int start, int length, 
+    protected static boolean contains(String value, int start, int length,
                                       String[] criteria) {
         boolean result = false;
         if (start >= 0 && start + length <= value.length()) {
@@ -1026,9 +1026,9 @@ public class DoubleMetaphone implements 
         }
         return result;
     }
-    
+
     //-- BEGIN INNER CLASSES --//
-    
+
     /**
      * Inner class for storing results, since there is the optional alternate
      * encoding.
@@ -1102,7 +1102,7 @@ public class DoubleMetaphone implements 
         }
 
         public boolean isComplete() {
-            return this.primary.length() >= this.maxLength && 
+            return this.primary.length() >= this.maxLength &&
                 this.alternate.length() >= this.maxLength;
         }
     }

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Metaphone.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Metaphone.java?rev=1352268&r1=1352267&r2=1352268&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Metaphone.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Metaphone.java Wed Jun 20 19:04:08 2012
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,9 +21,9 @@ import org.apache.commons.codec.EncoderE
 import org.apache.commons.codec.StringEncoder;
 
 /**
- * Encodes a string into a Metaphone value. 
+ * Encodes a string into a Metaphone value.
  * <p>
- * Initial Java implementation by <CITE>William B. Brogden. December, 1997</CITE>. 
+ * Initial Java implementation by <CITE>William B. Brogden. December, 1997</CITE>.
  * Permission given by <CITE>wbrogden</CITE> for code to be used anywhere.
  * </p>
  * <p>
@@ -31,25 +31,25 @@ import org.apache.commons.codec.StringEn
  * 39.</CITE>
  * </p>
  * <p>
- * Note, that this does not match the algorithm that ships with PHP, or the algorithm 
+ * Note, that this does not match the algorithm that ships with PHP, or the algorithm
  * found in the Perl <a href="http://search.cpan.org/~mschwern/Text-Metaphone-1.96/Metaphone.pm">Text:Metaphone-1.96</a>.
- * They have had undocumented changes from the originally published algorithm. 
+ * They have had undocumented changes from the originally published algorithm.
  * For more information, see <a href="https://issues.apache.org/jira/browse/CODEC-57">CODEC-57</a>.
  * </p>
- * 
+ *
  * This class is conditionally thread-safe.
  * The instance field {@link #maxCodeLen} is mutable {@link #setMaxCodeLen(int)}
  * but is not volatile, and accesses are not synchronised.
  * If an instance of the class is shared between threads, the caller needs to ensure that suitable synchronisation
  * is used to ensure safe publication of the value between threads, and must not invoke {@link #setMaxCodeLen(int)}
- * after initial setup. 
- * 
+ * after initial setup.
+ *
  * @version $Id$
  */
 public class Metaphone implements StringEncoder {
 
     /**
-     * Five values in the English language 
+     * Five values in the English language
      */
     private static final String VOWELS = "AEIOU" ;
 
@@ -94,15 +94,15 @@ public class Metaphone implements String
         if (txt.length() == 1) {
             return txt.toUpperCase(java.util.Locale.ENGLISH) ;
         }
-      
+
         char[] inwd = txt.toUpperCase(java.util.Locale.ENGLISH).toCharArray() ;
-      
+
         StringBuilder local = new StringBuilder(40); // manipulate
         StringBuilder code = new StringBuilder(10) ; //   output
         // handle initial 2 characters exceptions
         switch(inwd[0]) {
-        case 'K' : 
-        case 'G' : 
+        case 'K' :
+        case 'G' :
         case 'P' : /* looking for KN, etc*/
             if (inwd[1] == 'N') {
                 local.append(inwd, 1, inwd.length - 1);
@@ -119,7 +119,7 @@ public class Metaphone implements String
             break;
         case 'W' : /* looking for WR or WH */
             if (inwd[1] == 'R') {   // WR -> R
-                local.append(inwd, 1, inwd.length - 1); 
+                local.append(inwd, 1, inwd.length - 1);
                 break ;
             }
             if (inwd[1] == 'H') {
@@ -140,7 +140,7 @@ public class Metaphone implements String
         int wdsz = local.length();
         int n = 0 ;
 
-        while (code.length() < this.getMaxCodeLen() && 
+        while (code.length() < this.getMaxCodeLen() &&
                n < wdsz ) { // max code size of 4 works well
             char symb = local.charAt(n) ;
             // remove duplicate letters except C
@@ -149,12 +149,12 @@ public class Metaphone implements String
             } else { // not dup
                 switch(symb) {
                 case 'A' : case 'E' : case 'I' : case 'O' : case 'U' :
-                    if (n == 0) { 
+                    if (n == 0) {
                         code.append(symb);
                     }
                     break ; // only use vowel if leading char
                 case 'B' :
-                    if ( isPreviousChar(local, n, 'M') && 
+                    if ( isPreviousChar(local, n, 'M') &&
                          isLastChar(wdsz, n) ) { // B is silent if word ends in MB
                         break;
                     }
@@ -162,57 +162,57 @@ public class Metaphone implements String
                     break;
                 case 'C' : // lots of C special cases
                     /* discard if SCI, SCE or SCY */
-                    if ( isPreviousChar(local, n, 'S') && 
-                         !isLastChar(wdsz, n) && 
-                         FRONTV.indexOf(local.charAt(n + 1)) >= 0 ) { 
+                    if ( isPreviousChar(local, n, 'S') &&
+                         !isLastChar(wdsz, n) &&
+                         FRONTV.indexOf(local.charAt(n + 1)) >= 0 ) {
                         break;
                     }
                     if (regionMatch(local, n, "CIA")) { // "CIA" -> X
-                        code.append('X'); 
+                        code.append('X');
                         break;
                     }
-                    if (!isLastChar(wdsz, n) && 
+                    if (!isLastChar(wdsz, n) &&
                         FRONTV.indexOf(local.charAt(n + 1)) >= 0) {
                         code.append('S');
                         break; // CI,CE,CY -> S
                     }
                     if (isPreviousChar(local, n, 'S') &&
                         isNextChar(local, n, 'H') ) { // SCH->sk
-                        code.append('K') ; 
+                        code.append('K') ;
                         break ;
                     }
                     if (isNextChar(local, n, 'H')) { // detect CH
-                        if (n == 0 && 
-                            wdsz >= 3 && 
+                        if (n == 0 &&
+                            wdsz >= 3 &&
                             isVowel(local,2) ) { // CH consonant -> K consonant
                             code.append('K');
-                        } else { 
+                        } else {
                             code.append('X'); // CHvowel -> X
                         }
-                    } else { 
+                    } else {
                         code.append('K');
                     }
                     break ;
                 case 'D' :
-                    if (!isLastChar(wdsz, n + 1) && 
-                        isNextChar(local, n, 'G') && 
-                        FRONTV.indexOf(local.charAt(n + 2)) >= 0) { // DGE DGI DGY -> J 
+                    if (!isLastChar(wdsz, n + 1) &&
+                        isNextChar(local, n, 'G') &&
+                        FRONTV.indexOf(local.charAt(n + 2)) >= 0) { // DGE DGI DGY -> J
                         code.append('J'); n += 2 ;
-                    } else { 
+                    } else {
                         code.append('T');
                     }
                     break ;
                 case 'G' : // GH silent at end or before consonant
-                    if (isLastChar(wdsz, n + 1) && 
+                    if (isLastChar(wdsz, n + 1) &&
                         isNextChar(local, n, 'H')) {
                         break;
                     }
-                    if (!isLastChar(wdsz, n + 1) &&  
-                        isNextChar(local,n,'H') && 
+                    if (!isLastChar(wdsz, n + 1) &&
+                        isNextChar(local,n,'H') &&
                         !isVowel(local,n+2)) {
                         break;
                     }
-                    if (n > 0 && 
+                    if (n > 0 &&
                         ( regionMatch(local, n, "GN") ||
                           regionMatch(local, n, "GNED") ) ) {
                         break; // silent G
@@ -223,8 +223,8 @@ public class Metaphone implements String
                     } else {
                         hard = false ;
                     }
-                    if (!isLastChar(wdsz, n) && 
-                        FRONTV.indexOf(local.charAt(n + 1)) >= 0 && 
+                    if (!isLastChar(wdsz, n) &&
+                        FRONTV.indexOf(local.charAt(n + 1)) >= 0 &&
                         !hard) {
                         code.append('J');
                     } else {
@@ -235,7 +235,7 @@ public class Metaphone implements String
                     if (isLastChar(wdsz, n)) {
                         break ; // terminal H
                     }
-                    if (n > 0 && 
+                    if (n > 0 &&
                         VARSON.indexOf(local.charAt(n - 1)) >= 0) {
                         break;
                     }
@@ -243,13 +243,13 @@ public class Metaphone implements String
                         code.append('H'); // Hvowel
                     }
                     break;
-                case 'F': 
-                case 'J' : 
+                case 'F':
+                case 'J' :
                 case 'L' :
-                case 'M': 
-                case 'N' : 
+                case 'M':
+                case 'N' :
                 case 'R' :
-                    code.append(symb); 
+                    code.append(symb);
                     break;
                 case 'K' :
                     if (n > 0) { // not initial
@@ -272,8 +272,8 @@ public class Metaphone implements String
                     code.append('K');
                     break;
                 case 'S' :
-                    if (regionMatch(local,n,"SH") || 
-                        regionMatch(local,n,"SIO") || 
+                    if (regionMatch(local,n,"SH") ||
+                        regionMatch(local,n,"SIO") ||
                         regionMatch(local,n,"SIA")) {
                         code.append('X');
                     } else {
@@ -281,9 +281,9 @@ public class Metaphone implements String
                     }
                     break;
                 case 'T' :
-                    if (regionMatch(local,n,"TIA") || 
+                    if (regionMatch(local,n,"TIA") ||
                         regionMatch(local,n,"TIO")) {
-                        code.append('X'); 
+                        code.append('X');
                         break;
                     }
                     if (regionMatch(local,n,"TCH")) {
@@ -300,7 +300,7 @@ public class Metaphone implements String
                 case 'V' :
                     code.append('F'); break ;
                 case 'W' : case 'Y' : // silent if not followed by vowel
-                    if (!isLastChar(wdsz,n) && 
+                    if (!isLastChar(wdsz,n) &&
                         isVowel(local,n+1)) {
                         code.append(symb);
                     }
@@ -313,8 +313,8 @@ public class Metaphone implements String
                 } // end switch
                 n++ ;
             } // end else from symb != 'C'
-            if (code.length() > this.getMaxCodeLen()) { 
-                code.setLength(this.getMaxCodeLen()); 
+            if (code.length() > this.getMaxCodeLen()) {
+                code.setLength(this.getMaxCodeLen());
             }
         }
         return code.toString();
@@ -354,9 +354,9 @@ public class Metaphone implements String
 
     private boolean isLastChar(int wdsz, int n) {
         return n + 1 == wdsz;
-    } 
-    
-    
+    }
+
+
     /**
      * Encodes an Object using the metaphone algorithm.  This method
      * is provided in order to satisfy the requirements of the
@@ -364,7 +364,7 @@ public class Metaphone implements String
      * supplied object is not of type java.lang.String.
      *
      * @param obj Object to encode
-     * @return An object (or type java.lang.String) containing the 
+     * @return An object (or type java.lang.String) containing the
      *         metaphone code which corresponds to the String supplied.
      * @throws EncoderException if the parameter supplied is not
      *                          of type java.lang.String
@@ -372,20 +372,20 @@ public class Metaphone implements String
     @Override
     public Object encode(Object obj) throws EncoderException {
         if (!(obj instanceof String)) {
-            throw new EncoderException("Parameter supplied to Metaphone encode is not of type java.lang.String"); 
+            throw new EncoderException("Parameter supplied to Metaphone encode is not of type java.lang.String");
         }
         return metaphone((String) obj);
     }
 
     /**
-     * Encodes a String using the Metaphone algorithm. 
+     * Encodes a String using the Metaphone algorithm.
      *
      * @param str String object to encode
      * @return The metaphone code corresponding to the String supplied
      */
     @Override
     public String encode(String str) {
-        return metaphone(str);   
+        return metaphone(str);
     }
 
     /**
@@ -393,7 +393,7 @@ public class Metaphone implements String
      *
      * @param str1 First of two strings to compare
      * @param str2 Second of two strings to compare
-     * @return {@code true} if the metaphones of these strings are identical, 
+     * @return {@code true} if the metaphones of these strings are identical,
      *        {@code false} otherwise.
      */
     public boolean isMetaphoneEqual(String str1, String str2) {

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Nysiis.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Nysiis.java?rev=1352268&r1=1352267&r2=1352268&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Nysiis.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Nysiis.java Wed Jun 20 19:04:08 2012
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -62,7 +62,7 @@ import org.apache.commons.codec.StringEn
  * </pre></p>
  *
  * <p>This class is immutable and thread-safe.</p>
- * 
+ *
  * @see <a href="http://en.wikipedia.org/wiki/NYSIIS">NYSIIS on Wikipedia</a>
  * @see <a href="http://www.dropby.com/NYSIIS.html">NYSIIS on dropby.com</a>
  * @see Soundex
@@ -94,7 +94,7 @@ public class Nysiis implements StringEnc
 
     /**
      * Tests if the given character is a vowel.
-     * 
+     *
      * @param c
      *            the character to test
      * @return {@code true} if the character is a vowel, {@code false} otherwise
@@ -106,7 +106,7 @@ public class Nysiis implements StringEnc
     /**
      * Transcodes the remaining parts of the String. The method operates on a sliding window, looking at 4 characters at
      * a time: [i-1, i, i+1, i+2].
-     * 
+     *
      * @param prev
      *            the previous character
      * @param curr

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/RefinedSoundex.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/RefinedSoundex.java?rev=1352268&r1=1352267&r2=1352268&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/RefinedSoundex.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/RefinedSoundex.java Wed Jun 20 19:04:08 2012
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -24,9 +24,9 @@ import org.apache.commons.codec.StringEn
  * Encodes a string into a Refined Soundex value. A refined soundex code is
  * optimized for spell checking words. Soundex method originally developed by
  * <CITE>Margaret Odell</CITE> and <CITE>Robert Russell</CITE>.
- * 
+ *
  * <p>This class is immutable and thread-safe.</p>
- * 
+ *
  * @version $Id$
  */
 public class RefinedSoundex implements StringEncoder {
@@ -68,7 +68,7 @@ public class RefinedSoundex implements S
      * Creates a refined soundex instance using a custom mapping. This
      * constructor can be used to customize the mapping, and/or possibly
      * provide an internationalized mapping for a non-Western character set.
-     * 
+     *
      * @param mapping
      *                  Mapping array to use when finding the corresponding code for
      *                  a given character
@@ -81,7 +81,7 @@ public class RefinedSoundex implements S
     /**
      * Creates a refined Soundex instance using a custom mapping. This constructor can be used to customize the mapping,
      * and/or possibly provide an internationalized mapping for a non-Western character set.
-     * 
+     *
      * @param mapping
      *            Mapping string to use when finding the corresponding code for a given character
      * @since 1.4
@@ -96,18 +96,18 @@ public class RefinedSoundex implements S
      * encoded String: 0 indicates little or no similarity, and 4 out of 4 (for
      * example) indicates strong similarity or identical values. For refined
      * Soundex, the return value can be greater than 4.
-     * 
+     *
      * @param s1
      *                  A String that will be encoded and compared.
      * @param s2
      *                  A String that will be encoded and compared.
      * @return The number of characters in the two encoded Strings that are the
      *             same from 0 to to the length of the shortest encoded String.
-     * 
+     *
      * @see SoundexUtils#difference(StringEncoder,String,String)
      * @see <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_de-dz_8co5.asp">
      *          MS T-SQL DIFFERENCE</a>
-     * 
+     *
      * @throws EncoderException
      *                  if an error occurs encoding one of the strings
      * @since 1.3
@@ -121,7 +121,7 @@ public class RefinedSoundex implements S
      * provided in order to satisfy the requirements of the Encoder interface,
      * and will throw an EncoderException if the supplied object is not of type
      * java.lang.String.
-     * 
+     *
      * @param obj
      *                  Object to encode
      * @return An object (or type java.lang.String) containing the refined
@@ -139,7 +139,7 @@ public class RefinedSoundex implements S
 
     /**
      * Encodes a String using the refined soundex algorithm.
-     * 
+     *
      * @param str
      *                  A String object to encode
      * @return A Soundex code corresponding to the String supplied
@@ -153,7 +153,7 @@ public class RefinedSoundex implements S
      * Returns the mapping code for a given character. The mapping codes are
      * maintained in an internal char array named soundexMapping, and the
      * default values of these mappings are US English.
-     * 
+     *
      * @param c
      *                  char to get mapping for
      * @return A character (really a numeral) to return for the given char
@@ -167,7 +167,7 @@ public class RefinedSoundex implements S
 
     /**
      * Retrieves the Refined Soundex code for a given String object.
-     * 
+     *
      * @param str
      *                  String to encode using the Refined Soundex algorithm
      * @return A soundex code for the String supplied

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Soundex.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Soundex.java?rev=1352268&r1=1352267&r2=1352268&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Soundex.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/Soundex.java Wed Jun 20 19:04:08 2012
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,10 +23,10 @@ import org.apache.commons.codec.StringEn
 /**
  * Encodes a string into a Soundex value. Soundex is an encoding used to relate similar names, but can also be used as a
  * general purpose scheme to find word with similar phonemes.
- * 
+ *
  * This class is thread-safe.
  * Although not strictly immutable, the {@link #maxLength} field is not actually used.
- * 
+ *
  * @version $Id$
  */
 public class Soundex implements StringEncoder {
@@ -38,7 +38,7 @@ public class Soundex implements StringEn
      * (This constant is provided as both an implementation convenience and to allow Javadoc to pick
      * up the value for the constant values page.)
      * </p>
-     * 
+     *
      * @see #US_ENGLISH_MAPPING
      */
     public static final String US_ENGLISH_MAPPING_STRING = "01230120022455012623010202";
@@ -46,21 +46,21 @@ public class Soundex implements StringEn
     /**
      * This is a default mapping of the 26 letters used in US English. A value of <code>0</code> for a letter position
      * means do not encode.
-     * 
+     *
      * @see Soundex#Soundex(char[])
      */
     private static final char[] US_ENGLISH_MAPPING = US_ENGLISH_MAPPING_STRING.toCharArray();
 
     /**
      * An instance of Soundex using the US_ENGLISH_MAPPING mapping.
-     * 
+     *
      * @see #US_ENGLISH_MAPPING
      */
     public static final Soundex US_ENGLISH = new Soundex();
 
     /**
      * The maximum length of a Soundex code - Soundex codes are only four characters by definition.
-     * 
+     *
      * @deprecated This feature is not needed since the encoding size must be constant. Will be removed in 2.0.
      */
     @Deprecated
@@ -74,7 +74,7 @@ public class Soundex implements StringEn
 
     /**
      * Creates an instance using US_ENGLISH_MAPPING
-     * 
+     *
      * @see Soundex#Soundex(char[])
      * @see Soundex#US_ENGLISH_MAPPING
      */
@@ -85,10 +85,10 @@ public class Soundex implements StringEn
     /**
      * Creates a soundex instance using the given mapping. This constructor can be used to provide an internationalized
      * mapping for a non-Western character set.
-     * 
+     *
      * Every letter of the alphabet is "mapped" to a numerical value. This char array holds the values to which each
      * letter is mapped. This implementation contains a default map for US_ENGLISH
-     * 
+     *
      * @param mapping
      *                  Mapping array to use when finding the corresponding code for a given character
      */
@@ -100,7 +100,7 @@ public class Soundex implements StringEn
     /**
      * Creates a refined soundex instance using a custom mapping. This constructor can be used to customize the mapping,
      * and/or possibly provide an internationalized mapping for a non-Western character set.
-     * 
+     *
      * @param mapping
      *            Mapping string to use when finding the corresponding code for a given character
      * @since 1.4
@@ -113,17 +113,17 @@ public class Soundex implements StringEn
      * Encodes the Strings and returns the number of characters in the two encoded Strings that are the same. This
      * return value ranges from 0 through 4: 0 indicates little or no similarity, and 4 indicates strong similarity or
      * identical values.
-     * 
+     *
      * @param s1
      *                  A String that will be encoded and compared.
      * @param s2
      *                  A String that will be encoded and compared.
      * @return The number of characters in the two encoded Strings that are the same from 0 to 4.
-     * 
+     *
      * @see SoundexUtils#difference(StringEncoder,String,String)
      * @see <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_de-dz_8co5.asp"> MS
      *          T-SQL DIFFERENCE </a>
-     * 
+     *
      * @throws EncoderException
      *                  if an error occurs encoding one of the strings
      * @since 1.3
@@ -135,7 +135,7 @@ public class Soundex implements StringEn
     /**
      * Encodes an Object using the soundex algorithm. This method is provided in order to satisfy the requirements of
      * the Encoder interface, and will throw an EncoderException if the supplied object is not of type java.lang.String.
-     * 
+     *
      * @param obj
      *                  Object to encode
      * @return An object (or type java.lang.String) containing the soundex code which corresponds to the String
@@ -155,7 +155,7 @@ public class Soundex implements StringEn
 
     /**
      * Encodes a String using the soundex algorithm.
-     * 
+     *
      * @param str
      *                  A String object to encode
      * @return A Soundex code corresponding to the String supplied
@@ -169,9 +169,9 @@ public class Soundex implements StringEn
 
     /**
      * Used internally by the SoundEx algorithm.
-     * 
+     *
      * Consonants from the same code group separated by W or H are treated as one.
-     * 
+     *
      * @param str
      *                  the cleaned working string to encode (in upper case).
      * @param index
@@ -199,7 +199,7 @@ public class Soundex implements StringEn
 
     /**
      * Returns the maxLength. Standard Soundex
-     * 
+     *
      * @deprecated This feature is not needed since the encoding size must be constant. Will be removed in 2.0.
      * @return int
      */
@@ -210,7 +210,7 @@ public class Soundex implements StringEn
 
     /**
      * Returns the soundex mapping.
-     * 
+     *
      * @return soundexMapping.
      */
     private char[] getSoundexMapping() {
@@ -219,7 +219,7 @@ public class Soundex implements StringEn
 
     /**
      * Maps the given upper-case character to its Soundex code.
-     * 
+     *
      * @param ch
      *                  An upper-case character.
      * @return A Soundex code.
@@ -236,7 +236,7 @@ public class Soundex implements StringEn
 
     /**
      * Sets the maxLength.
-     * 
+     *
      * @deprecated This feature is not needed since the encoding size must be constant. Will be removed in 2.0.
      * @param maxLength
      *                  The maxLength to set
@@ -245,10 +245,10 @@ public class Soundex implements StringEn
     public void setMaxLength(int maxLength) {
         this.maxLength = maxLength;
     }
-    
+
     /**
      * Retrieves the Soundex code for a given String object.
-     * 
+     *
      * @param str
      *                  String to encode using the Soundex algorithm
      * @return A soundex code for the String supplied

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/SoundexUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/SoundexUtils.java?rev=1352268&r1=1352267&r2=1352268&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/SoundexUtils.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/SoundexUtils.java Wed Jun 20 19:04:08 2012
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,9 +22,9 @@ import org.apache.commons.codec.StringEn
 
 /**
  * Utility methods for {@link Soundex} and {@link RefinedSoundex} classes.
- * 
+ *
  * <p>This class is immutable and thread-safe.</p>
- * 
+ *
  * @version $Id$
  * @since 1.3
  */
@@ -33,7 +33,7 @@ final class SoundexUtils {
     /**
      * Cleans up the input string before Soundex processing by only returning
      * upper case letters.
-     * 
+     *
      * @param str
      *                  The String to clean.
      * @return A clean String.
@@ -65,7 +65,7 @@ final class SoundexUtils {
      * values.</li>
      * <li>For refined Soundex, the return value can be greater than 4.</li>
      * </ul>
-     * 
+     *
      * @param encoder
      *                  The encoder to use to encode the Strings.
      * @param s1
@@ -74,11 +74,11 @@ final class SoundexUtils {
      *                  A String that will be encoded and compared.
      * @return The number of characters in the two Soundex encoded Strings that
      *             are the same.
-     * 
+     *
      * @see #differenceEncoded(String,String)
      * @see <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_de-dz_8co5.asp">
      *          MS T-SQL DIFFERENCE</a>
-     * 
+     *
      * @throws EncoderException
      *                  if an error occurs encoding one of the strings
      */
@@ -95,14 +95,14 @@ final class SoundexUtils {
      * values.</li>
      * <li>For refined Soundex, the return value can be greater than 4.</li>
      * </ul>
-     * 
+     *
      * @param es1
      *                  An encoded String.
      * @param es2
      *                  An encoded String.
      * @return The number of characters in the two Soundex encoded Strings that
      *             are the same.
-     * 
+     *
      * @see <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_de-dz_8co5.asp">
      *          MS T-SQL DIFFERENCE</a>
      */

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/BeiderMorseEncoder.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/BeiderMorseEncoder.java?rev=1352268&r1=1352267&r2=1352268&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/BeiderMorseEncoder.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/BeiderMorseEncoder.java Wed Jun 20 19:04:08 2012
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -73,7 +73,7 @@ import org.apache.commons.codec.StringEn
  * Down-stream applications may wish to further process the encoding for indexing or lookup purposes, for example, by
  * splitting on pipe (<code>|</code>) and indexing under each of these alternatives.
  * </p>
- * 
+ *
  * @since 1.6
  */
 public class BeiderMorseEncoder implements StringEncoder {

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Lang.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Lang.java?rev=1352268&r1=1352267&r2=1352268&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Lang.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Lang.java Wed Jun 20 19:04:08 2012
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -66,7 +66,7 @@ import java.util.regex.Pattern;
  * </ul>
  * <p/>
  * Port of lang.php
- * 
+ *
  * @since 1.6
  */
 public class Lang {
@@ -106,7 +106,7 @@ public class Lang {
 
     /**
      * Gets a Lang instance for one of the supported NameTypes.
-     * 
+     *
      * @param nameType
      *            the NameType to look up
      * @return a Lang encapsulating the language guessing rules for that name type
@@ -123,7 +123,7 @@ public class Lang {
      * In normal use, you will obtain instances of Lang through the {@link #instance(NameType)} method. You will only need to call this
      * yourself if you are developing custom language mapping rules.
      * </p>
-     * 
+     *
      * @param languageRulesResourceName
      *            the fully-qualified resource name to load
      * @param languages
@@ -200,7 +200,7 @@ public class Lang {
 
     /**
      * Guesses the language of a word.
-     * 
+     *
      * @param text
      *            the word
      * @return the language that the word originates from or {@link Languages#ANY} if there was no unique match
@@ -212,7 +212,7 @@ public class Lang {
 
     /**
      * Guesses the languages of a word.
-     * 
+     *
      * @param input
      *            the word
      * @return a Set of Strings of language names that are potential matches for the input word

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Languages.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Languages.java?rev=1352268&r1=1352267&r2=1352268&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Languages.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Languages.java Wed Jun 20 19:04:08 2012
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -48,9 +48,9 @@ import java.util.Set;
  * <p>
  * Ported from language.php
  * </p>
- * 
+ *
  * @since 1.6
- * 
+ *
  * <p>This class is immutable and thread-safe.</p>
  */
 public class Languages {

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/NameType.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/NameType.java?rev=1352268&r1=1352267&r2=1352268&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/NameType.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/NameType.java Wed Jun 20 19:04:08 2012
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,7 +21,7 @@ package org.apache.commons.codec.languag
  * Supported types of names. Unless you are matching particular family names, use {@link #GENERIC}. The
  * <code>GENERIC</code> NameType should work reasonably well for non-name words. The other encodings are specifically
  * tuned to family names, and may not work well at all for general text.
- * 
+ *
  * @since 1.6
  */
 public enum NameType {
@@ -43,7 +43,7 @@ public enum NameType {
 
     /**
      * Gets the short version of the name type.
-     * 
+     *
      * @return the NameType short string
      */
     public String getName() {

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/PhoneticEngine.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/PhoneticEngine.java?rev=1352268&r1=1352267&r2=1352268&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/PhoneticEngine.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/PhoneticEngine.java Wed Jun 20 19:04:08 2012
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -46,7 +46,7 @@ import java.util.TreeSet;
  * <p>
  * Ported from phoneticengine.php
  * </p>
- * 
+ *
  * @since 1.6
  */
 public class PhoneticEngine {
@@ -399,7 +399,7 @@ public class PhoneticEngine {
 
     /**
      * Encodes a string to its phonetic representation.
-     * 
+     *
      * @param input
      *            the String to encode
      * @return the encoding of the input
@@ -411,7 +411,7 @@ public class PhoneticEngine {
 
     /**
      * Encodes an input string into an output phonetic representation, given a set of possible origin languages.
-     * 
+     *
      * @param input
      *            String to phoneticise; a String with dashes or spaces separating each word
      * @param languageSet
@@ -510,7 +510,7 @@ public class PhoneticEngine {
 
     /**
      * Gets the Lang language guessing rules being used.
-     * 
+     *
      * @return the Lang in use
      */
     public Lang getLang() {
@@ -519,7 +519,7 @@ public class PhoneticEngine {
 
     /**
      * Gets the NameType being used.
-     * 
+     *
      * @return the NameType in use
      */
     public NameType getNameType() {
@@ -528,7 +528,7 @@ public class PhoneticEngine {
 
     /**
      * Gets the RuleType being used.
-     * 
+     *
      * @return the RuleType in use
      */
     public RuleType getRuleType() {
@@ -537,7 +537,7 @@ public class PhoneticEngine {
 
     /**
      * Gets if multiple phonetic encodings are concatenated or if just the first one is kept.
-     * 
+     *
      * @return true if multiple phonetic encodings are returned, false if just the first is.
      */
     public boolean isConcat() {

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/ResourceConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/ResourceConstants.java?rev=1352268&r1=1352267&r2=1352268&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/ResourceConstants.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/ResourceConstants.java Wed Jun 20 19:04:08 2012
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,9 +21,9 @@ import org.apache.commons.codec.CharEnco
 
 /**
  * Constants used to process resource files.
- * 
+ *
  * <p>This class is immutable and thread-safe.</p>
- * 
+ *
  * @since 1.6
  */
 class ResourceConstants {

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Rule.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Rule.java?rev=1352268&r1=1352267&r2=1352268&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Rule.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/Rule.java Wed Jun 20 19:04:08 2012
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -75,7 +75,7 @@ import java.util.regex.Pattern;
  * <li><b>Blank lines:</b> All blank lines will be skipped.</li>
  * </ul>
  * </p>
- * 
+ *
  * @since 1.6
  */
 public class Rule {
@@ -247,7 +247,7 @@ public class Rule {
 
     /**
      * Gets rules for a combination of name type, rule type and languages.
-     * 
+     *
      * @param nameType
      *            the NameType to consider
      * @param rt
@@ -262,7 +262,7 @@ public class Rule {
 
     /**
      * Gets rules for a combination of name type, rule type and a single language.
-     * 
+     *
      * @param nameType
      *            the NameType to consider
      * @param rt
@@ -400,7 +400,7 @@ public class Rule {
 
     /**
      * Attempts to compile the regex into direct string ops, falling back to Pattern and Matcher in the worst case.
-     * 
+     *
      * @param regex
      *            the regular expression to compile
      * @return an RPattern that will match this regex
@@ -540,7 +540,7 @@ public class Rule {
 
     /**
      * Creates a new rule.
-     * 
+     *
      * @param pattern
      *            the pattern
      * @param lContext
@@ -559,7 +559,7 @@ public class Rule {
 
     /**
      * Gets the left context. This is a regular expression that must match to the left of the pattern.
-     * 
+     *
      * @return the left context Pattern
      */
     public RPattern getLContext() {
@@ -568,7 +568,7 @@ public class Rule {
 
     /**
      * Gets the pattern. This is a string-literal that must exactly match.
-     * 
+     *
      * @return the pattern
      */
     public String getPattern() {
@@ -577,7 +577,7 @@ public class Rule {
 
     /**
      * Gets the phoneme. If the rule matches, this is the phoneme associated with the pattern match.
-     * 
+     *
      * @return the phoneme
      */
     public PhonemeExpr getPhoneme() {
@@ -586,7 +586,7 @@ public class Rule {
 
     /**
      * Gets the right context. This is a regular expression that must match to the right of the pattern.
-     * 
+     *
      * @return the right context Pattern
      */
     public RPattern getRContext() {
@@ -597,7 +597,7 @@ public class Rule {
      * Decides if the pattern and context match the input starting at a position. It is a match if the
      * <code>lContext</code> matches <code>input</code> up to <code>i</code>, <code>pattern</code> matches at i and
      * <code>rContext</code> matches from the end of the match of <code>pattern</code> to the end of <code>input</code>.
-     * 
+     *
      * @param input
      *            the input String
      * @param i

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/RuleType.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/RuleType.java?rev=1352268&r1=1352267&r2=1352268&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/RuleType.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/bm/RuleType.java Wed Jun 20 19:04:08 2012
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,7 +19,7 @@ package org.apache.commons.codec.languag
 
 /**
  * Types of rule.
- * 
+ *
  * @since 1.6
  */
 public enum RuleType {

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/BCodec.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/BCodec.java?rev=1352268&r1=1352267&r2=1352268&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/BCodec.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/net/BCodec.java Wed Jun 20 19:04:08 2012
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -33,18 +33,18 @@ import org.apache.commons.codec.binary.B
  * Identical to the Base64 encoding defined by <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC
  * 1521</a> and allows a character set to be specified.
  * </p>
- * 
+ *
  * <p>
  * <a href="http://www.ietf.org/rfc/rfc1522.txt">RFC 1522</a> describes techniques to allow the encoding of non-ASCII
  * text in various portions of a RFC 822 [2] message header, in a manner which is unlikely to confuse existing message
  * handling software.
  * </p>
- * 
+ *
  * <p>This class is immutable and thread-safe.</p>
- * 
+ *
  * @see <a href="http://www.ietf.org/rfc/rfc1522.txt">MIME (Multipurpose Internet Mail Extensions) Part Two: Message
  *          Header Extensions for Non-ASCII Text</a>
- * 
+ *
  * @since 1.3
  * @version $Id$
  */
@@ -63,10 +63,10 @@ public class BCodec extends RFC1522Codec
 
     /**
      * Constructor which allows for the selection of a default charset
-     * 
+     *
      * @param charset
      *                  the default string charset to use.
-     * 
+     *
      * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
      * @since 1.7
      */
@@ -76,7 +76,7 @@ public class BCodec extends RFC1522Codec
 
     /**
      * Constructor which allows for the selection of a default charset
-     * 
+     *
      * @param charsetName
      *                  the default charset to use.
      * @throws UnsupportedCharsetException
@@ -111,13 +111,13 @@ public class BCodec extends RFC1522Codec
 
     /**
      * Encodes a string into its Base64 form using the specified charset. Unsafe characters are escaped.
-     * 
+     *
      * @param value
      *                  string to convert to Base64 form
      * @param charset
      *                  the charset for <code>value</code>
      * @return Base64 string
-     * 
+     *
      * @throws EncoderException
      *                  thrown if a failure condition is encountered during the encoding process.
      * @since 1.7
@@ -131,13 +131,13 @@ public class BCodec extends RFC1522Codec
 
     /**
      * Encodes a string into its Base64 form using the specified charset. Unsafe characters are escaped.
-     * 
+     *
      * @param value
      *                  string to convert to Base64 form
      * @param charset
      *                  the charset for <code>value</code>
      * @return Base64 string
-     * 
+     *
      * @throws EncoderException
      *                  thrown if a failure condition is encountered during the encoding process.
      */
@@ -154,11 +154,11 @@ public class BCodec extends RFC1522Codec
 
     /**
      * Encodes a string into its Base64 form using the default charset. Unsafe characters are escaped.
-     * 
+     *
      * @param value
      *                  string to convert to Base64 form
      * @return Base64 string
-     * 
+     *
      * @throws EncoderException
      *                  thrown if a failure condition is encountered during the encoding process.
      */
@@ -173,7 +173,7 @@ public class BCodec extends RFC1522Codec
     /**
      * Decodes a Base64 string into its original form. Escaped characters are converted back to their original
      * representation.
-     * 
+     *
      * @param value
      *            Base64 string to convert into its original form
      * @return original string
@@ -194,11 +194,11 @@ public class BCodec extends RFC1522Codec
 
     /**
      * Encodes an object into its Base64 form using the default charset. Unsafe characters are escaped.
-     * 
+     *
      * @param value
      *                  object to convert to Base64 form
      * @return Base64 object
-     * 
+     *
      * @throws EncoderException
      *                  thrown if a failure condition is encountered during the encoding process.
      */
@@ -218,12 +218,12 @@ public class BCodec extends RFC1522Codec
     /**
      * Decodes a Base64 object into its original form. Escaped characters are converted back to their original
      * representation.
-     * 
+     *
      * @param value
      *                  Base64 object to convert into its original form
-     * 
+     *
      * @return original object
-     * 
+     *
      * @throws DecoderException
      *                  Thrown if the argument is not a <code>String</code>. Thrown if a failure condition is
      *                  encountered during the decode process.
@@ -243,7 +243,7 @@ public class BCodec extends RFC1522Codec
 
     /**
      * Gets the default charset name used for string decoding and encoding.
-     * 
+     *
      * @return the default charset name
      * @since 1.7
      */
@@ -253,7 +253,7 @@ public class BCodec extends RFC1522Codec
 
     /**
      * Gets the default charset name used for string decoding and encoding.
-     * 
+     *
      * @return the default charset name
      */
     public String getDefaultCharset() {