directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r151533 - in incubator/directory/network/trunk/mina/src/java/org/apache/mina/util: IoHandlerFilterManager.java ProtocolHandlerFilterManager.java
Date Sun, 06 Feb 2005 02:50:39 GMT
Author: trustin
Date: Sat Feb  5 18:50:37 2005
New Revision: 151533

URL: http://svn.apache.org/viewcvs?view=rev&rev=151533
Log:
Prevented from users to remove internal filters.

Modified:
    incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/IoHandlerFilterManager.java
    incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/ProtocolHandlerFilterManager.java

Modified: incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/IoHandlerFilterManager.java
URL: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/IoHandlerFilterManager.java?view=diff&r1=151532&r2=151533
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/IoHandlerFilterManager.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/IoHandlerFilterManager.java
Sat Feb  5 18:50:37 2005
@@ -128,6 +128,12 @@
 
     public synchronized void removeFilter( IoHandlerFilter filter )
     {
+    	if( filter == tail )
+    	{
+    		throw new IllegalArgumentException(
+    				"Cannot remove the internal filter.");
+    	}
+
         Entry e = head;
         Entry prevEntry = null;
         for( ;; )

Modified: incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/ProtocolHandlerFilterManager.java
URL: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/ProtocolHandlerFilterManager.java?view=diff&r1=151532&r2=151533
==============================================================================
--- incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/ProtocolHandlerFilterManager.java
(original)
+++ incubator/directory/network/trunk/mina/src/java/org/apache/mina/util/ProtocolHandlerFilterManager.java
Sat Feb  5 18:50:37 2005
@@ -123,6 +123,12 @@
 
     public synchronized void removeFilter( ProtocolHandlerFilter filter )
     {
+    	if( filter == tail )
+    	{
+    		throw new IllegalArgumentException(
+    				"Cannot remove the internal filter.");
+    	}
+
         Entry e = head;
         Entry prevEntry = null;
         for( ;; )



Mime
View raw message