geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [2/2] geode git commit: Fix spotless
Date Thu, 08 Jun 2017 23:50:24 GMT
Fix spotless


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

Branch: refs/heads/feature/GEODE-2632-21
Commit: 7efe37d0e4d8e62ba615c5d24e093fd0ca6b8440
Parents: 0360b0f
Author: Kirk Lund <klund@apache.org>
Authored: Thu Jun 8 16:50:14 2017 -0700
Committer: Kirk Lund <klund@apache.org>
Committed: Thu Jun 8 16:50:14 2017 -0700

----------------------------------------------------------------------
 .../cache/tier/sockets/BaseCommandQuery.java    |  3 +-
 .../security/EnabledSecurityService.java        |  3 +-
 .../security/shiro/ConfigInitializer.java       |  5 +--
 .../security/shiro/RealmInitializer.java        | 22 +++++-----
 .../security/DisabledSecurityServiceTest.java   | 22 +++++-----
 .../security/EnabledSecurityServiceTest.java    | 42 ++++++++++----------
 .../shiro/ConfigInitializerIntegrationTest.java | 27 ++++++-------
 .../tier/sockets/command/GetDurableCQs.java     |  7 ++--
 .../cache/tier/sockets/command/MonitorCQ.java   |  3 +-
 9 files changed, 64 insertions(+), 70 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/7efe37d0/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/BaseCommandQuery.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/BaseCommandQuery.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/BaseCommandQuery.java
index f128b1d..184aa36 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/BaseCommandQuery.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/BaseCommandQuery.java
@@ -298,7 +298,8 @@ public abstract class BaseCommandQuery extends BaseCommand {
     return false;
   }
 
