directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1771629 - in /directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina: LdapProtocolCodecActivator.java LdapProtocolCodecFactory.java LdapProtocolDecoder.java LdapProtocolEncoder.java
Date Sun, 27 Nov 2016 18:51:12 GMT
Author: elecharny
Date: Sun Nov 27 18:51:12 2016
New Revision: 1771629

URL: http://svn.apache.org/viewvc?rev=1771629&view=rev
Log:
Fixed SonarLint warnings

Modified:
    directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolCodecActivator.java
    directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolCodecFactory.java
    directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolDecoder.java
    directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolEncoder.java

Modified: directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolCodecActivator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolCodecActivator.java?rev=1771629&r1=1771628&r2=1771629&view=diff
==============================================================================
--- directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolCodecActivator.java
(original)
+++ directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolCodecActivator.java
Sun Nov 27 18:51:12 2016
@@ -71,8 +71,6 @@ public class LdapProtocolCodecActivator
         @Override
         public void removedService( ServiceReference<LdapApiService> reference, LdapApiService
service )
         {
-            // TODO should we unregister the LdapProtocolCodecFactory at LdapApiService?
-            // ldapApiService.unregisterProtocolCodecFactory( factory );
             registration.unregister();
         }
     }
@@ -89,10 +87,11 @@ public class LdapProtocolCodecActivator
     /**
      * {@inheritDoc}
      */
+    @Override
     public void start( BundleContext bundleContext ) throws Exception
     {
         LdapApiServiceTracker ldapApiServiceTracker = new LdapApiServiceTracker( bundleContext
);
-        serviceTracker = new ServiceTracker<LdapApiService, LdapApiService>( bundleContext,
LdapApiService.class,
+        serviceTracker = new ServiceTracker<>( bundleContext, LdapApiService.class,
             ldapApiServiceTracker );
         serviceTracker.open();
     }
@@ -101,6 +100,7 @@ public class LdapProtocolCodecActivator
     /**
      * {@inheritDoc}
      */
+    @Override
     public void stop( BundleContext bundleContext ) throws Exception
     {
         serviceTracker.close();

Modified: directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolCodecFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolCodecFactory.java?rev=1771629&r1=1771628&r2=1771629&view=diff
==============================================================================
--- directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolCodecFactory.java
(original)
+++ directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolCodecFactory.java
Sun Nov 27 18:51:12 2016
@@ -79,6 +79,7 @@ public class LdapProtocolCodecFactory im
      * @param session the IO session
      * @return the decoder
      */
+    @Override
     public ProtocolDecoder getDecoder( IoSession session )
     {
         return ldapDecoder;
@@ -91,6 +92,7 @@ public class LdapProtocolCodecFactory im
      * @param session the IO session
      * @return the encoder
      */
+    @Override
     public ProtocolEncoder getEncoder( IoSession session )
     {
         return ldapEncoder;

Modified: directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolDecoder.java?rev=1771629&r1=1771628&r2=1771629&view=diff
==============================================================================
--- directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolDecoder.java
(original)
+++ directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolDecoder.java
Sun Nov 27 18:51:12 2016
@@ -72,6 +72,7 @@ public class LdapProtocolDecoder impleme
     /**
      * {@inheritDoc}
      */
+    @Override
     public void decode( IoSession session, IoBuffer in, ProtocolDecoderOutput out ) throws
Exception
     {
         @SuppressWarnings("unchecked")
@@ -86,7 +87,7 @@ public class LdapProtocolDecoder impleme
             messageContainer.setMaxPDUSize( maxPDUSize );
         }
 
-        List<Message> decodedMessages = new ArrayList<Message>();
+        List<Message> decodedMessages = new ArrayList<>();
         ByteBuffer buf = in.buf();
 
         decode( buf, messageContainer, decodedMessages );
@@ -163,7 +164,7 @@ public class LdapProtocolDecoder impleme
                 
                 // Transform the DecoderException message to a MessageException
                 ResponseCarryingMessageException rcme = new ResponseCarryingMessageException(
rce.getMessage(), rce );
-                rcme.setResponse( ( ( ResponseCarryingException ) rce ).getResponse() );
+                rcme.setResponse( rce.getResponse() );
 
                 throw rcme;
             }
@@ -182,6 +183,7 @@ public class LdapProtocolDecoder impleme
     /**
      * {@inheritDoc}
      */
+    @Override
     public void finishDecode( IoSession session, ProtocolDecoderOutput out ) throws Exception
     {
         // Nothing to do
@@ -191,6 +193,7 @@ public class LdapProtocolDecoder impleme
     /**
      * {@inheritDoc}
      */
+    @Override
     public void dispose( IoSession session ) throws Exception
     {
         // Nothing to do

Modified: directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolEncoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolEncoder.java?rev=1771629&r1=1771628&r2=1771629&view=diff
==============================================================================
--- directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolEncoder.java
(original)
+++ directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolEncoder.java
Sun Nov 27 18:51:12 2016
@@ -76,6 +76,7 @@ public class LdapProtocolEncoder impleme
     /**
      * {@inheritDoc}
      */
+    @Override
     public void encode( IoSession session, Object message, ProtocolEncoderOutput out ) throws
Exception
     {
         ByteBuffer buffer = encoder.encodeMessage( ( Message ) message );
@@ -97,6 +98,7 @@ public class LdapProtocolEncoder impleme
     /**
      * {@inheritDoc}
      */
+    @Override
     public void dispose( IoSession session ) throws Exception
     {
         // Nothing to do



Mime
View raw message