directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1720868 - /directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/LdapLdapsServersPage.java
Date Sat, 19 Dec 2015 00:30:42 GMT
Author: elecharny
Date: Sat Dec 19 00:30:42 2015
New Revision: 1720868

URL: http://svn.apache.org/viewvc?rev=1720868&view=rev
Log:
Some code simplification

Modified:
    directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/LdapLdapsServersPage.java

Modified: directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/LdapLdapsServersPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/LdapLdapsServersPage.java?rev=1720868&r1=1720867&r2=1720868&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/LdapLdapsServersPage.java
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/LdapLdapsServersPage.java
Sat Dec 19 00:30:42 2015
@@ -2113,37 +2113,28 @@ public class LdapLdapsServersPage extend
             // Check if we have a LDAP transport
             TransportBean transportBean = getLdapTransportBean( TRANSPORT_ID_LDAP );
             
-            if ( transportBean == null )
-            {
-                // No LDAP transport, check the LDAPS transport
-                transportBean = getLdapTransportBean( TRANSPORT_ID_LDAPS );
-            }
-            
-            if ( transportBean != null )
-            {
-                // Ok, process the enabled protocols now
-                List<String> enabledProtocols = transportBean.getEnabledProtocols();
+            // Ok, process the enabled protocols now
+            List<String> enabledProtocols = transportBean.getEnabledProtocols();
                 
-                if ( enabledProtocols != null )
+            if ( enabledProtocols != null )
+            {
+                for ( String enabledProtocol : transportBean.getEnabledProtocols() )
                 {
-                    for ( String enabledProtocol : transportBean.getEnabledProtocols() )
+                    if ( SSL_V3.equalsIgnoreCase( enabledProtocol ) )
+                    {
+                        setSelection( sslv3Checkbox, true );
+                    }
+                    else if ( TLS_V1_0.equalsIgnoreCase( enabledProtocol ) )
+                    {
+                        setSelection( tlsv1_0Checkbox, true );
+                    }
+                    else if ( TLS_V1_1.equalsIgnoreCase( enabledProtocol ) )
+                    {
+                        setSelection( tlsv1_1Checkbox, true );
+                    }
+                    else if ( TLS_V1_2.equalsIgnoreCase( enabledProtocol ) )
                     {
-                        if ( SSL_V3.equalsIgnoreCase( enabledProtocol ) )
-                        {
-                            setSelection( sslv3Checkbox, true );
-                        }
-                        else if ( TLS_V1_0.equalsIgnoreCase( enabledProtocol ) )
-                        {
-                            setSelection( tlsv1_0Checkbox, true );
-                        }
-                        else if ( TLS_V1_1.equalsIgnoreCase( enabledProtocol ) )
-                        {
-                            setSelection( tlsv1_1Checkbox, true );
-                        }
-                        else if ( TLS_V1_2.equalsIgnoreCase( enabledProtocol ) )
-                        {
-                            setSelection( tlsv1_2Checkbox, true );
-                        }
+                        setSelection( tlsv1_2Checkbox, true );
                     }
                 }
             }



Mime
View raw message