37
37
* ***** END LICENSE BLOCK ***** */
38
38
package netscape.ldap;
39
39
40
- import java.util.* ;
41
- import netscape.ldap.client.* ;
42
- import netscape.ldap.client.opers.* ;
43
- import java.io.* ;
40
+ import java.io.IOException ;
41
+ import java.util.Hashtable ;
42
+ import java.util.Locale ;
43
+ import java.util.PropertyResourceBundle ;
44
44
45
45
/* *
46
46
* Indicates that an error has occurred. An <CODE>LDAPException</CODE>
139
139
* 95 <A HREF="#MORE_RESULTS_TO_RETURN">MORE_RESULTS_TO_RETURN</A>
140
140
* 96 <A HREF="#CLIENT_LOOP">CLIENT_LOOP</A>
141
141
* 97 <A HREF="#REFERRAL_LIMIT_EXCEEDED">REFERRAL_LIMIT_EXCEEDED</A>
142
- * 112 <A HREF="#TLS_NOT_SUPPORTED">TLS_NOT_SUPPORTED</A> (LDAP v3)
142
+ * 112 <A HREF="#TLS_NOT_SUPPORTED">TLS_NOT_SUPPORTED</A> (LDAP v3)
143
143
* </PRE>
144
144
* <P>
145
145
*
@@ -590,7 +590,7 @@ public class LDAPException extends java.lang.Exception
590
590
private String extraMessage = null;
591
591
private String matchedDN = null;
592
592
private Locale m_locale = Locale.getDefault();
593
- private static Hashtable cacheResource = new Hashtable();
593
+ private static Hashtable<String, PropertyResourceBundle> cacheResource = new Hashtable<> ();
594
594
private static final String baseName = " netscape/ldap/errors/ErrorCodes" ;
595
595
596
596
/* *
@@ -760,7 +760,7 @@ public int getLDAPResultCode () {
760
760
public String getLDAPErrorMessage () {
761
761
return errorMessage;
762
762
}
763
-
763
+
764
764
765
765
/* *
766
766
* Adds additional explanation to the error message
@@ -777,7 +777,7 @@ void setExtraMessage (String msg) {
777
777
/* *
778
778
* Returns the maximal subset of a DN which could be matched by the
779
779
* server.
780
- *
780
+ *
781
781
* The method should be used if the server returned one of the
782
782
* following errors:
783
783
* <UL>
@@ -925,7 +925,7 @@ public synchronized static String errorCodeToString(int code, Locale locale) {
925
925
try {
926
926
String localeStr = locale.toString ();
927
927
PropertyResourceBundle p =
928
- (PropertyResourceBundle) cacheResource.get (localeStr);
928
+ cacheResource.get (localeStr);
929
929
930
930
if (p == null) {
931
931
p = LDAPResourceBundle.getBundle (baseName);
0 commit comments