directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r123050 - in incubator/directory/network/trunk/mina: . src/java/org/apache/mina/io/socket src/java/org/apache/mina/protocol
Date Wed, 22 Dec 2004 06:02:34 GMT
Author: trustin
Date: Tue Dec 21 22:02:31 2004
New Revision: 123050

URL: http://svn.apache.org/viewcvs?view=rev&rev=123050
Log:
 * Removed dependency on commons-lang and commons-logging
 * Added dependency on Doug Lea's concurrent package
Modified:
   incubator/directory/network/trunk/mina/project.xml
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpAcceptor.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpConnector.java
   incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolViolationException.java

Modified: incubator/directory/network/trunk/mina/project.xml
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/project.xml?view=diff&rev=123050&p1=incubator/directory/network/trunk/mina/project.xml&r1=123049&p2=incubator/directory/network/trunk/mina/project.xml&r2=123050
==============================================================================
--- incubator/directory/network/trunk/mina/project.xml	(original)
+++ incubator/directory/network/trunk/mina/project.xml	Tue Dec 21 22:02:31 2004
@@ -1,207 +1,200 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project>
-
-  <groupId>incubator-directory</groupId>
-  <id>mina</id>
-  <name>MINA</name>
-  <package>org.apache.mina</package>
-  <currentVersion>SNAPSHOT</currentVersion>
-  <inceptionYear>2004</inceptionYear>
-
-  <organization>
-    <name>The Apache Incubator</name>
-    <url>http://incubator.apache.org</url>
-    <logo>/images/apache-incubator-logo.png</logo>
-  </organization>
-
-  <inceptionYear>2003</inceptionYear>
-
-  <logo>/images/apache-directory-logo.png</logo>
-  <url>http://incubator.apache.org/directory</url>
-
-  <issueTrackingUrl>
-    http://nagoya.apache.org/scarab/servlet/scarab
-  </issueTrackingUrl>
-  <siteAddress>directory.apache.org</siteAddress>
-  <siteDirectory>/home/akarasulu/public_html</siteDirectory>
-  <distributionDirectory>
-    /home/akarasulu/public_html/dist
-  </distributionDirectory>
-
-  <repository>
-    <connection>
-      scm:svn:http://cvs.apache.org/repos/asf/incubator/directory/seda/trunk/${module.path}:::
-    </connection>
-
-    <url>
-      http://cvs.apache.org/viewcvs.cgi/incubator/directory/seda/trunk/${module.path}/?root=Apache-SVN
-    </url>
-
-    <developerConnection>
-      http://cvs.apache.org/repos/asf/incubator/directory/seda/trunk/${module.path}
-    </developerConnection>
-  </repository>
-
-  <shortDescription>
-    A Multipurpose Infrastrusture for Network Applications
-  </shortDescription>
-
-  <description>
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project>
+
+  <groupId>incubator-directory</groupId>
+  <id>mina</id>
+  <name>MINA</name>
+  <package>org.apache.mina</package>
+  <currentVersion>SNAPSHOT</currentVersion>
+  <inceptionYear>2004</inceptionYear>
+
+  <organization>
+    <name>The Apache Incubator</name>
+    <url>http://incubator.apache.org</url>
+    <logo>/images/apache-incubator-logo.png</logo>
+  </organization>
+
+  <inceptionYear>2003</inceptionYear>
+
+  <logo>/images/apache-directory-logo.png</logo>
+  <url>http://incubator.apache.org/directory</url>
+
+  <issueTrackingUrl>
+    http://nagoya.apache.org/scarab/servlet/scarab
+  </issueTrackingUrl>
+  <siteAddress>directory.apache.org</siteAddress>
+  <siteDirectory>/home/akarasulu/public_html</siteDirectory>
+  <distributionDirectory>
+    /home/akarasulu/public_html/dist
+  </distributionDirectory>
+
+  <repository>
+    <connection>
+      scm:svn:http://cvs.apache.org/repos/asf/incubator/directory/seda/trunk/${module.path}:::
+    </connection>
+
+    <url>
+      http://cvs.apache.org/viewcvs.cgi/incubator/directory/seda/trunk/${module.path}/?root=Apache-SVN
+    </url>
+
+    <developerConnection>
+      http://cvs.apache.org/repos/asf/incubator/directory/seda/trunk/${module.path}
+    </developerConnection>
+  </repository>
+
+  <shortDescription>
+    A Multipurpose Infrastrusture for Network Applications
+  </shortDescription>
+
+  <description>
     MINA (Multipurpose Infrastructure for Network Applications) is a high
     performance and high scalability network application framework which
