Skip to content

Commit 92aa85a

Browse files
author
stoecker
committed
readd the country code TLDs in the correct section
git-svn-id: https://josm.openstreetmap.de/svn/trunk@19351 0c6e7542-c601-0410-84e7-c038aed88b3b
1 parent 2c07107 commit 92aa85a

File tree

2 files changed

+34
-5
lines changed

2 files changed

+34
-5
lines changed

src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java

+17-3
Original file line numberDiff line numberDiff line change
@@ -1681,11 +1681,16 @@ private static String chompLeadingDot(String str) {
16811681
"vu", // Vanuatu
16821682
"wf", // Wallis and Futuna
16831683
"ws", // Samoa (formerly Western Samoa)
1684+
"xn--2scrj9c", // ಭಾರತ National Internet eXchange of India
16841685
"xn--3e0b707e", // 한국 KISA (Korea Internet & Security Agency)
1686+
"xn--3hcrj9c", // ଭାରତ National Internet eXchange of India
1687+
"xn--45br5cyl", // ভাৰত National Internet eXchange of India
16851688
"xn--45brj9c", // ভারত National Internet Exchange of India
1689+
"xn--54b7fta0cc", // বাং Posts and Telecommunications Division
16861690
"xn--80ao21a", // қаз Association of IT Companies of Kazakhstan
16871691
"xn--90a3ac", // срб Serbian National Internet Domain Registry (RNIDS)
1688-
"xn--90ais", // ??? Reliable Software Inc.
1692+
"xn--90ae", // бг Imena.BG AD
1693+
"xn--90ais", // бел Reliable Software Inc.
16891694
"xn--clchc0ea0b2g2a9gcd", // சிங்கப்பூர் Singapore Network Information Centre (SGNIC) Pte Ltd
16901695
"xn--d1alf", // мкд Macedonian Academic Research Network Skopje
16911696
"xn--e1a4c", // ею EURid vzw/asbl
@@ -1694,6 +1699,8 @@ private static String chompLeadingDot(String str) {
16941699
"xn--fpcrj9c3d", // భారత్ National Internet Exchange of India
16951700
"xn--fzc2c9e2c", // ලංකා LK Domain Registry
16961701
"xn--gecrj9c", // ભારત National Internet Exchange of India
1702+
"xn--h2breg3eve", // भारतम् National Internet eXchange of India
1703+
"xn--h2brj9c8c", // भारोत National Internet eXchange of India
16971704
"xn--h2brj9c", // भारत National Internet Exchange of India
16981705
"xn--j1amh", // укр Ukrainian Network Information Centre (UANIC), Inc.
16991706
"xn--j6w193g", // 香港 Hong Kong Internet Registration Corporation Ltd.
@@ -1704,11 +1711,16 @@ private static String chompLeadingDot(String str) {
17041711
"xn--mgb9awbf", // عمان Telecommunications Regulatory Authority (TRA)
17051712
"xn--mgba3a4f16a", // ایران Institute for Research in Fundamental Sciences (IPM)
17061713
"xn--mgbaam7a8h", // امارات Telecommunications Regulatory Authority (TRA)
1714+
"xn--mgbah1a3hjkrd", // موريتانيا Université de Nouakchott Al Aasriya
1715+
"xn--mgbai9azgqp6j", // پاکستان National Telecommunication Corporation
17071716
"xn--mgbayh7gpa", // الاردن National Information Technology Center (NITC)
17081717
"xn--mgbbh1a71e", // بھارت National Internet Exchange of India
1718+
"xn--mgbbh1a", // بارت National Internet eXchange of India
17091719
"xn--mgbc0a9azcg", // المغرب Agence Nationale de Réglementation des Télécommunications (ANRT)
1720+
"xn--mgbcpq6gpa1a", // البحرين Telecommunications Regulatory Authority (TRA)
17101721
"xn--mgberp4a5d4ar", // السعودية Communications and Information Technology Commission
1711-
"xn--mgbpl2fh", // ????? Sudan Internet Society
1722+
"xn--mgbgu82a", // ڀارت National Internet eXchange of India
1723+
"xn--mgbpl2fh", // سودان Sudan Internet Society
17121724
"xn--mgbtx2b", // عراق Communications and Media Commission (CMC)
17131725
"xn--mgbx4cd0ab", // مليسيا MYNIC Berhad
17141726
"xn--mix891f", // 澳門 Bureau of Telecommunications Regulation (DSRT)
@@ -1717,13 +1729,15 @@ private static String chompLeadingDot(String str) {
17171729
"xn--ogbpf8fl", // سورية National Agency for Network Services (NANS)
17181730
"xn--p1ai", // рф Coordination Center for TLD RU
17191731
"xn--pgbs0dh", // تونس Agence Tunisienne d'Internet
1732+
"xn--q7ce6a", // ລາວ Lao National Internet Center (LANIC), Ministry of Technology and Communications
17201733
"xn--qxam", // ελ ICS-FORTH GR
1734+
"xn--rvc1e0am3e", // ഭാരതം National Internet eXchange of India
17211735
"xn--s9brj9c", // ਭਾਰਤ National Internet Exchange of India
17221736
"xn--wgbh1c", // مصر National Telecommunication Regulatory Authority - NTRA
17231737
"xn--wgbl6a", // قطر Communications Regulatory Authority
17241738
"xn--xkc2al3hye2a", // இலங்கை LK Domain Registry
17251739
"xn--xkc2dl3a5ee0h", // இந்தியா National Internet Exchange of India
1726-
"xn--y9a3aq", // ??? Internet Society
1740+
"xn--y9a3aq", // հայ Internet Society
17271741
"xn--yfro4i67o", // 新加坡 Singapore Network Information Centre (SGNIC) Pte Ltd
17281742
"xn--ygbi2ammx", // فلسطين Ministry of Telecom & Information Technology (MTIT)
17291743
"ye", // Yemen

test/unit/org/openstreetmap/josm/data/validation/routines/DomainValidatorTestIT.java

+17-2
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ void testIanaTldList() throws Exception {
109109
Map<String, String[]> htmlInfo = getHtmlInfo(htmlFile);
110110
Map<String, String> missingTLD = new TreeMap<>(); // stores entry and comments as String[]
111111
Map<String, String> missingCC = new TreeMap<>();
112+
Map<String, String> allTLD = new TreeMap<>(); // stores entry and comments as String[]
113+
Map<String, String> allCC = new TreeMap<>(); // stores entry and comments as String[]
112114
while ((line = br.readLine()) != null) {
113115
if (!line.startsWith("#")) {
114116
final String unicodeTld; // only different from asciiTld if that was punycode
@@ -120,9 +122,20 @@ void testIanaTldList() throws Exception {
120122
}
121123
if (!dv.isValidTld(asciiTld)) {
122124
String[] info = htmlInfo.get(asciiTld);
125+
String type = info[0];
126+
String comment = info[1];
127+
if ("country-code".equals(type)) { // Which list to use?
128+
allCC.put(asciiTld, unicodeTld + " " + comment);
129+
if (generateUnicodeTlds) {
130+
allCC.put(unicodeTld, asciiTld + " " + comment);
131+
}
132+
} else {
133+
allTLD.put(asciiTld, unicodeTld + " " + comment);
134+
if (generateUnicodeTlds) {
135+
allTLD.put(unicodeTld, asciiTld + " " + comment);
136+
}
137+
}
123138
if (info != null) {
124-
String type = info[0];
125-
String comment = info[1];
126139
if ("country-code".equals(type)) { // Which list to use?
127140
missingCC.put(asciiTld, unicodeTld + " " + comment);
128141
if (generateUnicodeTlds) {
@@ -157,6 +170,8 @@ void testIanaTldList() throws Exception {
157170
}
158171
}
159172
}
173+
printMap(header, allTLD, "allTLD");
174+
printMap(header, allCC, "allCC");
160175
if (!missingTLD.isEmpty()) {
161176
printMap(header, missingTLD, "TLD");
162177
fail("missing TLD");

0 commit comments

Comments
 (0)