-  protected void sendCqResponse(int msgType, String msgStr, int txId, Throwable e, ServerConnection
servConn) throws IOException {
+  protected void sendCqResponse(int msgType, String msgStr, int txId, Throwable e,
+      ServerConnection servConn) throws IOException {
     ChunkedMessage cqMsg = servConn.getChunkedResponseMessage();
     if (logger.isDebugEnabled()) {
       logger.debug("CQ Response message :{}", msgStr);

http://git-wip-us.apache.org/repos/asf/geode/blob/7efe37d0/geode-core/src/main/java/org/apache/geode/internal/security/EnabledSecurityService.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/security/EnabledSecurityService.java
b/geode-core/src/main/java/org/apache/geode/internal/security/EnabledSecurityService.java
index 0881f91..f971dee 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/security/EnabledSecurityService.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/security/EnabledSecurityService.java
@@ -57,7 +57,8 @@ public class EnabledSecurityService implements SecurityService {
 
   private final PostProcessor postProcessor;
 
-  EnabledSecurityService(final SecurityManager securityManager, final PostProcessor postProcessor,
final RealmInitializer realmInitializer) {
+  EnabledSecurityService(final SecurityManager securityManager, final PostProcessor postProcessor,
+      final RealmInitializer realmInitializer) {
     this.securityManager = securityManager;
     this.postProcessor = postProcessor;
     realmInitializer.initialize(this.securityManager);

http://git-wip-us.apache.org/repos/asf/geode/blob/7efe37d0/geode-core/src/main/java/org/apache/geode/internal/security/shiro/ConfigInitializer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/security/shiro/ConfigInitializer.java
b/geode-core/src/main/java/org/apache/geode/internal/security/shiro/ConfigInitializer.java
index 036a51e..60f014b 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/security/shiro/ConfigInitializer.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/security/shiro/ConfigInitializer.java
@@ -26,8 +26,7 @@ public class ConfigInitializer {
   }
 
   public void initialize(String shiroConfig) {
-    IniSecurityManagerFactory factory =
-        new IniSecurityManagerFactory("classpath:" + shiroConfig);
+    IniSecurityManagerFactory factory = new IniSecurityManagerFactory("classpath:" + shiroConfig);
 
     // we will need to make sure that shiro uses a case sensitive permission resolver
     Section main = factory.getIni().addSection("main");
@@ -36,7 +35,7 @@ public class ConfigInitializer {
       main.put("iniRealm.permissionResolver", "$geodePermissionResolver");
     }
 
-    // logs "Users or Roles are already populated.  Configured Ini instance will be ignored."
+    // logs "Users or Roles are already populated. Configured Ini instance will be ignored."
     SecurityManager securityManager = factory.getInstance();
     SecurityUtils.setSecurityManager(securityManager);
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/7efe37d0/geode-core/src/main/java/org/apache/geode/internal/security/shiro/RealmInitializer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/security/shiro/RealmInitializer.java
b/geode-core/src/main/java/org/apache/geode/internal/security/shiro/RealmInitializer.java
index cd4732b..978c4dd 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/security/shiro/RealmInitializer.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/security/shiro/RealmInitializer.java
@@ -1,18 +1,16 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information
regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version
2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain
a
+ * copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under
the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express
+ * or implied. See the License for the specific language governing permissions and limitations
under
+ * the License.
  */
 package org.apache.geode.internal.security.shiro;
 

http://git-wip-us.apache.org/repos/asf/geode/blob/7efe37d0/geode-core/src/test/java/org/apache/geode/internal/security/DisabledSecurityServiceTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/security/DisabledSecurityServiceTest.java
b/geode-core/src/test/java/org/apache/geode/internal/security/DisabledSecurityServiceTest.java
index 9256c31..cacbeed 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/security/DisabledSecurityServiceTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/security/DisabledSecurityServiceTest.java
@@ -1,18 +1,16 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information
regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version
2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain
a
+ * copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under
the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express
+ * or implied. See the License for the specific language governing permissions and limitations
under
+ * the License.
  */
 package org.apache.geode.internal.security;
 

http://git-wip-us.apache.org/repos/asf/geode/blob/7efe37d0/geode-core/src/test/java/org/apache/geode/internal/security/EnabledSecurityServiceTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/security/EnabledSecurityServiceTest.java
b/geode-core/src/test/java/org/apache/geode/internal/security/EnabledSecurityServiceTest.java
index 1843afd..fca7eae 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/security/EnabledSecurityServiceTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/security/EnabledSecurityServiceTest.java
@@ -1,18 +1,16 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information
regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version
2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain
a
+ * copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under
the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express
+ * or implied. See the License for the specific language governing permissions and limitations
under
+ * the License.
  */
 package org.apache.geode.internal.security;
 
@@ -55,8 +53,10 @@ public class EnabledSecurityServiceTest {
     this.spyRealmInitializer = spy(RealmInitializer.class);
     this.mockSubject = mock(Subject.class);
 
-    this.securityService = new EnabledSecurityService(this.mockSecurityManager, null, this.spyRealmInitializer);
-    this.securityServiceWithPostProcessor = new EnabledSecurityService(this.mockSecurityManager,
this.mockPostProcessor, this.spyRealmInitializer);
+    this.securityService =
+        new EnabledSecurityService(this.mockSecurityManager, null, this.spyRealmInitializer);
+    this.securityServiceWithPostProcessor = new EnabledSecurityService(this.mockSecurityManager,
+        this.mockPostProcessor, this.spyRealmInitializer);
   }
 
   @Test
@@ -74,8 +74,7 @@ public class EnabledSecurityServiceTest {
   @Test
   public void getSubject_beforeLogin_shouldThrow_GemFireSecurityException() throws Exception
{
     assertThatThrownBy(() -> this.securityService.getSubject())
-        .isInstanceOf(GemFireSecurityException.class)
-        .hasMessageContaining("Anonymous User");
+        .isInstanceOf(GemFireSecurityException.class).hasMessageContaining("Anonymous User");
   }
 
   @Test
@@ -109,17 +108,16 @@ public class EnabledSecurityServiceTest {
   }
 
   @Test
-  public void associateWith_callable_beforeLogin_shouldThrow_GemFireSecurityException() throws
Exception {
+  public void associateWith_callable_beforeLogin_shouldThrow_GemFireSecurityException()
+      throws Exception {
     assertThatThrownBy(() -> this.securityService.associateWith(mock(Callable.class)))
-        .isInstanceOf(GemFireSecurityException.class)
-        .hasMessageContaining("Anonymous User");
+        .isInstanceOf(GemFireSecurityException.class).hasMessageContaining("Anonymous User");
   }
 
   @Test
   public void associateWith_null_should() throws Exception {
     assertThatThrownBy(() -> this.securityService.associateWith(null))
-        .isInstanceOf(GemFireSecurityException.class)
-        .hasMessageContaining("Anonymous User");
+        .isInstanceOf(GemFireSecurityException.class).hasMessageContaining("Anonymous User");
   }
 
   @Test
@@ -183,4 +181,4 @@ public class EnabledSecurityServiceTest {
     PostProcessor postProcessor = this.securityService.getPostProcessor();
     assertThat(postProcessor).isNull();
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/7efe37d0/geode-core/src/test/java/org/apache/geode/internal/security/shiro/ConfigInitializerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/security/shiro/ConfigInitializerIntegrationTest.java
b/geode-core/src/test/java/org/apache/geode/internal/security/shiro/ConfigInitializerIntegrationTest.java
index 4045d35..857c0be 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/security/shiro/ConfigInitializerIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/security/shiro/ConfigInitializerIntegrationTest.java
@@ -1,18 +1,16 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information
regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version
2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain
a
+ * copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under
the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express
+ * or implied. See the License for the specific language governing permissions and limitations
under
+ * the License.
  */
 package org.apache.geode.internal.security.shiro;
 
@@ -83,12 +81,11 @@ public class ConfigInitializerIntegrationTest {
   @Test
   public void initialize_fileInFilesystem() throws Exception {
     assertThatThrownBy(() -> this.configInitializer.initialize(this.shiroIniInFilesystem))
-        .isInstanceOf(ConfigurationException.class)
-        .hasMessageContaining("Resource [classpath:")
+        .isInstanceOf(ConfigurationException.class).hasMessageContaining("Resource [classpath:")
         .hasMessageContaining("ConfigInitializerIntegrationTest.ini] could not be found");
   }
 
   private String getResourcePackage(Class classInPackage) {
     return classInPackage.getName().replace(classInPackage.getSimpleName(), "").replace(".",
"/");
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/7efe37d0/geode-cq/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/GetDurableCQs.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/GetDurableCQs.java
b/geode-cq/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/GetDurableCQs.java
index 46da840..1ba5fed 100755
--- a/geode-cq/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/GetDurableCQs.java
+++ b/geode-cq/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/GetDurableCQs.java
@@ -64,8 +64,7 @@ public class GetDurableCQs extends BaseCQCommand {
     }
 
     try {
-      DefaultQueryService
-          qService =
+      DefaultQueryService qService =
           (DefaultQueryService) crHelper.getCache().getLocalQueryService();
 
       securityService.authorizeClusterRead();
@@ -119,7 +118,9 @@ public class GetDurableCQs extends BaseCQCommand {
     chunkedResponseMsg.addObjPart(list, false);
 
     if (logger.isDebugEnabled()) {
-      logger.debug("{}: Sending {} durableCQs response chunk{}", servConn.getName(), lastChunk
? " last " : " ", logger.isTraceEnabled() ? " keys=" + list + " chunk=<" + chunkedResponseMsg
+ ">" : "");
+      logger.debug("{}: Sending {} durableCQs response chunk{}", servConn.getName(),
+          lastChunk ? " last " : " ",
+          logger.isTraceEnabled() ? " keys=" + list + " chunk=<" + chunkedResponseMsg
+ ">" : "");
     }
 
     chunkedResponseMsg.sendChunk(servConn);

http://git-wip-us.apache.org/repos/asf/geode/blob/7efe37d0/geode-cq/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/MonitorCQ.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/MonitorCQ.java
b/geode-cq/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/MonitorCQ.java
index d2700dd..f5e31df 100644
--- a/geode-cq/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/MonitorCQ.java
+++ b/geode-cq/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/MonitorCQ.java
@@ -73,7 +73,8 @@ public class MonitorCQ extends BaseCQCommand {
 
     if (logger.isDebugEnabled()) {
       logger.debug("{}: Received MonitorCq request from {} op: {}{}", serverConnection.getName(),
-          serverConnection.getSocketString(), op, regionName != null ? " RegionName: " +
regionName : "");
+          serverConnection.getSocketString(), op,
+          regionName != null ? " RegionName: " + regionName : "");
     }
 
     securityService.authorizeClusterRead();


Mime
View raw message