From 83bbd931efa9e99f10ee46bc42343c480fca96f8 Mon Sep 17 00:00:00 2001 From: Shane Carr Date: Fri, 23 Sep 2016 21:44:06 +0000 Subject: [PATCH] ICU-12549 Minor revisions to SpoofChecker comments and documentation. X-SVN-Rev: 39344 --- .../src/com/ibm/icu/text/SpoofChecker.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/SpoofChecker.java b/icu4j/main/classes/core/src/com/ibm/icu/text/SpoofChecker.java index ae64a91d20..9fceebf145 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/SpoofChecker.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/SpoofChecker.java @@ -81,9 +81,10 @@ import com.ibm.icu.util.ULocale; * application startup), and the more efficient {@link SpoofChecker#areConfusable} method can be used at runtime. * *

- * UTS 39 defines two strings to be confusable if they map to the same skeleton string. A skeleton can - * be thought of as a "hash code". {@link SpoofChecker#getSkeleton} computes the skeleton for a particular string, so - * the following snippet is equivalent to the example above: + * UTS 39 defines two strings to be confusable if they map to the same skeleton. A skeleton is a + * sequence of families of confusable characters, where each family has a single exemplar character. + * {@link SpoofChecker#getSkeleton} computes the skeleton for a particular string, so the following snippet is + * equivalent to the example above: * *

  * 
@@ -767,8 +768,8 @@ public class SpoofChecker {
         }
 
         /*
-         * ***************************************************************************** Internal classes for
-         * compililing confusable data into its binary (runtime) form.
+         * *****************************************************************************
+         * Internal classes for compililing confusable data into its binary (runtime) form.
          * *****************************************************************************
          */
         // ---------------------------------------------------------------------
@@ -783,6 +784,9 @@ public class SpoofChecker {
         //
         // 2. Sort all of the strings encountered by length, since they will need to
         // be stored in that order in the final string table.
+        // TODO: Sorting these strings by length is no longer needed since the removal of
+        // the string lengths table.  This logic can be removed to save processing time
+        // when building confusables data.
         //
         // 3. Build a list of keys (UChar32s) from the mapping table. Sort the
         // list because that will be the ordering of our runtime table.
@@ -1003,8 +1007,8 @@ public class SpoofChecker {
             }
 
             /*
-             * ***************************************************************************** Internal classes for
-             * compiling confusable data into its binary (runtime) form.
+             * *****************************************************************************
+             * Internal classes for compiling confusable data into its binary (runtime) form.
              * *****************************************************************************
              */
             // SPUString