directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r596810 - in /directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message: ExtendedRequestImpl.java ExtendedResponseImpl.java
Date Tue, 20 Nov 2007 20:13:32 GMT
Author: felixk
Date: Tue Nov 20 12:13:31 2007
New Revision: 596810

URL: http://svn.apache.org/viewvc?rev=596810&view=rev
Log:
Prevent possible ClassCast Exception

Modified:
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequestImpl.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedResponseImpl.java

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequestImpl.java?rev=596810&r1=596809&r2=596810&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequestImpl.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequestImpl.java
Tue Nov 20 12:13:31 2007
@@ -167,6 +167,11 @@
         {
             return false;
         }
+        
+        if ( !( obj instanceof ExtendedRequest ) )
+        {
+            return false;
+        }
 
         ExtendedRequest req = ( ExtendedRequest ) obj;
         if ( oid != null && req.getOid() == null )

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedResponseImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedResponseImpl.java?rev=596810&r1=596809&r2=596810&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedResponseImpl.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedResponseImpl.java
Tue Nov 20 12:13:31 2007
@@ -138,6 +138,11 @@
         {
             return false;
         }
+        
+        if ( !( obj instanceof ExtendedResponse ) )
+        {
+            return false;
+        }
 
         ExtendedResponse resp = ( ExtendedResponse ) obj;
 



Mime
View raw message