geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r702414 - /geronimo/gshell/trunk/gshell-support/gshell-event/src/main/java/org/apache/geronimo/gshell/event/EventAdapter.java
Date Tue, 07 Oct 2008 09:45:51 GMT
Author: jdillon
Date: Tue Oct  7 02:45:50 2008
New Revision: 702414

URL: http://svn.apache.org/viewvc?rev=702414&view=rev
Log:
Revert back to first hack attempt, maybe need to implement a better event subscription model

Modified:
    geronimo/gshell/trunk/gshell-support/gshell-event/src/main/java/org/apache/geronimo/gshell/event/EventAdapter.java

Modified: geronimo/gshell/trunk/gshell-support/gshell-event/src/main/java/org/apache/geronimo/gshell/event/EventAdapter.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-event/src/main/java/org/apache/geronimo/gshell/event/EventAdapter.java?rev=702414&r1=702413&r2=702414&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-event/src/main/java/org/apache/geronimo/gshell/event/EventAdapter.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-event/src/main/java/org/apache/geronimo/gshell/event/EventAdapter.java
Tue Oct  7 02:45:50 2008
@@ -29,17 +29,13 @@
 {
     @SuppressWarnings({"unchecked"})
     public void onEvent(final Event event) throws Exception {
-        T targetEvent = null;
+        assert event != null;
 
         // HACK: Can't check the type from T, so just handle the CCE, might not be very efficent
though :-(
         try {
-            targetEvent = (T)event;
+            handleEvent((T)event);
         }
         catch (ClassCastException ignore) {}
-
-        if (targetEvent != null) {
-            handleEvent(targetEvent);
-        }
     }
 
     protected abstract void handleEvent(T event) throws Exception;



Mime
View raw message