jdk/test/sun/security/krb5/config/Duplicates.java
changeset 25151 7a670121602e
parent 14327 c0d86f6f8be8
child 30820 0d4717a011d3
--- a/jdk/test/sun/security/krb5/config/Duplicates.java	Thu Jun 19 13:12:08 2014 -0700
+++ b/jdk/test/sun/security/krb5/config/Duplicates.java	Fri Jun 20 10:27:10 2014 +0800
@@ -38,22 +38,22 @@
         config.listTable();
         String s;
 
-        // Latter overwrites former for root section
+        // root section merged
         s = config.get("libdefaults", "default_realm");
-        if (s != null) {
+        if (!s.equals("R1")) {
             throw new Exception();
         }
-        // Latter overwrites former for strings
+        // Former is preferred to latter for strings and sections
         s = config.get("libdefaults", "default_tkt_enctypes");
-        if (!s.equals("aes256-cts")) {
+        if (!s.equals("aes128-cts")) {
             throw new Exception();
         }
-        // Latter overwrites former for sub-section
         s = config.get("realms", "R1", "kdc");
-        if (!s.equals("k2")) {
+        if (!s.equals("k1")) {
             throw new Exception(s);
         }
-        // Duplicate keys in [realms] are merged
+        // Duplicate keys in [realms] are merged, and sections with the same
+        // name in between ignored
         s = config.getAll("realms", "R2", "kdc");
         if (!s.equals("k1 k2 k3 k4")) {
             throw new Exception(s);