< prev index next >
test/jdk/com/sun/jndi/ldap/blits/AddTests/AddNewEntry.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2018, 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.
--- 1,7 ----
/*
! * 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,47 ****
--- 38,48 ----
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,107 ****
// specify base search
SearchControls constraints = new SearchControls();
constraints.setSearchScope(SearchControls.OBJECT_SCOPE);
! NamingEnumeration results = ctx
.search(entryDN, "(objectclass=*)", constraints);
int found = LDAPTestUtils.checkResult(results, expect);
if (found != 1) {
--- 98,108 ----
// specify base search
SearchControls constraints = new SearchControls();
constraints.setSearchScope(SearchControls.OBJECT_SCOPE);
! NamingEnumeration<SearchResult> results = ctx
.search(entryDN, "(objectclass=*)", constraints);
int found = LDAPTestUtils.checkResult(results, expect);
if (found != 1) {
< prev index next >