geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject geode git commit: Cleanup imports, add @Ignore
Date Fri, 16 Jun 2017 17:48:45 GMT
Repository: geode
Updated Branches:
  refs/heads/feature/GEODE-3062-2 02a5730f8 -> 15e330145


Cleanup imports, add @Ignore


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/15e33014
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/15e33014
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/15e33014

Branch: refs/heads/feature/GEODE-3062-2
Commit: 15e3301454968c3406c779de474845c356c37515
Parents: 02a5730
Author: Kirk Lund <klund@apache.org>
Authored: Fri Jun 16 10:48:33 2017 -0700
Committer: Kirk Lund <klund@apache.org>
Committed: Fri Jun 16 10:48:33 2017 -0700

----------------------------------------------------------------------
 .../security/IntegratedSecurityService.java     | 40 +++++++++-------
 .../security/LegacySecurityService.java         | 15 +-----
 .../internal/security/SecurityService.java      | 48 ++++++++++----------
 .../security/SecurityServiceFactory.java        | 10 ++--
 4 files changed, 53 insertions(+), 60 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/15e33014/geode-core/src/main/java/org/apache/geode/internal/security/IntegratedSecurityService.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/security/IntegratedSecurityService.java
b/geode-core/src/main/java/org/apache/geode/internal/security/IntegratedSecurityService.java
index 171cfb7..323ab67 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/security/IntegratedSecurityService.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/security/IntegratedSecurityService.java
@@ -14,22 +14,8 @@
  */
 package org.apache.geode.internal.security;
 
-import java.io.IOException;
-import java.security.AccessController;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.Callable;
-
 import org.apache.commons.lang.SerializationException;
 import org.apache.commons.lang.StringUtils;
-import org.apache.logging.log4j.Logger;
-import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.ShiroException;
-import org.apache.shiro.subject.Subject;
-import org.apache.shiro.subject.support.SubjectThreadState;
-import org.apache.shiro.util.ThreadContext;
-import org.apache.shiro.util.ThreadState;
-
 import org.apache.geode.GemFireIOException;
 import org.apache.geode.internal.cache.EntryEventImpl;
 import org.apache.geode.internal.logging.LogService;
@@ -46,6 +32,20 @@ import org.apache.geode.security.ResourcePermission;
 import org.apache.geode.security.ResourcePermission.Operation;
 import org.apache.geode.security.ResourcePermission.Resource;
 import org.apache.geode.security.ResourcePermission.Target;
+import org.apache.geode.security.SecurityManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.ShiroException;
+import org.apache.shiro.subject.Subject;
+import org.apache.shiro.subject.support.SubjectThreadState;
+import org.apache.shiro.util.ThreadContext;
+import org.apache.shiro.util.ThreadState;
+
+import java.io.IOException;
+import java.security.AccessController;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.Callable;
 
 /**
  * Security service with SecurityManager and an optional PostProcessor.
@@ -54,7 +54,7 @@ public class IntegratedSecurityService implements SecurityService {
   private static Logger logger = LogService.getLogger(LogService.SECURITY_LOGGER_NAME);
 
   private final PostProcessor postProcessor;
-  private final org.apache.geode.security.SecurityManager securityManager;
+  private final SecurityManager securityManager;
 
   /**
    * this creates a security service using a SecurityManager
@@ -72,11 +72,13 @@ public class IntegratedSecurityService implements SecurityService {
     this.postProcessor = postProcessor;
   }
 
+  @Override
   public PostProcessor getPostProcessor() {
     return this.postProcessor;
   }
 
-  public org.apache.geode.security.SecurityManager getSecurityManager() {
+  @Override
+  public SecurityManager getSecurityManager() {
     return this.securityManager;
   }
 
@@ -187,6 +189,7 @@ public class IntegratedSecurityService implements SecurityService {
     return threadState;
   }
 
+  @Override
   public void authorizeClusterManage() {
     authorize(Resource.CLUSTER, Operation.MANAGE, Target.ALL, ResourcePermission.ALL);
   }
@@ -266,14 +269,17 @@ public class IntegratedSecurityService implements SecurityService {
     authorize(Resource.DATA, Operation.READ, regionName, key);
   }
 
+  @Override
   public void authorize(Resource resource, Operation operation, Target target, String key)
{
     authorize(resource, operation, target.getName(), key);
   }
 
+  @Override
   public void authorize(Resource resource, Operation operation, Target target) {
     authorize(resource, operation, target, ResourcePermission.ALL);
   }
 
+  @Override
   public void authorize(Resource resource, Operation operation, String target, String key)
{
     authorize(new ResourcePermission(resource, operation, target, key));
   }
@@ -300,7 +306,7 @@ public class IntegratedSecurityService implements SecurityService {
   @Override
   public void close() {
     if (this.securityManager != null) {
-      securityManager.close();
+      this.securityManager.close();
     }
     if (this.postProcessor != null) {
       this.postProcessor.close();

http://git-wip-us.apache.org/repos/asf/geode/blob/15e33014/geode-core/src/main/java/org/apache/geode/internal/security/LegacySecurityService.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/security/LegacySecurityService.java
b/geode-core/src/main/java/org/apache/geode/internal/security/LegacySecurityService.java
index c594bf9..66b6876 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/security/LegacySecurityService.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/security/LegacySecurityService.java
@@ -14,17 +14,7 @@
  */
 package org.apache.geode.internal.security;
 
-import java.util.Properties;
-import java.util.concurrent.Callable;
-
 import org.apache.commons.lang.StringUtils;
