Scarab commit: svn commit: r10232 - branches/release/b21/src/java/org/tigris/scarab/om/Issue.java

[email protected]
Newsgroups gmane.comp.java.scarab.cvs
Message-ID <[email protected]>
Author: dabbous
Date: 2006-08-01 01:01:32-0700
New Revision: 10232

Modified:
   branches/release/b21/src/java/org/tigris/scarab/om/Issue.java

Log:
Applied patch for SCB1738 (previous apply did not work for some reason).

Added a warning-logmessage to the original patch, which fires in case of an 

attribute in the list of nonmatching attributes is not a UserAttribute.

Modified: branches/release/b21/src/java/org/tigris/scarab/om/Issue.java
Url: http://scarab.tigris.org/source/browse/scarab/branches/release/b21/src/java/org/tigris/scarab/om/Issue.java?view=diff&rev=10232&p1=branches/release/b21/src/java/org/tigris/scarab/om/Issue.java&p2=branches/release/b21/src/java/org/tigris/scarab/om/Issue.java&r1=10231&r2=10232
==============================================================================
--- branches/release/b21/src/java/org/tigris/scarab/om/Issue.java	(original)
+++ branches/release/b21/src/java/org/tigris/scarab/om/Issue.java	2006-08-01 01:01:32-0700
@@ -2346,8 +2346,19 @@
         {
             for (Iterator it = nonmatching.iterator(); !bRdo && it.hasNext(); )
             {
-                UserAttribute userAttr = (UserAttribute)it.next();
-                bRdo = userAttr.getUserName().equals(((UserAttribute)value).getUserName());
+                Object attr = it.next();
+                if (attr instanceof UserAttribute)
+                {
+                    UserAttribute userAttr = (UserAttribute)attr;
+                    bRdo = userAttr.getUserName().equals(((UserAttribute)value).getUserName());
+                }
+                else
+                {
+                    Log.get().warn("in Issue.isNonMatchingAttribute: encountered an attribute of type ["
+                            + attr.getClass().getName()
+                            +"] in the list of nonmatching objects");
+                    Log.get().warn("This is not a UserAttribute.(ignored)");
+                }
             }
         }
         else
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.