-    allows easy development of network applications.
-  </description>
-
-
-  <mailingLists>
-    <mailingList>
-      <name>Apache Directory Developement - use [seda] prefix</name>
-        <subscribe>
-          directory-dev-subscribe@incubator.apache.org
-        </subscribe>
-        <unsubscribe>
-          directory-dev-unsubscribe@incubator.apache.org
-        </unsubscribe>
-        <archive>
-          http://nagoya.apache.org/eyebrowse/SummarizeList?listId=181
-        </archive>
-      </mailingList>
-  </mailingLists>
-
-  <licenses>
-    <license>
-      <name>Apache 1.1 License</name>
-      <url>
-        http://cvs.apache.org/viewcvs.cgi/incubator/directory/LICENSE.txt?rev=1369&amp;root=Apache-SVN&amp;view=markup
-      </url>
-      <distribution>repo</distribution>
-    </license>
-  </licenses>
-
-  <dependencies>
-
-    <!-- ================================ -->
-    <!-- CORE Dependencies needed for use -->
-    <!-- ================================ -->
-
-    <dependency>
-      <groupId>commons-lang</groupId>
-      <artifactId>commons-lang</artifactId>
-      <version>2.0</version>
-      <url>http://jakarta.apache.org/commons/lang</url>
-    </dependency>
-
-    <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
-      <version>1.0.3</version>
-      <url>http://jakarta.apache.org/commons/logging</url>
-    </dependency>
-
+    allows easy development of network applications.
+  </description>
+
+
+  <mailingLists>
+    <mailingList>
+      <name>Apache Directory Developement - use [seda] prefix</name>
+        <subscribe>
+          directory-dev-subscribe@incubator.apache.org
+        </subscribe>
+        <unsubscribe>
+          directory-dev-unsubscribe@incubator.apache.org
+        </unsubscribe>
+        <archive>
+          http://nagoya.apache.org/eyebrowse/SummarizeList?listId=181
+        </archive>
+      </mailingList>
+  </mailingLists>
+
+  <licenses>
+    <license>
+      <name>Apache 1.1 License</name>
+      <url>
+        http://cvs.apache.org/viewcvs.cgi/incubator/directory/LICENSE.txt?rev=1369&amp;root=Apache-SVN&amp;view=markup
+      </url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <dependencies>
+
+    <!-- ================================ -->
+    <!-- CORE Dependencies needed for use -->
+    <!-- ================================ -->
+
     <dependency>
       <groupId>incubator-directory</groupId>
       <artifactId>snickers-codec</artifactId>
-      <version>0.2.0</version>
+      <version>0.2-SNAPSHOT</version>
       <url>http://incubator.apache.org/directory/subprojects/ldap/common</url>
     </dependency>
