directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r687734 - in /directory/apacheds/trunk: mitosis/src/test/java/org/apache/directory/mitosis/service/ mitosis/src/test/java/org/apache/directory/mitosis/service/protocol/codec/ protocol-ldap/src/main/java/org/apache/directory/server/ldap/hand...
Date Thu, 21 Aug 2008 12:59:57 GMT
Author: elecharny
Date: Thu Aug 21 05:59:56 2008
New Revision: 687734

URL: http://svn.apache.org/viewvc?rev=687734&view=rev
Log:
o Replaced sun.misc.Queue  by the java.util.Queue plus a LinkedBlockingQueue
o Removed the TimeUnit.MINUTE case in one switch as it's not available in Java 5

Modified:
    directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/AbstractReplicationServiceTestCase.java
    directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/protocol/codec/AbstractMessageCodecTest.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchTimeLimitingMonitor.java

Modified: directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/AbstractReplicationServiceTestCase.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/AbstractReplicationServiceTestCase.java?rev=687734&r1=687733&r2=687734&view=diff
==============================================================================
--- directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/AbstractReplicationServiceTestCase.java
(original)
+++ directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/AbstractReplicationServiceTestCase.java
Thu Aug 21 05:59:56 2008
@@ -38,7 +38,6 @@
 import org.slf4j.LoggerFactory;
 
 import javax.naming.Context;
-import javax.naming.ldap.InitialLdapContext;
 import javax.naming.ldap.LdapContext;
 import java.io.File;
 import java.net.InetSocketAddress;

Modified: directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/protocol/codec/AbstractMessageCodecTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/protocol/codec/AbstractMessageCodecTest.java?rev=687734&r1=687733&r2=687734&view=diff
==============================================================================
--- directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/protocol/codec/AbstractMessageCodecTest.java
(original)
+++ directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/protocol/codec/AbstractMessageCodecTest.java
Thu Aug 21 05:59:56 2008
@@ -20,6 +20,9 @@
 package org.apache.directory.mitosis.service.protocol.codec;
 
 
+import java.util.Queue;
+import java.util.concurrent.LinkedBlockingQueue;
+
 import junit.framework.Assert;
 
 import org.apache.directory.mitosis.service.protocol.message.BaseMessage;
@@ -31,8 +34,6 @@
 import org.apache.mina.filter.codec.support.SimpleProtocolEncoderOutput;
 import org.junit.Test;
 
-import sun.misc.Queue;
-
 
 public abstract class AbstractMessageCodecTest
 {
@@ -82,7 +83,7 @@
         ProtocolDecoderOutputImpl decoderOut = new ProtocolDecoderOutputImpl();
         decoder.decode( null, buf, decoderOut );
 
-        Assert.assertTrue( compare( message, ( BaseMessage ) decoderOut.messages.dequeue()
) );
+        Assert.assertTrue( compare( message, ( BaseMessage ) decoderOut.messages.poll() )
);
     }
 
 
@@ -93,7 +94,7 @@
 
     private class ProtocolDecoderOutputImpl implements ProtocolDecoderOutput
     {
-        private final Queue messages = new Queue();
+        private final Queue<Object> messages = new LinkedBlockingQueue<Object>();
 
 
         public void flush()
@@ -103,7 +104,7 @@
 
         public void write( Object message )
         {
-            messages.enqueue( message );
+            messages.add( message );
         }
     }
 }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java?rev=687734&r1=687733&r2=687734&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java
Thu Aug 21 05:59:56 2008
@@ -27,7 +27,6 @@
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.ldap.LdapSession;
-import org.apache.directory.shared.ldap.codec.util.LdapURL;
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
@@ -48,6 +47,7 @@
 import org.apache.directory.shared.ldap.message.SearchRequest;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.ExceptionUtils;
+import org.apache.directory.shared.ldap.util.LdapURL;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java?rev=687734&r1=687733&r2=687734&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
Thu Aug 21 05:59:56 2008
@@ -29,7 +29,6 @@
 import org.apache.directory.server.core.event.NotificationCriteria;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.ldap.LdapSession;
-import org.apache.directory.shared.ldap.codec.util.LdapURL;
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
@@ -53,6 +52,7 @@
 import org.apache.directory.shared.ldap.message.SearchResponseReferenceImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.util.LdapURL;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchTimeLimitingMonitor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchTimeLimitingMonitor.java?rev=687734&r1=687733&r2=687734&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchTimeLimitingMonitor.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchTimeLimitingMonitor.java
Thu Aug 21 05:59:56 2008
@@ -55,9 +55,6 @@
             case SECONDS:
                 this.millisToLive = timeToLive * 1000;
                 break;
-            case MINUTES:
-                this.millisToLive = timeToLive * 60000;
-                break;
             default:
                 throw new IllegalStateException( "TimeUnit not supported: " + unit );
         }



Mime
View raw message