directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject [directory-ldap-api] 02/03: Some more error/msg I18nalization
Date Sun, 17 Jun 2018 06:53:16 GMT
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-ldap-api.git

commit d1dee6d69ae29c63edfbbc2902796e5938f7e29f
Author: Emmanuel L├ęcharny <elecharny@symas.com>
AuthorDate: Sun Jun 17 08:49:36 2018 +0200

    Some more error/msg I18nalization
---
 i18n/src/main/java/org/apache/directory/api/i18n/I18n.java  | 13 +++++--------
 .../org/apache/directory/api/i18n/errors.properties         |  5 ++---
 .../directory/ldap/client/api/LdapNetworkConnection.java    |  4 ++--
 .../org/apache/directory/api/ldap/model/url/LdapUrl.java    |  2 +-
 4 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/i18n/src/main/java/org/apache/directory/api/i18n/I18n.java b/i18n/src/main/java/org/apache/directory/api/i18n/I18n.java
index 9450584..4c000e3 100644
--- a/i18n/src/main/java/org/apache/directory/api/i18n/I18n.java
+++ b/i18n/src/main/java/org/apache/directory/api/i18n/I18n.java
@@ -145,14 +145,10 @@ public enum I18n
     // dsml-engine
     ERR_03101_MISSING_CONNECTION_TO( "ERR_03101_MISSING_CONNECTION_TO" ),
     
-    // ldap-client
-
-    // ldap
-    ERR_04408( "ERR_04408" ),
-    ERR_04409( "ERR_04409" ),
-    
     // api-ldap-client-api   4000-4999
     // api-ldap-client-api <>            4000-4100
+    // None
+    
     // api-ldap-client-api api           4100-4200
     ERR_04100_UNABLE_TO_UNBIND( "ERR_04100_UNABLE_TO_UNBIND" ),
     ERR_04101_CANNOT_CREATE_LDAP_CONNECTION_FACTORY( "ERR_04101_CANNOT_CREATE_LDAP_CONNECTION_FACTORY"
),
@@ -165,7 +161,7 @@ public enum I18n
     ERR_04108_INVALID_CONNECTION( "ERR_04108_INVALID_CONNECTION" ),
     ERR_04109_CANNOT_CONNECT( "ERR_04109_CANNOT_CONNECT" ),
     ERR_04110_CANNOT_CONNECT_TO_SERVER( "ERR_04110_CANNOT_CONNECT_TO_SERVER" ),
-
+    ERR_04111_UNKNOWN_RESPONSE_FUTURE_TYPE( "ERR_04111_UNKNOWN_RESPONSE_FUTURE_TYPE" ),
     ERR_04112_OP_FAILED_TIMEOUT( "ERR_04112_OP_FAILED_TIMEOUT" ),
     ERR_04113_ERROR_PROCESSING_NOD( "ERR_04113_ERROR_PROCESSING_NOD" ),
     ERR_04114_CURSOR_CLOSE_FAIL( "ERR_04114_CURSOR_CLOSE_FAIL" ),
@@ -227,8 +223,8 @@ public enum I18n
     ERR_04170_TIMEOUT_OCCURED( "ERR_04170_TIMEOUT_OCCURED" ),
     ERR_04171_CANNOT_PARSE_MATCHED_DN( "ERR_04171_CANNOT_PARSE_MATCHED_DN" ),
 
-
     // api-ldap-client-api template      4200-4300
+    // None
     
     // api-ldap-codec-core   5000-5999
     // api-ldap-codec-core <>        5000-5099
@@ -462,6 +458,7 @@ public enum I18n
     ERR_13038_INVALID_EXTENSIONS( "ERR_13038_INVALID_EXTENSIONS" ),
     ERR_13039_INVALID_CHAR_AT_LDAP_URL_END( "ERR_13039_INVALID_CHAR_AT_LDAP_URL_END" ),
     ERR_13040_INVALID_URL_ENCODING( "ERR_13040_INVALID_URL_ENCODING" ),
