< prev index next >

test/jdk/com/sun/jndi/ldap/blits/AddTests/AddNewEntry.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 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.

@@ -38,10 +38,11 @@
 import javax.naming.directory.BasicAttribute;
 import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.InitialDirContext;
 import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
 import java.net.ServerSocket;
 import java.util.Hashtable;
 
 public class AddNewEntry {
 

@@ -97,11 +98,11 @@
 
             // specify base search
             SearchControls constraints = new SearchControls();
             constraints.setSearchScope(SearchControls.OBJECT_SCOPE);
 
-            NamingEnumeration results = ctx
+            NamingEnumeration<SearchResult> results = ctx
                     .search(entryDN, "(objectclass=*)", constraints);
 
             int found = LDAPTestUtils.checkResult(results, expect);
 
             if (found != 1) {
< prev index next >