You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2018/06/05 08:57:39 UTC

[directory-server] branch master updated: o Using MINA 2.0.18 o Fixed an error message o Extending IoHandlerAdapter instead of implementing IoHandler

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-server.git


The following commit(s) were added to refs/heads/master by this push:
     new e49a170  o Using MINA 2.0.18 o Fixed an error message o Extending IoHandlerAdapter instead of implementing IoHandler
e49a170 is described below

commit e49a170fb1eb6b154dd7d16c7fefa7a33bca2b6c
Author: Emmanuel Lécharny <el...@symas.com>
AuthorDate: Tue Jun 5 10:57:37 2018 +0200

    o Using MINA 2.0.18
    o Fixed an error message
    o Extending IoHandlerAdapter instead of implementing IoHandler
---
 .../apache/directory/mavibot/btree/FastLdifReader.java    | 15 ++++++++-------
 pom.xml                                                   |  2 +-
 .../changepwd/protocol/ChangePasswordProtocolHandler.java |  6 +++---
 3 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/bulkloader/src/main/java/org/apache/directory/mavibot/btree/FastLdifReader.java b/bulkloader/src/main/java/org/apache/directory/mavibot/btree/FastLdifReader.java
index f737d5e..e4a0631 100644
--- a/bulkloader/src/main/java/org/apache/directory/mavibot/btree/FastLdifReader.java
+++ b/bulkloader/src/main/java/org/apache/directory/mavibot/btree/FastLdifReader.java
@@ -112,7 +112,7 @@ import org.slf4j.LoggerFactory;
 
         if ( lines.size() == 0 )
         {
-            LOG.warn( "The ldif file is empty" );
+            LOG.warn( I18n.msg( I18n.MSG_13414_LDIF_FILE_EMPTY ) );
             return;
         }
 
@@ -151,7 +151,7 @@ import org.slf4j.LoggerFactory;
     {
         try
         {
-            LOG.debug( "next(): -- called" );
+            LOG.debug( I18n.msg( I18n.MSG_13411_NEXT_CALLED ) );
 
             nextTuple = firstFetchedTuple;
             
@@ -180,7 +180,7 @@ import org.slf4j.LoggerFactory;
         catch ( LdapLdifException ne )
         {
             ne.printStackTrace();
-            LOG.error( I18n.err( I18n.ERR_12071 ) );
+            LOG.error( I18n.err( I18n.ERR_13430_PREMATURE_LDIF_ITERATOR_TERMINATION ) );
             error = ne;
             return null;
         }
@@ -194,7 +194,8 @@ import org.slf4j.LoggerFactory;
     {
         if ( ( lines == null ) || ( lines.size() == 0 ) )
         {
-            LOG.debug( "The entry is empty : end of ldif file" );
+            LOG.debug( I18n.msg( I18n.MSG_13408_END_OF_LDIF ) );
+            
             return null;
         }
 
@@ -275,8 +276,8 @@ import org.slf4j.LoggerFactory;
                         }
                         else if ( sb.length() == 0 )
                         {
-                            LOG.error( I18n.err( I18n.ERR_12062_EMPTY_CONTINUATION_LINE ) );
-                            throw new LdapLdifException( I18n.err( I18n.ERR_12061_LDIF_PARSING_ERROR ) );
+                            LOG.error( I18n.err( I18n.ERR_13424_EMPTY_CONTINUATION_LINE ) );
+                            throw new LdapLdifException( I18n.err( I18n.ERR_13462_LDIF_PARSING_ERROR ) );
                         }
                         else
                         {
@@ -306,7 +307,7 @@ import org.slf4j.LoggerFactory;
         }
         catch ( IOException ioe )
         {
-            throw new LdapLdifException( I18n.err( I18n.ERR_12063_ERROR_WHILE_READING_LDIF_LINE ), ioe );
+            throw new LdapLdifException( I18n.err( I18n.ERR_13463_ERROR_WHILE_READING_LDIF_LINE ), ioe );
         }
 
         // Stores the current line if necessary.
diff --git a/pom.xml b/pom.xml
index a971abb..8cdcb19 100644
--- a/pom.xml
+++ b/pom.xml
@@ -76,7 +76,7 @@
     <maven.artifact.version>3.3.9</maven.artifact.version>
     <maven.plugin.api.version>3.3.9</maven.plugin.api.version>
     <maven.project.version>3.0-alpha-2</maven.project.version>
-    <mina.core.version>2.0.17</mina.core.version>
+    <mina.core.version>2.0.18</mina.core.version>
     <org.apache.felix.version>5.6.10</org.apache.felix.version>
     <pax-exam.version>4.11.0</pax-exam.version>
     <pax-url.version>2.5.4</pax-url.version>
diff --git a/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/protocol/ChangePasswordProtocolHandler.java b/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/protocol/ChangePasswordProtocolHandler.java
index 661d8c6..8a5230e 100644
--- a/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/protocol/ChangePasswordProtocolHandler.java
+++ b/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/changepwd/protocol/ChangePasswordProtocolHandler.java
@@ -42,7 +42,7 @@ import org.apache.directory.shared.kerberos.components.PrincipalName;
 import org.apache.directory.shared.kerberos.exceptions.ErrorType;
 import org.apache.directory.shared.kerberos.exceptions.KerberosException;
 import org.apache.directory.shared.kerberos.messages.KrbError;
-import org.apache.mina.core.service.IoHandler;
+import org.apache.mina.core.service.IoHandlerAdapter;
 import org.apache.mina.core.session.IdleStatus;
 import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.ProtocolCodecFilter;
@@ -53,7 +53,7 @@ import org.slf4j.LoggerFactory;
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ChangePasswordProtocolHandler implements IoHandler
+public class ChangePasswordProtocolHandler extends IoHandlerAdapter
 {
     private static final Logger LOG = LoggerFactory.getLogger( ChangePasswordProtocolHandler.class );
 
@@ -108,7 +108,7 @@ public class ChangePasswordProtocolHandler implements IoHandler
     public void exceptionCaught( IoSession session, Throwable cause )
     {
         LOG.debug( session.getRemoteAddress() + " EXCEPTION", cause );
-        session.close( true );
+        session.closeNow();
     }
 
 

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