You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2015/06/13 14:13:37 UTC

svn commit: r1685243 - /commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/DomainValidatorTest.java

Author: sebb
Date: Sat Jun 13 12:13:36 2015
New Revision: 1685243

URL: http://svn.apache.org/r1685243
Log:
List HTML entries not found in ASCII database

Modified:
    commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/DomainValidatorTest.java

Modified: commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/DomainValidatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/DomainValidatorTest.java?rev=1685243&r1=1685242&r2=1685243&view=diff
==============================================================================
--- commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/DomainValidatorTest.java (original)
+++ commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/DomainValidatorTest.java Sat Jun 13 12:13:36 2015
@@ -361,6 +361,12 @@ public class DomainValidatorTest extends
             }
         }
         br.close();
+        // List html entries not in TLD text list
+        for(String key : (new TreeMap<String, String[]>(htmlInfo)).keySet()) {
+            if (!ianaTlds.contains(key)) {
+                System.err.println("Expected to find text entry for html: "+key);
+            }
+        }
         if (!missingTLD.isEmpty()) {
             printMap(header, missingTLD, "TLD");
         }
@@ -426,8 +432,13 @@ public class DomainValidatorTest extends
                     if (n.lookingAt()) {
                         com = n.group(1);
                     }
-                    info.put(dom.toLowerCase(Locale.ENGLISH), new String[]{typ, com});
-//                    System.out.println(dom + " " + typ + " " +com);
+                    // Don't save unused entries
+                    if (com.contains("Not assigned") || com.contains("Retired") || typ.equals("test")) {
+//                        System.out.println(dom + " " + typ + " " +com);
+                    } else {
+                        info.put(dom.toLowerCase(Locale.ENGLISH), new String[]{typ, com});
+//                        System.out.println(dom + " " + typ + " " +com);
+                    }
                 }
             }
         }