src/share/classes/com/sun/jndi/ldap/LdapResult.java

Print this page

        

@@ -26,23 +26,25 @@
 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 referrals = null;
+    // Vector<String | Vector<String>>
+    Vector<Object> referrals = null;
     LdapReferralException refEx = null;
-    Vector entries = null;
-    Vector resControls = 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,20 +57,20 @@
         boolean successful = false;
 
         switch (status) {
             case LdapClient.LDAP_COMPARE_TRUE:
                 status = LdapClient.LDAP_SUCCESS;
-                entries = new Vector(1,1);
+                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);
+                entries = new Vector<>(0);
                 successful = true;
                 break;
 
             default:
                 successful = false;