directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r610932 - in /directory/studio/trunk: studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ studio-jars/ studio-jars/META-INF/ studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/c...
Date Thu, 10 Jan 2008 21:11:49 GMT
Author: seelmann
Date: Thu Jan 10 13:11:48 2008
New Revision: 610932

URL: http://svn.apache.org/viewvc?rev=610932&view=rev
Log:
Fix for DIRSTUDIO-259: Added commons-lang dependency. It is safer and more comfortable to
use StringUtils for string comparation...

Modified:
    directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/AuthenticationParameterPage.java
    directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
    directory/studio/trunk/studio-jars/.classpath
    directory/studio/trunk/studio-jars/META-INF/MANIFEST.MF
    directory/studio/trunk/studio-jars/build.properties
    directory/studio/trunk/studio-jars/ivy.xml
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java

Modified: directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/AuthenticationParameterPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/AuthenticationParameterPage.java?rev=610932&r1=610931&r2=610932&view=diff
==============================================================================
--- directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/AuthenticationParameterPage.java
(original)
+++ directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/AuthenticationParameterPage.java
Thu Jan 10 13:11:48 2008
@@ -21,6 +21,7 @@
 package org.apache.directory.studio.connection.ui.widgets;
 
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionParameter;
 import org.apache.directory.studio.connection.core.ConnectionParameter.AuthenticationMethod;
@@ -116,7 +117,7 @@
     /**
      * Gets the bind password.
      * 
-     * @return the bind password
+     * @return the bind password, null if saving of bind password is disabled
      */
     private String getBindPassword()
     {
@@ -391,11 +392,11 @@
      */
     public boolean isReconnectionRequired()
     {
-        return connectionParameter == null
+        return connectionParameter == null 
             || connectionParameter.getAuthMethod() != getAuthenticationMethod()
-            || !( connectionParameter.getBindPrincipal().equals( getBindPrincipal() ) )
-            || !( connectionParameter.getBindPassword().equals( getBindPassword() ) || !(
connectionParameter
-                .getSaslRealm().equals( getSaslRealm() ) ) );
+            || !StringUtils.equals( connectionParameter.getBindPrincipal(), getBindPrincipal()
)
+            || !StringUtils.equals( connectionParameter.getBindPassword(), getBindPassword()
)
+            || !StringUtils.equals( connectionParameter.getSaslRealm(), getSaslRealm() );
     }
 
 }

Modified: directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java?rev=610932&r1=610931&r2=610932&view=diff
==============================================================================
--- directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
(original)
+++ directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
Thu Jan 10 13:11:48 2008
@@ -21,6 +21,7 @@
 package org.apache.directory.studio.connection.ui.widgets;
 
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.ConnectionParameter;
@@ -345,7 +346,7 @@
      */
     public boolean areParametersModifed()
     {
-        return isReconnectionRequired() || !( connectionParameter.getName().equals( getName()
) );
+        return isReconnectionRequired() || !StringUtils.equals( connectionParameter.getName(),
getName() );
     }
 
 
@@ -354,7 +355,8 @@
      */
     public boolean isReconnectionRequired()
     {
-        return connectionParameter == null || !( connectionParameter.getHost().equals( getHostName()
) )
+        return connectionParameter == null 
+            || !StringUtils.equals(  connectionParameter.getHost(), getHostName() ) 
             || connectionParameter.getPort() != getPort()
             || connectionParameter.getEncryptionMethod() != getEncyrptionMethod();
     }

Modified: directory/studio/trunk/studio-jars/.classpath
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-jars/.classpath?rev=610932&r1=610931&r2=610932&view=diff
==============================================================================
--- directory/studio/trunk/studio-jars/.classpath (original)
+++ directory/studio/trunk/studio-jars/.classpath Thu Jan 10 13:11:48 2008
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
+	<classpathentry exported="true" kind="lib" path="lib/commons-lang-2.1.jar"/>
 	<classpathentry exported="true" kind="lib" path="lib/studio-dsml-parser-0.4.1.jar"/>
 	<classpathentry exported="true" kind="lib" path="lib/shared-asn1-0.9.8-SNAPSHOT.jar"/>
 	<classpathentry exported="true" kind="lib" path="lib/shared-ldap-0.9.8-SNAPSHOT.jar"/>

