You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2018/10/04 13:11:37 UTC

[isis] branch v2 updated: ISIS-1976: removing guava from plugins 'shiro' and 'axon'

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch v2
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/v2 by this push:
     new 2fa89ab  ISIS-1976: removing guava from plugins 'shiro' and 'axon'
2fa89ab is described below

commit 2fa89abb8ee401d8d646323e1463f0bcec950d19
Author: Andi Huber <ah...@apache.org>
AuthorDate: Thu Oct 4 15:11:30 2018 +0200

    ISIS-1976: removing guava from plugins 'shiro' and 'axon'
    
    Task-Url: https://issues.apache.org/jira/browse/ISIS-1976
---
 .../EventBusServiceDefaultUsingAxonSimpleTest.java         | 14 +++++++-------
 .../isis/security/shiro/authorization/IsisPermission.java  |  8 +++++---
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/core/plugins/eventbus-axon/src/test/java/org/apache/isis/core/runtime/services/eventbus/EventBusServiceDefaultUsingAxonSimpleTest.java b/core/plugins/eventbus-axon/src/test/java/org/apache/isis/core/runtime/services/eventbus/EventBusServiceDefaultUsingAxonSimpleTest.java
index 0cd6726..36376c0 100644
--- a/core/plugins/eventbus-axon/src/test/java/org/apache/isis/core/runtime/services/eventbus/EventBusServiceDefaultUsingAxonSimpleTest.java
+++ b/core/plugins/eventbus-axon/src/test/java/org/apache/isis/core/runtime/services/eventbus/EventBusServiceDefaultUsingAxonSimpleTest.java
@@ -22,13 +22,13 @@ import static org.junit.Assert.assertThat;
 
 import java.util.List;
 
-import org.apache.isis.applib.services.registry.ServiceRegistry;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
 
-import com.google.common.collect.ImmutableMap;
+import org.apache.isis.applib.services.registry.ServiceRegistry;
+import org.apache.isis.commons.internal.collections._Maps;
 
 public class EventBusServiceDefaultUsingAxonSimpleTest {
 
@@ -103,7 +103,7 @@ public class EventBusServiceDefaultUsingAxonSimpleTest {
         @Test
         public void allow_late_registration_means_can_register_after_post() throws Exception {
             // given
-            eventBusService.init(ImmutableMap.of(
+            eventBusService.init(_Maps.unmodifiable(
                     EventBusServiceDefault.KEY_ALLOW_LATE_REGISTRATION, "true",
                     EventBusServiceDefault.KEY_EVENT_BUS_IMPLEMENTATION, EVENTBUS_IMPL_NAME));
             assertThat(eventBusService.isAllowLateRegistration(), is(true));
@@ -121,7 +121,7 @@ public class EventBusServiceDefaultUsingAxonSimpleTest {
         @Test
         public void disallow_late_registration_means_cannot_register_after_post() throws Exception {
             // given
-            eventBusService.init(ImmutableMap.of(
+            eventBusService.init(_Maps.unmodifiable(
                     EventBusServiceDefault.KEY_ALLOW_LATE_REGISTRATION, "false",
                     EventBusServiceDefault.KEY_EVENT_BUS_IMPLEMENTATION, EVENTBUS_IMPL_NAME));
             assertThat(eventBusService.isAllowLateRegistration(), is(false));
@@ -139,7 +139,7 @@ public class EventBusServiceDefaultUsingAxonSimpleTest {
         @Test
         public void disallow_late_registration_means_can_register_before_post() throws Exception {
             // given
-            eventBusService.init(ImmutableMap.of(
+            eventBusService.init(_Maps.unmodifiable(
                     EventBusServiceDefault.KEY_ALLOW_LATE_REGISTRATION, "false",
                     EventBusServiceDefault.KEY_EVENT_BUS_IMPLEMENTATION, EVENTBUS_IMPL_NAME));
             assertThat(eventBusService.isAllowLateRegistration(), is(false));
@@ -158,7 +158,7 @@ public class EventBusServiceDefaultUsingAxonSimpleTest {
         @Test
         public void multiple_subscribers_receive_same_event_if_same_type() throws Exception {
             // given
-            eventBusService.init(ImmutableMap.of(
+            eventBusService.init(_Maps.unmodifiable(
                     EventBusServiceDefault.KEY_ALLOW_LATE_REGISTRATION, "false",
                     EventBusServiceDefault.KEY_EVENT_BUS_IMPLEMENTATION, EVENTBUS_IMPL_NAME));
             assertThat(eventBusService.isAllowLateRegistration(), is(false));
@@ -190,7 +190,7 @@ public class EventBusServiceDefaultUsingAxonSimpleTest {
         @Test
         public void multiple_subscribers_eventlistener() throws Exception {
             // given
-            eventBusService.init(ImmutableMap.of(
+            eventBusService.init(_Maps.unmodifiable(
                     EventBusServiceDefault.KEY_ALLOW_LATE_REGISTRATION, "false",
                     EventBusServiceDefault.KEY_EVENT_BUS_IMPLEMENTATION, EVENTBUS_IMPL_NAME));
             assertThat(eventBusService.isAllowLateRegistration(), is(false));
diff --git a/core/plugins/security-shiro/src/main/java/org/apache/isis/security/shiro/authorization/IsisPermission.java b/core/plugins/security-shiro/src/main/java/org/apache/isis/security/shiro/authorization/IsisPermission.java
index db53f66..317899d 100644
--- a/core/plugins/security-shiro/src/main/java/org/apache/isis/security/shiro/authorization/IsisPermission.java
+++ b/core/plugins/security-shiro/src/main/java/org/apache/isis/security/shiro/authorization/IsisPermission.java
@@ -22,11 +22,13 @@ import java.util.List;
 import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-import org.apache.isis.commons.internal.collections._Lists;
-import com.google.common.collect.Maps;
+
 import org.apache.shiro.authz.Permission;
 import org.apache.shiro.authz.permission.WildcardPermission;
 
+import org.apache.isis.commons.internal.collections._Lists;
+import org.apache.isis.commons.internal.collections._Maps;
+
 public class IsisPermission extends WildcardPermission {
 
     private static final long serialVersionUID = 1L;
@@ -34,7 +36,7 @@ public class IsisPermission extends WildcardPermission {
 
     private static ThreadLocal<Map<String,List<IsisPermission>>> VETOING_PERMISSIONS = new ThreadLocal<Map<String,List<IsisPermission>>>() {
         @Override
-        protected java.util.Map<String,List<IsisPermission>> initialValue() { return Maps.newTreeMap(); }
+        protected java.util.Map<String,List<IsisPermission>> initialValue() { return _Maps.newTreeMap(); }
     };
 
     public static void resetVetoedPermissions() {