src/share/classes/com/sun/jndi/ldap/LdapResult.java
Print this page
*** 26,48 ****
package com.sun.jndi.ldap;
import java.util.Vector;
import javax.naming.directory.Attributes;
import javax.naming.directory.BasicAttributes;
/**
* %%% public for use by LdapSasl %%%
*/
public final class LdapResult {
int msgId;
public int status; // %%% public for use by LdapSasl
String matchedDN;
String errorMessage;
! Vector referrals = null;
LdapReferralException refEx = null;
! Vector entries = null;
! Vector resControls = null;
public byte[] serverCreds = null; // %%% public for use by LdapSasl
String extensionId = null; // string OID
byte[] extensionValue = null; // BER OCTET STRING
--- 26,50 ----
package com.sun.jndi.ldap;
import java.util.Vector;
import javax.naming.directory.Attributes;
import javax.naming.directory.BasicAttributes;
+ import javax.naming.ldap.Control;
/**
* %%% public for use by LdapSasl %%%
*/
public final class LdapResult {
int msgId;
public int status; // %%% public for use by LdapSasl
String matchedDN;
String errorMessage;
! // Vector<String | Vector<String>>
! Vector<Object> referrals = null;
LdapReferralException refEx = null;
! Vector<LdapEntry> entries = null;
! Vector<Control> resControls = null;
public byte[] serverCreds = null; // %%% public for use by LdapSasl
String extensionId = null; // string OID
byte[] extensionValue = null; // BER OCTET STRING
*** 55,74 ****
boolean successful = false;
switch (status) {
case LdapClient.LDAP_COMPARE_TRUE:
status = LdapClient.LDAP_SUCCESS;
! entries = new Vector(1,1);
Attributes attrs = new BasicAttributes(LdapClient.caseIgnore);
LdapEntry entry = new LdapEntry( name, attrs );
entries.addElement(entry);
successful = true;
break;
case LdapClient.LDAP_COMPARE_FALSE:
status = LdapClient.LDAP_SUCCESS;
! entries = new Vector(0);
successful = true;
break;
default:
successful = false;
--- 57,76 ----
boolean successful = false;
switch (status) {
case LdapClient.LDAP_COMPARE_TRUE:
status = LdapClient.LDAP_SUCCESS;
! entries = new Vector<>(1,1);
Attributes attrs = new BasicAttributes(LdapClient.caseIgnore);
LdapEntry entry = new LdapEntry( name, attrs );
entries.addElement(entry);
successful = true;
break;
case LdapClient.LDAP_COMPARE_FALSE:
status = LdapClient.LDAP_SUCCESS;
! entries = new Vector<>(0);
successful = true;
break;
default:
successful = false;