equal
deleted
inserted
replaced
20 * or visit www.oracle.com if you need additional information or have any |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 /* |
23 /* |
24 * @test |
24 * @test |
25 * @bug 6319046 |
25 * @bug 6319046 8055045 |
26 * @compile -XDignore.symbol.file ParseConfig.java |
26 * @compile -XDignore.symbol.file ParseConfig.java |
27 * @run main/othervm ParseConfig |
27 * @run main/othervm ParseConfig |
28 * @summary Problem with parsing krb5.conf |
28 * @summary Problem with parsing krb5.conf |
29 */ |
29 */ |
30 |
30 |
31 import sun.security.krb5.Config; |
31 import sun.security.krb5.Config; |
32 |
32 |
33 public class ParseConfig { |
33 public class ParseConfig { |
34 public static void main(String[] args) throws Exception { |
34 public static void main(String[] args) throws Exception { |
35 System.setProperty("java.security.krb5.conf", System.getProperty("test.src", ".") +"/krb5.conf"); |
35 System.setProperty("java.security.krb5.conf", |
|
36 System.getProperty("test.src", ".") + "/krb5.conf"); |
36 Config config = Config.getInstance(); |
37 Config config = Config.getInstance(); |
37 config.listTable(); |
38 config.listTable(); |
38 |
39 |
39 String sample = "kdc.example.com kdc2.example.com"; |
40 String sample = "kdc.example.com kdc2.example.com"; |
40 for ( int i = 0; i < 4; i++ ) { |
41 for ( int i = 0; i < 4; i++ ) { |
42 if (!sample.equals(expected)) { |
43 if (!sample.equals(expected)) { |
43 throw new Exception("krb5.conf: unexpected kdc value \"" + |
44 throw new Exception("krb5.conf: unexpected kdc value \"" + |
44 expected + "\""); |
45 expected + "\""); |
45 } |
46 } |
46 } |
47 } |
|
48 |
|
49 // JDK-8055045: IOOBE when reading an empty value |
|
50 config.get("empty1", "NOVAL.COM"); |
|
51 config.get("empty2", "NOVAL.COM"); |
|
52 config.get("quote1", "NOVAL.COM"); |
|
53 config.get("quote2", "NOVAL.COM"); |
47 } |
54 } |
48 } |
55 } |