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:41:50 UTC

[commons-jci] 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-jci.git


The following commit(s) were added to refs/heads/master by this push:
     new e6642e7  Format: "catch(" -> "catch ("
e6642e7 is described below

commit e6642e7906a52e222ee97d97e7c4ee09f19d437a
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Apr 18 10:41:46 2023 -0400

    Format: "catch(" -> "catch ("
---
 .../apache/commons/jci2/compilers/RhinoJavaCompiler.java   |  2 +-
 .../apache/commons/jci2/listeners/ReloadingListener.java   |  4 ++--
 .../apache/commons/jci2/readers/FileResourceReader.java    |  2 +-
 .../apache/commons/jci2/CompilingClassLoaderTestCase.java  |  6 +++---
 .../commons/jci2/ReloadingClassLoaderRemoveTestCase.java   | 14 +++++++-------
 .../apache/commons/jci2/ReloadingClassLoaderTestCase.java  |  6 +++---
 .../jci2/examples/serverpages/ServerPageServlet.java       |  2 +-
 .../jci2/monitor/FilesystemAlterationMonitorTestCase.java  |  6 +++---
 8 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/compilers/rhino/src/main/java/org/apache/commons/jci2/compilers/RhinoJavaCompiler.java b/compilers/rhino/src/main/java/org/apache/commons/jci2/compilers/RhinoJavaCompiler.java