-import org.apache.shiro.subject.Subject;
-import org.apache.shiro.util.ThreadState;
-
-import org.apache.geode.management.internal.security.ResourceOperation;
-import org.apache.geode.security.PostProcessor;
-import org.apache.geode.security.ResourcePermission;
-import org.apache.geode.security.SecurityManager;
 
 /**
  * implementing SecurityService when only legacy authenticators are specified
@@ -32,12 +22,11 @@ import org.apache.geode.security.SecurityManager;
 public class LegacySecurityService implements SecurityService {
 
   private final boolean hasClientAuthenticator;
-
   private final boolean hasPeerAuthenticator;
 
   LegacySecurityService() {
-    hasClientAuthenticator = false;
-    hasPeerAuthenticator = false;
+    this.hasClientAuthenticator = false;
+    this.hasPeerAuthenticator = false;
   }
 
   LegacySecurityService(final String clientAuthenticator, final String peerAuthenticator)
{

http://git-wip-us.apache.org/repos/asf/geode/blob/15e33014/geode-core/src/main/java/org/apache/geode/internal/security/SecurityService.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/security/SecurityService.java
b/geode-core/src/main/java/org/apache/geode/internal/security/SecurityService.java
index feea899..61599a1 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/security/SecurityService.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/security/SecurityService.java
@@ -14,7 +14,6 @@
  */
 package org.apache.geode.internal.security;
 
-import org.apache.geode.management.internal.security.ResourceOperation;
 import org.apache.geode.security.PostProcessor;
 import org.apache.geode.security.ResourcePermission;
 import org.apache.geode.security.ResourcePermission.Resource;
@@ -28,6 +27,7 @@ import java.util.Properties;
 import java.util.concurrent.Callable;
 
 public interface SecurityService {
+  
   default ThreadState bindSubject(Subject subject) {
     return null;
   }
@@ -40,57 +40,57 @@ public interface SecurityService {
     return null;
   }
 
-  default void logout() {};
+  default void logout() {}
 
   default Callable associateWith(Callable callable) {
     return callable;
   }
 
-  default void authorize(Resource resource, Operation operation, String target, String key)
{};
+  default void authorize(Resource resource, Operation operation, String target, String key)
{}
 
-  default void authorize(Resource resource, Operation operation, Target target, String key)
{};
+  default void authorize(Resource resource, Operation operation, Target target, String key)
{}
 
-  default void authorize(Resource resource, Operation operation, Target target) {};
+  default void authorize(Resource resource, Operation operation, Target target) {}
 
-  default void authorizeClusterManage() {};
+  default void authorizeClusterManage() {}
 
-  default void authorizeClusterWrite() {};
+  default void authorizeClusterWrite() {}
 
-  default void authorizeClusterRead() {};
+  default void authorizeClusterRead() {}
 
-  default void authorizeDataManage() {};
+  default void authorizeDataManage() {}
 
-  default void authorizeDataWrite() {};
+  default void authorizeDataWrite() {}
 
-  default void authorizeDataRead() {};
+  default void authorizeDataRead() {}
 
-  default void authorizeDiskManage() {};
+  default void authorizeDiskManage() {}
 
-  default void authorizeGatewayManage() {};
+  default void authorizeGatewayManage() {}
 
-  default void authorizeJarManage() {};
+  default void authorizeJarManage() {}
 
-  default void authorizeQueryManage() {};
+  default void authorizeQueryManage() {}
 
-  default void authorizeRegionManage(String regionName) {};
+  default void authorizeRegionManage(String regionName) {}
 
-  default void authorizeRegionManage(String regionName, String key) {};
+  default void authorizeRegionManage(String regionName, String key) {}
 
-  default void authorizeRegionWrite(String regionName) {};
+  default void authorizeRegionWrite(String regionName) {}
 
-  default void authorizeRegionWrite(String regionName, String key) {};
+  default void authorizeRegionWrite(String regionName, String key) {}
 
-  default void authorizeRegionRead(String regionName) {};
+  default void authorizeRegionRead(String regionName) {}
 
-  default void authorizeRegionRead(String regionName, String key) {};
+  default void authorizeRegionRead(String regionName, String key) {}
 
-  default void authorize(ResourcePermission context) {};
+  default void authorize(ResourcePermission context) {}
 
-  default void close() {};
+  default void close() {}
 
   default boolean needPostProcess() {
     return false;
-  };
+  }
 
   default Object postProcess(String regionPath, Object key, Object value,
       boolean valueIsSerialized) {

http://git-wip-us.apache.org/repos/asf/geode/blob/15e33014/geode-core/src/main/java/org/apache/geode/internal/security/SecurityServiceFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/security/SecurityServiceFactory.java
b/geode-core/src/main/java/org/apache/geode/internal/security/SecurityServiceFactory.java
index 2e0ad95..19645b6 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/security/SecurityServiceFactory.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/security/SecurityServiceFactory.java
@@ -18,18 +18,17 @@ import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_CLIE
 import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_PEER_AUTHENTICATOR;
 import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_SHIRO_INIT;
 
-import java.util.Properties;
-
 import org.apache.commons.lang.StringUtils;
-import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.UnavailableSecurityManagerException;
-
 import org.apache.geode.internal.cache.CacheConfig;
 import org.apache.geode.internal.cache.GemFireCacheImpl;
 import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.security.shiro.SecurityManagerProvider;
 import org.apache.geode.security.PostProcessor;
 import org.apache.geode.security.SecurityManager;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.UnavailableSecurityManagerException;
+
+import java.util.Properties;
 
 public class SecurityServiceFactory {
 
@@ -106,5 +105,4 @@ public class SecurityServiceFactory {
     }
   }
 
-
 }


Mime
View raw message