commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nutty...@apache.org
Subject svn commit: r441253 - /jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/listener/ObjectProcessedEventCounter.java
Date Thu, 07 Sep 2006 22:05:05 GMT
Author: nuttycom
Date: Thu Sep  7 15:05:04 2006
New Revision: 441253

URL: http://svn.apache.org/viewvc?view=rev&rev=441253
Log:
Fixed ClassCastException when processing unrecognized events

Modified:
    jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/listener/ObjectProcessedEventCounter.java

Modified: jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/listener/ObjectProcessedEventCounter.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/listener/ObjectProcessedEventCounter.java?view=diff&rev=441253&r1=441252&r2=441253
==============================================================================
--- jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/listener/ObjectProcessedEventCounter.java
(original)
+++ jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/listener/ObjectProcessedEventCounter.java
Thu Sep  7 15:05:04 2006
@@ -38,8 +38,10 @@
     private Map<Stage,Integer> counts = Collections.synchronizedMap(new HashMap<Stage,
Integer>());
     
     public synchronized void notify(EventObject evo) {
+        if (evo instanceof ObjectProcessedEvent) {
         ObjectProcessedEvent ev = (ObjectProcessedEvent) evo;
         if (!counts.containsKey(ev.getSource())) counts.put(ev.getSource(), 1);
+    }
     }
     
     public Map<Stage, Integer> getCounts() {



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message