Modified: directory/studio/trunk/studio-jars/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-jars/META-INF/MANIFEST.MF?rev=610932&r1=610931&r2=610932&view=diff
==============================================================================
--- directory/studio/trunk/studio-jars/META-INF/MANIFEST.MF (original)
+++ directory/studio/trunk/studio-jars/META-INF/MANIFEST.MF Thu Jan 10 13:11:48 2008
@@ -8,6 +8,7 @@
 Bundle-ClassPath: .,
  lib/antlr-2.7.6.jar,
  lib/commons-collections-3.2.jar,
+ lib/commons-lang-2.1.jar,
  lib/dom4j-1.6.1.jar,
  lib/nlog4j-1.2.25.jar,
  lib/xpp3-1.1.3_8.jar,
@@ -40,6 +41,13 @@
  org.apache.commons.collections.list,
  org.apache.commons.collections.map,
  org.apache.commons.collections.set,
+ org.apache.commons.lang,
+ org.apache.commons.lang.builder,
+ org.apache.commons.lang.enums,
+ org.apache.commons.lang.exception,
+ org.apache.commons.lang.math,
+ org.apache.commons.lang.mutable,
+ org.apache.commons.lang.time,
  org.apache.directory.shared.asn1,
  org.apache.directory.shared.asn1.ber,
  org.apache.directory.shared.asn1.ber.grammar,

Modified: directory/studio/trunk/studio-jars/build.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-jars/build.properties?rev=610932&r1=610931&r2=610932&view=diff
==============================================================================
--- directory/studio/trunk/studio-jars/build.properties (original)
+++ directory/studio/trunk/studio-jars/build.properties Thu Jan 10 13:11:48 2008
@@ -1,5 +1,6 @@
 bin.includes = META-INF/,\
                .,\
-               lib/
+               lib/,\
+               lib/commons-lang-2.1.jar
 source.. = src/main/java/,\
            src/test/java/

Modified: directory/studio/trunk/studio-jars/ivy.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-jars/ivy.xml?rev=610932&r1=610931&r2=610932&view=diff
==============================================================================
--- directory/studio/trunk/studio-jars/ivy.xml (original)
+++ directory/studio/trunk/studio-jars/ivy.xml Thu Jan 10 13:11:48 2008
@@ -21,5 +21,6 @@
 	<dependencies>
 		<dependency org="antlr" name="antlr" rev="2.7.6"/>
     	<dependency org="org.apache.directory.studio" name="studio-dsml-parser" rev="0.4.1"/>
+    	<dependency org="commons-lang" name="commons-lang" rev="2.1"/>
     </dependencies>
 </ivy-module>

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java?rev=610932&r1=610931&r2=610932&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java
Thu Jan 10 13:11:48 2008
@@ -21,6 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.common.widgets.connection;
 
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionParameter;
@@ -402,9 +403,8 @@
         Connection.AliasDereferencingMethod aliasesDereferencingMethod = Connection.AliasDereferencingMethod
             .getByOrdinal( aliasesDereferencingMethodOrdinal );
 
-        return fetchBaseDns != isAutoFetchBaseDns() || ( baseDn == null && getBaseDN()
!= null )
-            || ( baseDn != null && getBaseDN() == null )
-            || ( baseDn != getBaseDN() && !( baseDn.equals( getBaseDN() ) ) )
+        return fetchBaseDns != isAutoFetchBaseDns()
+            || !StringUtils.equals( baseDn, getBaseDN() )
             || referralsHandlingMethod != getReferralsHandlingMethod()
             || aliasesDereferencingMethod != getAliasesDereferencingMethod();
     }



Mime
View raw message