You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2015/08/28 19:16:11 UTC

[11/12] isis git commit: ISIS-1044: ignore new InteractionEvents in WrapperFactory's notifyListener stuff.

ISIS-1044: ignore new InteractionEvents in WrapperFactory's notifyListener stuff.


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/51cd5f30
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/51cd5f30
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/51cd5f30

Branch: refs/heads/ISIS-1044
Commit: 51cd5f30e66049345a3e287864aced32b85a17ba
Parents: 4ac11bb
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Aug 28 15:40:35 2015 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Aug 28 18:14:02 2015 +0100

----------------------------------------------------------------------
 .../org/apache/isis/core/wrapper/WrapperFactoryAbstract.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/51cd5f30/core/wrapper/src/main/java/org/apache/isis/core/wrapper/WrapperFactoryAbstract.java
----------------------------------------------------------------------
diff --git a/core/wrapper/src/main/java/org/apache/isis/core/wrapper/WrapperFactoryAbstract.java b/core/wrapper/src/main/java/org/apache/isis/core/wrapper/WrapperFactoryAbstract.java
index fc0f72b..0c79bee 100644
--- a/core/wrapper/src/main/java/org/apache/isis/core/wrapper/WrapperFactoryAbstract.java
+++ b/core/wrapper/src/main/java/org/apache/isis/core/wrapper/WrapperFactoryAbstract.java
@@ -261,9 +261,13 @@ public abstract class WrapperFactoryAbstract implements WrapperFactory, Authenti
 
     @Override
     public void notifyListeners(final InteractionEvent interactionEvent) {
-        final InteractionEventDispatcher dispatcher = dispatchersByEventClass.get(interactionEvent.getClass());
+        final Class<? extends InteractionEvent> aClass = interactionEvent.getClass();
+        final InteractionEventDispatcher dispatcher = dispatchersByEventClass.get(aClass);
         if (dispatcher == null) {
-            throw new RuntimeException("Unknown InteractionEvent - register into dispatchers map");
+            // in ISIS-1044 have added some further InteractionEvents.  Since this stuff is all now deprecated, have decided to simply
+            // ignore.  (Handling properly would require extending the InteractionListener interface, already deprecated).
+            // throw new RuntimeException("Unknown InteractionEvent '" + aClass.getName() + "'- register into dispatchers map");
+            return;
         }
         dispatcher.dispatch(interactionEvent);
     }