directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1692917 - in /directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core: Connection.java StudioControl.java StudioPagedResultsControl.java
Date Mon, 27 Jul 2015 17:41:26 GMT
Author: elecharny
Date: Mon Jul 27 17:41:25 2015
New Revision: 1692917

URL: http://svn.apache.org/r1692917
Log:
o Removed useless checked on x != null when && ( x instanceof X )

Modified:
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/StudioControl.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/StudioPagedResultsControl.java

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Connection.java?rev=1692917&r1=1692916&r2=1692917&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
(original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
Mon Jul 27 17:41:25 2015
@@ -236,7 +236,7 @@ public class Connection implements Conne
      */
     private ConnectionWrapper getJndiConnectionWrapper()
     {
-        if ( ( connectionWrapper == null ) || !( connectionWrapper instanceof JNDIConnectionWrapper
) )
+        if ( !( connectionWrapper instanceof JNDIConnectionWrapper ) )
         {
             connectionWrapper = new JNDIConnectionWrapper( this );
         }
@@ -253,7 +253,7 @@ public class Connection implements Conne
      */
     private ConnectionWrapper getDirectoryApiConnectionWrapper()
     {
-        if ( ( connectionWrapper == null ) || !( connectionWrapper instanceof DirectoryApiConnectionWrapper
) )
+        if ( !( connectionWrapper instanceof DirectoryApiConnectionWrapper ) )
         {
             connectionWrapper = new DirectoryApiConnectionWrapper( this );
         }

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/StudioControl.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/StudioControl.java?rev=1692917&r1=1692916&r2=1692917&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/StudioControl.java
(original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/StudioControl.java
Mon Jul 27 17:41:25 2015
@@ -225,10 +225,11 @@ public class StudioControl implements Se
      */
     public boolean equals( Object obj )
     {
-        if ( obj == null || !( obj instanceof StudioControl ) )
+        if ( !( obj instanceof StudioControl ) )
         {
             return false;
         }
+        
         StudioControl other = ( StudioControl ) obj;
 
         return this.toString().equals( other.toString() );

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/StudioPagedResultsControl.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/StudioPagedResultsControl.java?rev=1692917&r1=1692916&r2=1692917&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/StudioPagedResultsControl.java
(original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/StudioPagedResultsControl.java
Mon Jul 27 17:41:25 2015
@@ -181,10 +181,11 @@ public class StudioPagedResultsControl e
      */
     public boolean equals( Object obj )
     {
-        if ( obj == null || !( obj instanceof StudioPagedResultsControl ) )
+        if ( !( obj instanceof StudioPagedResultsControl ) )
         {
             return false;
         }
+        
         StudioPagedResultsControl other = ( StudioPagedResultsControl ) obj;
 
         return this.toString().equals( other.toString() ) && this.isScrollMode ==
other.isScrollMode;



Mime
View raw message