directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r741631 - /directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
Date Fri, 06 Feb 2009 16:58:24 GMT
Author: seelmann
Date: Fri Feb  6 16:58:23 2009
New Revision: 741631

URL: http://svn.apache.org/viewvc?rev=741631&view=rev
Log:
Simpler way to create an LDAP URL

Modified:
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/Connection.java

Modified: directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/Connection.java?rev=741631&r1=741630&r2=741631&view=diff
==============================================================================
--- directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
(original)
+++ directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
Fri Feb  6 16:58:23 2009
@@ -22,7 +22,6 @@
 
 
 import org.apache.directory.shared.ldap.util.LdapURL;
-import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
 import org.apache.directory.studio.connection.core.ConnectionParameter.AuthenticationMethod;
 import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
 import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
@@ -480,15 +479,9 @@
      */
     public LdapURL getUrl()
     {
-        String s = "ldap://" + getHost() + ":" + getPort();
-        LdapURL url = null;
-        try
-        {
-            url = new LdapURL( s );
-        }
-        catch ( LdapURLEncodingException e )
-        {
-        }
+        LdapURL url = new LdapURL();
+        url.setHost( getHost() );
+        url.setPort( getPort() );
         return url;
     }
 



Mime
View raw message