< prev index next >
test/jdk/javax/naming/ldap/LdapName/LdapNameConstruction.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -64,11 +64,11 @@
System.out.println("rdn5:" + rdn5.toString());
/**
* LdapName creation tests
*/
- List rdns = new ArrayList();
+ List<Rdn> rdns = new ArrayList<>();
rdns.add(new Rdn("o=Food"));
rdns.add(new Rdn("ou=Fruits"));
rdns.add(rdn3);
LdapName name1 = new LdapName(rdns);
System.out.println("ldapname1:" + name1.toString());
@@ -80,9 +80,9 @@
if (!name2.equals(name1)) {
throw new Exception("ldapname1 does not equals ldapname2");
}
System.out.println("ldapname1 and ldapname2 are equal");
- LdapName name = new LdapName(new ArrayList());
+ LdapName name = new LdapName(new ArrayList<>());
System.out.println("Empty ldapname:" + name);
}
}
< prev index next >