index 8b71cdf..bc7125e 100644
--- a/compilers/rhino/src/main/java/org/apache/commons/jci2/compilers/RhinoJavaCompiler.java
+++ b/compilers/rhino/src/main/java/org/apache/commons/jci2/compilers/RhinoJavaCompiler.java
@@ -121,7 +121,7 @@ public final class RhinoJavaCompiler extends AbstractJavaCompiler {
 
             try {
                 return compileClass(context, pName);
-            } catch( final EvaluatorException e ) {
+            } catch ( final EvaluatorException e ) {
                 throw new ClassNotFoundException(e.getMessage(), e);
             } catch (final IOException e) {
                 throw new ClassNotFoundException(e.getMessage(), e);
diff --git a/core/src/main/java/org/apache/commons/jci2/listeners/ReloadingListener.java b/core/src/main/java/org/apache/commons/jci2/listeners/ReloadingListener.java
index 5f3c685..b6ae0c5 100644
--- a/core/src/main/java/org/apache/commons/jci2/listeners/ReloadingListener.java
+++ b/core/src/main/java/org/apache/commons/jci2/listeners/ReloadingListener.java
@@ -92,7 +92,7 @@ public class ReloadingListener extends AbstractFilesystemAlterationListener {
                     final byte[] bytes = IOUtils.toByteArray(is);
                     final String resourceName = ConversionUtils.getResourceNameFromFileName(ConversionUtils.relative(pObserver.getRootDirectory(), file));
                     store.write(resourceName, bytes);
-                } catch(final Exception e) {
+                } catch (final Exception e) {
                     log.error("could not load " + file, e);
                 } finally {
                     IOUtils.closeQuietly(is);
@@ -108,7 +108,7 @@ public class ReloadingListener extends AbstractFilesystemAlterationListener {
                     final byte[] bytes = IOUtils.toByteArray(is);
                     final String resourceName = ConversionUtils.getResourceNameFromFileName(ConversionUtils.relative(pObserver.getRootDirectory(), file));
                     store.write(resourceName, bytes);
-                } catch(final Exception e) {
+                } catch (final Exception e) {
                     log.error("could not load " + file, e);
                 } finally {
                     IOUtils.closeQuietly(is);
diff --git a/core/src/main/java/org/apache/commons/jci2/readers/FileResourceReader.java b/core/src/main/java/org/apache/commons/jci2/readers/FileResourceReader.java
index c223c98..899a0c1 100644
--- a/core/src/main/java/org/apache/commons/jci2/readers/FileResourceReader.java
+++ b/core/src/main/java/org/apache/commons/jci2/readers/FileResourceReader.java
@@ -43,7 +43,7 @@ public final class FileResourceReader implements ResourceReader {
     public byte[] getBytes( final String pResourceName ) {
         try {
             return FileUtils.readFileToString(new File(root, pResourceName), "UTF-8").getBytes();
-        } catch(final Exception e) {
+        } catch (final Exception e) {
             return null;
         }
     }
diff --git a/core/src/test/java/org/apache/commons/jci2/CompilingClassLoaderTestCase.java b/core/src/test/java/org/apache/commons/jci2/CompilingClassLoaderTestCase.java
index 6d92feb..5c63641 100644
--- a/core/src/test/java/org/apache/commons/jci2/CompilingClassLoaderTestCase.java
+++ b/core/src/test/java/org/apache/commons/jci2/CompilingClassLoaderTestCase.java
@@ -190,7 +190,7 @@ public final class CompilingClassLoaderTestCase extends AbstractTestCase {
         try {
             classloader.loadClass("jci2.Extended").newInstance();
             fail();
-        } catch(final ClassNotFoundException e) {
+        } catch (final ClassNotFoundException e) {
             assertEquals("jci2.Extended", e.getMessage());
         }
 
@@ -203,7 +203,7 @@ public final class CompilingClassLoaderTestCase extends AbstractTestCase {
         try {
             classloader.loadClass("jci2.Simple").newInstance();
             fail();
-        } catch(final ClassNotFoundException e) {
+        } catch (final ClassNotFoundException e) {
             assertEquals("jci2.Simple", e.getMessage());
         }
 
@@ -226,7 +226,7 @@ public final class CompilingClassLoaderTestCase extends AbstractTestCase {
         try {
             classloader.loadClass("jci2.Extended").newInstance();
             fail();
-        } catch(final NoClassDefFoundError e) {
+        } catch (final NoClassDefFoundError e) {
             assertEquals("jci2/Simple", e.getMessage());
         }
 
diff --git a/core/src/test/java/org/apache/commons/jci2/ReloadingClassLoaderRemoveTestCase.java b/core/src/test/java/org/apache/commons/jci2/ReloadingClassLoaderRemoveTestCase.java
index 4ce7eeb..f6ad478 100644
--- a/core/src/test/java/org/apache/commons/jci2/ReloadingClassLoaderRemoveTestCase.java
+++ b/core/src/test/java/org/apache/commons/jci2/ReloadingClassLoaderRemoveTestCase.java
@@ -207,9 +207,9 @@ public class ReloadingClassLoaderRemoveTestCase extends TestCase {
         try {
             loader.loadClass("jci2.Simple").newInstance();
             fail("Success loadClass[1]");
-        } catch(final ClassNotFoundException e) {
+        } catch (final ClassNotFoundException e) {
             // expected not found
-        } catch(final Exception e) {
+        } catch (final Exception e) {
             log.error(e);
             fail("Error loadClass[1]: " + e);
         }
@@ -219,7 +219,7 @@ public class ReloadingClassLoaderRemoveTestCase extends TestCase {
         try {
             final byte[] classBytes = SimpleDump.dump(toStringValue);
             store.write("jci2/Simple.class", classBytes);
-        } catch(final Exception e) {
+        } catch (final Exception e) {
             log.error(e);
             fail("Error adding class to store: " + e);
         }
@@ -229,7 +229,7 @@ public class ReloadingClassLoaderRemoveTestCase extends TestCase {
             final Object simple2 = loader.loadClass("jci2.Simple").newInstance();
             assertNotNull("Found loadClass[2]",  simple2);
             assertEquals("toString loadClass[2]",  toStringValue, simple2.toString());
-        } catch(final Exception e) {
+        } catch (final Exception e) {
             log.error(e);
             fail("Error loadClass[2]: " + e);
         }
@@ -241,9 +241,9 @@ public class ReloadingClassLoaderRemoveTestCase extends TestCase {
         try {
             loader.loadClass("jci2.Simple").newInstance();
             fail("Success loadClass[3]");
-        } catch(final ClassNotFoundException e) {
+        } catch (final ClassNotFoundException e) {
             // expected not found
-        } catch(final Exception e) {
+        } catch (final Exception e) {
             log.error(e);
             fail("Error loadClass[3]: " + e);
         }
@@ -256,7 +256,7 @@ public class ReloadingClassLoaderRemoveTestCase extends TestCase {
     private void checkRemoveResourceStore(final String label, final ReloadingClassLoader loader, final ResourceStore store, final boolean expected) {
         try {
             assertEquals(label, expected, loader.removeResourceStore(store));
-        } catch(final Exception e) {
+        } catch (final Exception e) {
             log.error(label, e);
             fail(label + " failed: " + e);
         }
diff --git a/core/src/test/java/org/apache/commons/jci2/ReloadingClassLoaderTestCase.java b/core/src/test/java/org/apache/commons/jci2/ReloadingClassLoaderTestCase.java
index f8cac5a..9cf781d 100644
--- a/core/src/test/java/org/apache/commons/jci2/ReloadingClassLoaderTestCase.java
+++ b/core/src/test/java/org/apache/commons/jci2/ReloadingClassLoaderTestCase.java
@@ -111,7 +111,7 @@ public final class ReloadingClassLoaderTestCase extends AbstractTestCase {
         try {
             classloader.loadClass("jci2.Simple").newInstance();
             fail();
-        } catch(final ClassNotFoundException e) {
+        } catch (final ClassNotFoundException e) {
             assertEquals("jci2.Simple", e.getMessage());
         }
     }
@@ -137,7 +137,7 @@ public final class ReloadingClassLoaderTestCase extends AbstractTestCase {
         try {
             classloader.loadClass("jci2.Extended").newInstance();
             fail();
-        } catch(final NoClassDefFoundError e) {
+        } catch (final NoClassDefFoundError e) {
             assertEquals("jci2/Simple", e.getMessage());
         }
     }
@@ -146,7 +146,7 @@ public final class ReloadingClassLoaderTestCase extends AbstractTestCase {
         try {
             classloader.loadClass("bla");
             fail();
-        } catch(final ClassNotFoundException e) {
+        } catch (final ClassNotFoundException e) {
         }
     }
 
diff --git a/examples/src/main/java/org/apache/commons/jci2/examples/serverpages/ServerPageServlet.java b/examples/src/main/java/org/apache/commons/jci2/examples/serverpages/ServerPageServlet.java
index 56e5cff..fb8c56f 100644
--- a/examples/src/main/java/org/apache/commons/jci2/examples/serverpages/ServerPageServlet.java
+++ b/examples/src/main/java/org/apache/commons/jci2/examples/serverpages/ServerPageServlet.java
@@ -101,7 +101,7 @@ public final class ServerPageServlet extends HttpServlet {
                         newServletsByClassname.put(clazzName, servlet);
 
                         reload = true;
-                    } catch(final Exception e) {
+                    } catch (final Exception e) {
                         log("", e);
                     }
                 }
diff --git a/fam/src/test/java/org/apache/commons/jci2/monitor/FilesystemAlterationMonitorTestCase.java b/fam/src/test/java/org/apache/commons/jci2/monitor/FilesystemAlterationMonitorTestCase.java
index daff01e..628f5cc 100644
--- a/fam/src/test/java/org/apache/commons/jci2/monitor/FilesystemAlterationMonitorTestCase.java
+++ b/fam/src/test/java/org/apache/commons/jci2/monitor/FilesystemAlterationMonitorTestCase.java
@@ -182,7 +182,7 @@ public final class FilesystemAlterationMonitorTestCase extends TestCase {
     	try {
         	listener.waitForFirstCheck();
         	fail("should be an timeout");
-        } catch(final Exception e) {
+        } catch (final Exception e) {
         	assertEquals("timeout", e.getMessage());
         }
 
@@ -191,7 +191,7 @@ public final class FilesystemAlterationMonitorTestCase extends TestCase {
         try {
         	listener.waitForEvent();
         	fail("should be an timeout");
-        } catch(final Exception e) {
+        } catch (final Exception e) {
         	assertEquals("timeout", e.getMessage());
         }
 
@@ -200,7 +200,7 @@ public final class FilesystemAlterationMonitorTestCase extends TestCase {
         try {
         	listener.waitForCheck();
         	fail("should be an timeout");
-        } catch(final Exception e) {
+        } catch (final Exception e) {
         	assertEquals("timeout", e.getMessage());
         }