You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/11/21 17:43:28 UTC

[commons-jcs] branch master updated: Use blocks.

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

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-jcs.git


The following commit(s) were added to refs/heads/master by this push:
     new 9dcbdd9  Use blocks.
9dcbdd9 is described below

commit 9dcbdd90277b444752a4903af0619648f30fc0ba
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Nov 21 12:43:24 2020 -0500

    Use blocks.
---
 .../java/org/apache/commons/jcs3/auxiliary/disk/DiskTestObject.java | 6 ++++--
 .../commons/jcs3/jcache/jmx/ConfigurableMBeanServerIdBuilder.java   | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/DiskTestObject.java b/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/DiskTestObject.java
index a2cb415..ed0fa34 100644
--- a/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/DiskTestObject.java
+++ b/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/DiskTestObject.java
@@ -59,9 +59,11 @@ public class DiskTestObject implements Serializable
         if (other instanceof DiskTestObject)
         {
             final DiskTestObject o = (DiskTestObject) other;
-            if (id != null)
+            if (id != null) {
                 return id.equals(o.id) && Arrays.equals(imageBytes, o.imageBytes);
-            else if (id == null && o.id == null) return Arrays.equals(imageBytes, o.imageBytes);
+            } else if (id == null && o.id == null) {
+                return Arrays.equals(imageBytes, o.imageBytes);
+            }
         }
         return false;
     }
diff --git a/commons-jcs-jcache/src/main/java/org/apache/commons/jcs3/jcache/jmx/ConfigurableMBeanServerIdBuilder.java b/commons-jcs-jcache/src/main/java/org/apache/commons/jcs3/jcache/jmx/ConfigurableMBeanServerIdBuilder.java
index 3b4acde..5bc04bc 100644
--- a/commons-jcs-jcache/src/main/java/org/apache/commons/jcs3/jcache/jmx/ConfigurableMBeanServerIdBuilder.java
+++ b/commons-jcs-jcache/src/main/java/org/apache/commons/jcs3/jcache/jmx/ConfigurableMBeanServerIdBuilder.java
@@ -47,10 +47,12 @@ public class ConfigurableMBeanServerIdBuilder extends MBeanServerBuilder
         @Override
         public boolean equals(final Object o)
         {
-            if (this == o)
+            if (this == o) {
                 return true;
-            if (o == null || getClass() != o.getClass())
+            }
+            if (o == null || getClass() != o.getClass()) {
                 return false;
+            }
 
             final Key key = Key.class.cast(o);
             return !(domain != null ? !domain.equals(key.domain) : key.domain != null)