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 2023/04/18 14:42:45 UTC
[commons-jcs] branch master updated: Format: "catch(" -> "catch ("
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 878c1a11 Format: "catch(" -> "catch ("
878c1a11 is described below
commit 878c1a11ce603a2b764a533879fd07bae4f45234
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Apr 18 10:42:40 2023 -0400
Format: "catch(" -> "catch ("
---
.../org/apache/commons/jcs/yajcache/file/CacheFileDAO.java | 10 +++++-----
.../java/org/apache/commons/jcs/yajcache/util/BeanUtils.java | 2 +-
.../jcs/yajcache/util/concurrent/locks/KeyedReadWriteLock.java | 4 ++--
.../org/apache/commons/jcs/yajcache/core/CacheManagerTest.java | 4 ++--
.../apache/commons/jcs/yajcache/core/SafeCacheManagerTest.java | 6 +++---
.../apache/commons/jcs/yajcache/file/FileContentTypeTest.java | 2 +-
6 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/commons-jcs-sandbox/yajcache/src/main/java/org/apache/commons/jcs/yajcache/file/CacheFileDAO.java b/commons-jcs-sandbox/yajcache/src/main/java/org/apache/commons/jcs/yajcache/file/CacheFileDAO.java
index 3c3f94e8..55d3c358 100644
--- a/commons-jcs-sandbox/yajcache/src/main/java/org/apache/commons/jcs/yajcache/file/CacheFileDAO.java
+++ b/commons-jcs-sandbox/yajcache/src/main/java/org/apache/commons/jcs/yajcache/file/CacheFileDAO.java
@@ -65,14 +65,14 @@ public enum CacheFileDAO {
raf = new RandomAccessFile(file, "rw");
CacheFileContent.getInstance(type, val).write(raf);
return true;
- } catch(IOException ex) {
+ } catch (IOException ex) {
countWriteIOException.incrementAndGet();
log.error("", ex);
} finally {
if (raf != null) {
try {
raf.close();
- } catch(Exception ex) {
+ } catch (Exception ex) {
countWriteCloseException.incrementAndGet();
log.error("", ex);
}
@@ -124,17 +124,17 @@ public enum CacheFileDAO {
return CacheFileContent.CORRUPTED;
}
return cfc;
- } catch(IOException ex) {
+ } catch (IOException ex) {
countReadIOException.incrementAndGet();
log.warn(ex.getClass().getName(), ex);
- } catch(org.apache.commons.lang3.SerializationException ex) {
+ } catch (org.apache.commons.lang3.SerializationException ex) {
countReadIOException.incrementAndGet();
log.warn(ex.getClass().getName(), ex);
} finally {
if (raf != null) {
try {
raf.close();
- } catch(Exception ex) {
+ } catch (Exception ex) {
countReadCloseException.incrementAndGet();
log.error("", ex);
}
diff --git a/commons-jcs-sandbox/yajcache/src/main/java/org/apache/commons/jcs/yajcache/util/BeanUtils.java b/commons-jcs-sandbox/yajcache/src/main/java/org/apache/commons/jcs/yajcache/util/BeanUtils.java
index 821dd8a3..9b65217f 100644
--- a/commons-jcs-sandbox/yajcache/src/main/java/org/apache/commons/jcs/yajcache/util/BeanUtils.java
+++ b/commons-jcs-sandbox/yajcache/src/main/java/org/apache/commons/jcs/yajcache/util/BeanUtils.java
@@ -49,7 +49,7 @@ public enum BeanUtils {
return bean;
try {
return (B)org.apache.commons.beanutils.BeanUtils.cloneBean(bean);
- } catch(Exception ex) {
+ } catch (Exception ex) {
LogFactory.getLog(this.getClass()).error("", ex);
throw new RuntimeException(ex);
}
diff --git a/commons-jcs-sandbox/yajcache/src/main/java/org/apache/commons/jcs/yajcache/util/concurrent/locks/KeyedReadWriteLock.java b/commons-jcs-sandbox/yajcache/src/main/java/org/apache/commons/jcs/yajcache/util/concurrent/locks/KeyedReadWriteLock.java
index f58a4cdc..49bed930 100644
--- a/commons-jcs-sandbox/yajcache/src/main/java/org/apache/commons/jcs/yajcache/util/concurrent/locks/KeyedReadWriteLock.java
+++ b/commons-jcs-sandbox/yajcache/src/main/java/org/apache/commons/jcs/yajcache/util/concurrent/locks/KeyedReadWriteLock.java
@@ -119,9 +119,9 @@ public class KeyedReadWriteLock<K> implements IKeyedReadWriteLock<K> {
this.countRWLockCreate.incrementAndGet();
try {
return rwlClass.newInstance();
- } catch(IllegalAccessException ex) {
+ } catch (IllegalAccessException ex) {
throw new RuntimeException(ex);
- } catch(InstantiationException ex) {
+ } catch (InstantiationException ex) {
throw new RuntimeException(ex);
}
}
diff --git a/commons-jcs-sandbox/yajcache/src/test/java/org/apache/commons/jcs/yajcache/core/CacheManagerTest.java b/commons-jcs-sandbox/yajcache/src/test/java/org/apache/commons/jcs/yajcache/core/CacheManagerTest.java
index 7a77d2bb..99ddfd66 100644
--- a/commons-jcs-sandbox/yajcache/src/test/java/org/apache/commons/jcs/yajcache/core/CacheManagerTest.java
+++ b/commons-jcs-sandbox/yajcache/src/test/java/org/apache/commons/jcs/yajcache/core/CacheManagerTest.java
@@ -70,7 +70,7 @@ public class CacheManagerTest extends TestCase {
try {
ICache<Integer> c2 = CacheManager.inst.getCache("myCache", Integer.class);
assert false : "Bug: Cache for string cannot be used for Integer";
- } catch(ClassCastException ex) {
+ } catch (ClassCastException ex) {
// should go here.
}
log.debug(CacheManager.inst);
@@ -89,7 +89,7 @@ public class CacheManagerTest extends TestCase {
CacheManager.inst.testCreateCacheRaceCondition(
"race", Double.class, CacheType.SOFT_REFERENCE);
assert false : "Bug: Cache for Integer cannot be used for Double";
- } catch(ClassCastException ex) {
+ } catch (ClassCastException ex) {
// should go here.
}
assertTrue(intCache == intCache1);
diff --git a/commons-jcs-sandbox/yajcache/src/test/java/org/apache/commons/jcs/yajcache/core/SafeCacheManagerTest.java b/commons-jcs-sandbox/yajcache/src/test/java/org/apache/commons/jcs/yajcache/core/SafeCacheManagerTest.java
index 253797e6..3b79027f 100644
--- a/commons-jcs-sandbox/yajcache/src/test/java/org/apache/commons/jcs/yajcache/core/SafeCacheManagerTest.java
+++ b/commons-jcs-sandbox/yajcache/src/test/java/org/apache/commons/jcs/yajcache/core/SafeCacheManagerTest.java
@@ -68,7 +68,7 @@ public class SafeCacheManagerTest extends TestCase {
try {
ICacheSafe<Integer> c2 = CacheManager.inst.getSafeCache("myCache", Integer.class);
assert false : "Bug: Cache for string cannot be used for Integer.";
- } catch(ClassCastException ex) {
+ } catch (ClassCastException ex) {
// should go here.
}
log.debug(CacheManager.inst);
@@ -86,7 +86,7 @@ public class SafeCacheManagerTest extends TestCase {
ICache doubleCache = CacheManager.inst.testCreateCacheRaceCondition(
"race", Double.class, CacheType.SOFT_REFERENCE_SAFE);
assert false : "Bug: Cache for Integer cannot be used for Double.";
- } catch(ClassCastException ex) {
+ } catch (ClassCastException ex) {
// should go here.
}
assertTrue(intCache == intCache1);
@@ -175,7 +175,7 @@ public class SafeCacheManagerTest extends TestCase {
try {
ICacheSafe<Integer> c2 = CacheManager.inst.getSafeCache("myCache", Integer.class);
assert false : "Bug: Cache for string cannot be used for Integer.";
- } catch(ClassCastException ex) {
+ } catch (ClassCastException ex) {
// should go here.
}
log.debug(CacheManager.inst);
diff --git a/commons-jcs-sandbox/yajcache/src/test/java/org/apache/commons/jcs/yajcache/file/FileContentTypeTest.java b/commons-jcs-sandbox/yajcache/src/test/java/org/apache/commons/jcs/yajcache/file/FileContentTypeTest.java
index 5d150de8..ca2297fa 100644
--- a/commons-jcs-sandbox/yajcache/src/test/java/org/apache/commons/jcs/yajcache/file/FileContentTypeTest.java
+++ b/commons-jcs-sandbox/yajcache/src/test/java/org/apache/commons/jcs/yajcache/file/FileContentTypeTest.java
@@ -47,7 +47,7 @@ public class FileContentTypeTest extends TestCase {
try {
CacheFileContentType.fromByte((byte)99);
assert false;
- } catch(IllegalArgumentException ex) {
+ } catch (IllegalArgumentException ex) {
}
}
}