+    ERR_13041_INVALID_LDAP_URL_EMPTY_STRING( "ERR_13041_INVALID_LDAP_URL_EMPTY_STRING" ),
 
     // api-ldap-model cursor 13100 - 13199
     ERR_13100_FAILURE_ON_UNDERLYING_CURSOR( "ERR_13100_FAILURE_ON_UNDERLYING_CURSOR" ),
diff --git a/i18n/src/main/resources/org/apache/directory/api/i18n/errors.properties b/i18n/src/main/resources/org/apache/directory/api/i18n/errors.properties
index 2fc7965..adfbd79 100644
--- a/i18n/src/main/resources/org/apache/directory/api/i18n/errors.properties
+++ b/i18n/src/main/resources/org/apache/directory/api/i18n/errors.properties
@@ -112,8 +112,6 @@ ERR_03101_MISSING_CONNECTION_TO BIND=Missing connection, can not bind
 # ldap-client
 
 # ldap
-ERR_04408=The string is empty: this is not a valid LdapURL.
-ERR_04409=Bad Ldap URL: {0}
 
 
 # api-ldap-client-api   4000-4999
@@ -130,7 +128,7 @@ ERR_04107_UNEXPECTED_THROWN_EXCEPTION=An unexpected exception was thrown:
{0}
 ERR_04108_INVALID_CONNECTION=Cannot connect on the server, the connection is invalid
 ERR_04109_CANNOT_CONNECT=Cannot connect
 ERR_04110_CANNOT_CONNECT_TO_SERVER=Cannot connect to the server: {0}
-ERR_04111_=
+ERR_04111_UNKNOWN_RESPONSE_FUTURE_TYPE=Unknown ResponseFuture type: {0}
 ERR_04112_OP_FAILED_TIMEOUT={} failed: timeout occurred
 ERR_04113_ERROR_PROCESSING_NOD=Error while processing the NoD for {}
 ERR_04114_CURSOR_CLOSE_FAIL=Failed to close open cursor
@@ -427,6 +425,7 @@ ERR_13037_INVALID_FILTER=Filter is invalid
 ERR_13038_INVALID_EXTENSIONS=Extensions are invalid
 ERR_13039_INVALID_CHAR_AT_LDAP_URL_END=Invalid character at the end of the ldapUrl
 ERR_13040_INVALID_URL_ENCODING=Invalid URL encoding
+ERR_13041_INVALID_LDAP_URL_EMPTY_STRING=The string is empty: this is not a valid LdapURL.
 
 # api-ldap-model cursor         13100-13199
 ERR_13100_FAILURE_ON_UNDERLYING_CURSOR=Failure on underlying Cursor.
diff --git a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
index 8e9c6d9..43e8e68 100644
--- a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
+++ b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
@@ -2651,8 +2651,8 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements
Lda
                 else
                 {
                     // currently we only support IR for search and extended operations
-                    throw new UnsupportedOperationException( "Unknown ResponseFuture type
"
-                        + responseFuture.getClass().getName() );
+                    throw new UnsupportedOperationException( I18n.err( I18n.ERR_04111_UNKNOWN_RESPONSE_FUTURE_TYPE,

+                        responseFuture.getClass().getName() ) );
                 }
 
                 intermediateResponse.setResponseName( ( ( IntermediateResponse ) response
).getResponseName() );
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/url/LdapUrl.java
b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/url/LdapUrl.java
index 17adfd1..9c5ce5a 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/url/LdapUrl.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/url/LdapUrl.java
@@ -174,7 +174,7 @@ public class LdapUrl
     {
         if ( string == null )
         {
-            throw new LdapURLEncodingException( I18n.err( I18n.ERR_04408 ) );
+            throw new LdapURLEncodingException( I18n.err( I18n.ERR_13041_INVALID_LDAP_URL_EMPTY_STRING
) );
         }
 
         bytes = Strings.getBytesUtf8( string );

-- 
To stop receiving notification emails like this one, please contact
elecharny@apache.org.

Mime
View raw message