-
-    <!-- ========================================================= -->
-    <!-- Dependencies required for running test cases and examples -->
-    <!-- ========================================================= -->
-
-    
-    <dependency>
-      <groupId>commons-net</groupId>
-      <artifactId>commons-net</artifactId>
-      <version>1.2.1</version>
-      <url>http://jakarta.apache.org/commons/net</url>
-    </dependency>
-
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
-      <url>http://junit.org</url>
-    </dependency>
-
-  </dependencies>
-
-
-  <build>
-    <nagEmailAddress>directory-dev@incubator.apache.org</nagEmailAddress>
-    <sourceDirectory>${basedir}/src/java</sourceDirectory>
-    <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
-    <integrationUnitTestSourceDirectory/>
-    <aspectSourceDirectory/>
-
-    <unitTest>
-      <includes>
-        <include>**/*Test*</include>
-        <include>**/*TestCase*</include>
-      </includes>
-
-      <excludes>
-          <exclude>**/ProtocolTestCase.java</exclude>
-      </excludes>
-
-      <resources>
-        <!-- Examples of protocol providers using framework -->
-        <resource>
-          <directory>${basedir}/src/examples</directory>
-          <includes>
-            <include>**/*.dtd</include>
-            <include>**/*.ldif</include>
-            <include>**/*.properties</include>
-            <include>**/*.x*</include>
-            <include>**/*.mf</include>
-            <include>**/*.jar</include>
-          </includes>
-        </resource>
-
-        <!-- Actual test cases and supporting classes here -->
-        <resource>
-          <directory>${basedir}/src/test</directory>
-          <includes>
-            <include>**/*.dtd</include>
-            <include>**/*.ldif</include>
-            <include>**/*.properties</include>
-            <include>**/*.x*</include>
-            <include>**/*.mf</include>
-            <include>**/*.jar</include>
-          </includes>
-        </resource>
-
-      </resources>
-    </unitTest>
-
-    <resources>
-      <resource>
-        <directory>${basedir}/src/java</directory>
-        <includes>
-          <include>**/*.dtd</include>
-          <include>**/*.properties</include>
-          <include>**/*.x*</include>
-        </includes>
-      </resource>
-
-      <resource>
-        <directory>${basedir}/conf</directory>
-        <targetPath>BLOCK-INF</targetPath>
-        <includes>
-          <include>block.xml</include>
-        </includes>
-      </resource>
-    </resources>
-    <jars></jars>
-  </build>
-
-  <reports>
-    <report>maven-jxr-plugin</report>
-    <report>maven-license-plugin</report>
-    <!-- <report>maven-changelog-plugin</report -->
-    <!-- <report>maven-javadoc-plugin</report> -->
-    <report>maven-tasklist-plugin</report>
-  </reports>
-
-</project>
-
+    
+    <dependency>
+      <groupId>concurrent</groupId>
+      <artifactId>concurrent</artifactId>
+      <version>1.3.4</version>
+      <url>http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/</url>
+	</dependency>
+
+    <!-- ========================================================= -->
+    <!-- Dependencies required for running test cases and examples -->
+    <!-- ========================================================= -->
+
+    
+    <dependency>
+      <groupId>commons-net</groupId>
+      <artifactId>commons-net</artifactId>
+      <version>1.2.1</version>
+      <url>http://jakarta.apache.org/commons/net</url>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <url>http://junit.org</url>
+    </dependency>
+
+  </dependencies>
+
+
+  <build>
+    <nagEmailAddress>directory-dev@incubator.apache.org</nagEmailAddress>
+    <sourceDirectory>${basedir}/src/java</sourceDirectory>
+    <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
+    <integrationUnitTestSourceDirectory/>
+    <aspectSourceDirectory/>
+
+    <unitTest>
+      <includes>
+        <include>**/*Test*</include>
+        <include>**/*TestCase*</include>
+      </includes>
+
+      <excludes>
+          <exclude>**/ProtocolTestCase.java</exclude>
+      </excludes>
+
+      <resources>
+        <!-- Examples of protocol providers using framework -->
+        <resource>
+          <directory>${basedir}/src/examples</directory>
+          <includes>
+            <include>**/*.dtd</include>
+            <include>**/*.ldif</include>
+            <include>**/*.properties</include>
+            <include>**/*.x*</include>
+            <include>**/*.mf</include>
+            <include>**/*.jar</include>
+          </includes>
+        </resource>
+
+        <!-- Actual test cases and supporting classes here -->
+        <resource>
+          <directory>${basedir}/src/test</directory>
+          <includes>
+            <include>**/*.dtd</include>
+            <include>**/*.ldif</include>
+            <include>**/*.properties</include>
+            <include>**/*.x*</include>
+            <include>**/*.mf</include>
+            <include>**/*.jar</include>
+          </includes>
+        </resource>
+
+      </resources>
+    </unitTest>
+
+    <resources>
+      <resource>
+        <directory>${basedir}/src/java</directory>
+        <includes>
+          <include>**/*.dtd</include>
+          <include>**/*.properties</include>
+          <include>**/*.x*</include>
+        </includes>
+      </resource>
+
+      <resource>
+        <directory>${basedir}/conf</directory>
+        <targetPath>BLOCK-INF</targetPath>
+        <includes>
+          <include>block.xml</include>
+        </includes>
+      </resource>
+    </resources>
+    <jars></jars>
+  </build>
+
+  <reports>
+    <report>maven-jxr-plugin</report>
+    <report>maven-license-plugin</report>
+    <!-- <report>maven-changelog-plugin</report -->
+    <!-- <report>maven-javadoc-plugin</report> -->
+    <report>maven-tasklist-plugin</report>
+  </reports>
+
+</project>
+

Modified: incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpAcceptor.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpAcceptor.java?view=diff&rev=123050&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpAcceptor.java&r1=123049&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpAcceptor.java&r2=123050
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpAcceptor.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpAcceptor.java
Tue Dec 21 22:02:31 2004
@@ -30,7 +30,6 @@
 import java.util.Iterator;
 import java.util.Map;
 
-import org.apache.commons.lang.Validate;
 import org.apache.mina.io.Acceptor;
 import org.apache.mina.io.IoHandler;
 import org.apache.mina.io.IoHandlerFilter;
@@ -80,8 +79,10 @@
     public void bind( SocketAddress address, int backlog,
                      IoHandler defaultHandler ) throws IOException
     {
-        Validate.notNull( address );
-        Validate.notNull( defaultHandler );
+        if( address == null )
+            throw new NullPointerException( "address" );
+        if( defaultHandler == null )
+            throw new NullPointerException( "defaultHandler" );
 
         if( ! ( address instanceof InetSocketAddress ) )
             throw new IllegalArgumentException( "Unexpected address type: "
@@ -112,7 +113,8 @@
 
     public void unbind( SocketAddress address )
     {
-        Validate.notNull( address );
+        if( address == null )
+            throw new NullPointerException( "address" );
 
         ServerSocketChannel ssc;
 
@@ -255,7 +257,8 @@
 
             if( key == null )
                 break;
-            else {
+            else
+            {
                 key.cancel();
                 selector.wakeup(); // wake up again to trigger thread death
             }

Modified: incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpConnector.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpConnector.java?view=diff&rev=123050&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpConnector.java&r1=123049&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpConnector.java&r2=123050
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpConnector.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/socket/TcpConnector.java
Tue Dec 21 22:02:31 2004
@@ -28,7 +28,6 @@
 import java.util.Iterator;
 import java.util.Set;
 
-import org.apache.commons.lang.Validate;
 import org.apache.mina.io.Connector;
 import org.apache.mina.io.IoHandler;
 import org.apache.mina.io.IoHandlerFilter;
@@ -72,8 +71,10 @@
     public IoSession connect( SocketAddress address, int timeout,
                              IoHandler defaultHandler ) throws IOException
     {
-        Validate.notNull( address );
-        Validate.notNull( defaultHandler );
+        if( address == null )
+            throw new NullPointerException( "address" );
+        if( defaultHandler == null )
+            throw new NullPointerException( "defaultHandler" );
 
         if( timeout <= 0 )
             throw new IllegalArgumentException( "Illegal timeout: " + timeout );
@@ -221,11 +222,14 @@
                 {
                     int nKeys = selector.select( 1000 );
 
-                    if (selector.keys().isEmpty()) {
-                        synchronized (TcpConnector.this) {
-                            if (selector.keys().isEmpty()) {
-	                            worker = null;
-	                            break;
+                    if( selector.keys().isEmpty() )
+                    {
+                        synchronized( TcpConnector.this )
+                        {
+                            if( selector.keys().isEmpty() )
+                            {
+                                worker = null;
+                                break;
                             }
                         }
                     }

Modified: incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolViolationException.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolViolationException.java?view=diff&rev=123050&p1=incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolViolationException.java&r1=123049&p2=incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolViolationException.java&r2=123050
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolViolationException.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolViolationException.java
Tue Dec 21 22:02:31 2004
@@ -20,7 +20,6 @@
 
 import java.nio.ByteBuffer;
 
-import org.apache.commons.lang.Validate;
 import org.apache.mina.util.ByteBuffers;
 
 /**
@@ -102,7 +101,6 @@
      */
     public void setBuffer( ByteBuffer buffer )
     {
-        Validate.notNull( buffer );
         this.buffer = buffer;
     }
 }

Mime
View raw message