[java-opensaml] 01/12: JPAR-85 - Checkstyle, check final parameters

Tom Zeller tzeller at dragonacea.biz
Thu Aug 10 18:25:50 EDT 2017


This is an automated email from the git hooks/post-receive script.

tzeller pushed a commit to branch master
in repository java-opensaml.

View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=823f6352e8ad51f7a203af2c8b100749ab4a9cce

commit 823f6352e8ad51f7a203af2c8b100749ab4a9cce
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Thu Aug 10 16:20:42 2017 -0500

    JPAR-85 - Checkstyle, check final parameters
---
 .../org/opensaml/storage/AbstractMapBackedStorageService.java     | 8 ++++----
 .../src/main/java/org/opensaml/storage/MutableStorageRecord.java  | 2 +-
 .../src/main/java/org/opensaml/storage/ReplayCache.java           | 2 +-
 .../src/main/java/org/opensaml/storage/StorageRecord.java         | 2 +-
 .../java/org/opensaml/storage/annotation/AnnotationSupport.java   | 6 +++---
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractMapBackedStorageService.java b/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractMapBackedStorageService.java
index 2c27e70..8f8af64 100644
--- a/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractMapBackedStorageService.java
+++ b/opensaml-storage-api/src/main/java/org/opensaml/storage/AbstractMapBackedStorageService.java
@@ -126,7 +126,7 @@ public abstract class AbstractMapBackedStorageService extends AbstractStorageSer
             @Nonnull @NotEmpty final String value, @Nullable final Long expiration) throws IOException {
         try {
             return updateImpl(null, context, key, value, expiration) != null;
-        } catch (VersionMismatchException e) {
+        } catch (final VersionMismatchException e) {
             throw new IOException("Unexpected exception thrown by update.", e);
         }
     }
@@ -145,14 +145,14 @@ public abstract class AbstractMapBackedStorageService extends AbstractStorageSer
             @Nullable final Long expiration) throws IOException {
         try {
             return updateImpl(null, context, key, null, expiration) != null;
-        } catch (VersionMismatchException e) {
+        } catch (final VersionMismatchException e) {
             throw new IOException("Unexpected exception thrown by update.", e);
         }
     }
 
     /** {@inheritDoc} */
     @Override
-    public boolean deleteWithVersion(long version, String context, String key) throws IOException,
+    public boolean deleteWithVersion(final long version, final String context, final String key) throws IOException,
             VersionMismatchException {
         return deleteImpl(version, context, key);
     }
@@ -163,7 +163,7 @@ public abstract class AbstractMapBackedStorageService extends AbstractStorageSer
             throws IOException {
         try {
             return deleteImpl(null, context, key);
-        } catch (VersionMismatchException e) {
+        } catch (final VersionMismatchException e) {
             throw new IOException("Unexpected exception thrown by delete.", e);
         }
     }
diff --git a/opensaml-storage-api/src/main/java/org/opensaml/storage/MutableStorageRecord.java b/opensaml-storage-api/src/main/java/org/opensaml/storage/MutableStorageRecord.java
index 3c8fa07..21930c8 100644
--- a/opensaml-storage-api/src/main/java/org/opensaml/storage/MutableStorageRecord.java
+++ b/opensaml-storage-api/src/main/java/org/opensaml/storage/MutableStorageRecord.java
@@ -45,7 +45,7 @@ public class MutableStorageRecord extends StorageRecord {
 
     /** {@inheritDoc} */
     @Override
-    public void setExpiration(@Nullable Long exp) {
+    public void setExpiration(@Nullable final Long exp) {
         super.setExpiration(exp);
     }
 
diff --git a/opensaml-storage-api/src/main/java/org/opensaml/storage/ReplayCache.java b/opensaml-storage-api/src/main/java/org/opensaml/storage/ReplayCache.java
index 8bc21fc..89a4d51 100644
--- a/opensaml-storage-api/src/main/java/org/opensaml/storage/ReplayCache.java
+++ b/opensaml-storage-api/src/main/java/org/opensaml/storage/ReplayCache.java
@@ -140,7 +140,7 @@ public class ReplayCache extends AbstractIdentifiableInitializableComponent {
                 log.debug("Replay of value '{}' detected in cache, expires at {}", s, entry.getExpiration());
                 return false;
             }
-        } catch (IOException e) {
+        } catch (final IOException e) {
             log.error("Exception reading/writing to storage service, returning {}", strict ? "failure" : "success", e);
             return !strict;
         }
diff --git a/opensaml-storage-api/src/main/java/org/opensaml/storage/StorageRecord.java b/opensaml-storage-api/src/main/java/org/opensaml/storage/StorageRecord.java
index ad97316..1e90477 100644
--- a/opensaml-storage-api/src/main/java/org/opensaml/storage/StorageRecord.java
+++ b/opensaml-storage-api/src/main/java/org/opensaml/storage/StorageRecord.java
@@ -131,7 +131,7 @@ public class StorageRecord<Type> {
      * 
      * @param exp   the new record expiration, or null if none
      */
-    protected void setExpiration(@Nullable Long exp) {
+    protected void setExpiration(@Nullable final Long exp) {
         expiration = exp;
     }
     
diff --git a/opensaml-storage-api/src/main/java/org/opensaml/storage/annotation/AnnotationSupport.java b/opensaml-storage-api/src/main/java/org/opensaml/storage/annotation/AnnotationSupport.java
index c839c5e..0b877b1 100644
--- a/opensaml-storage-api/src/main/java/org/opensaml/storage/annotation/AnnotationSupport.java
+++ b/opensaml-storage-api/src/main/java/org/opensaml/storage/annotation/AnnotationSupport.java
@@ -254,7 +254,7 @@ public final class AnnotationSupport {
     @Nullable private static Object getFieldValue(@Nonnull final Object target, @Nonnull final String fieldName) {
         try {
             return getField(target, fieldName).get(target);
-        } catch (IllegalAccessException e) {
+        } catch (final IllegalAccessException e) {
             throw new RuntimeException("Field " + fieldName + " cannot be read on " + target);
         }
     }
@@ -272,7 +272,7 @@ public final class AnnotationSupport {
             @Nullable final Object fieldValue) {
         try {
             getField(target, fieldName).set(target, fieldValue);
-        } catch (IllegalAccessException e) {
+        } catch (final IllegalAccessException e) {
             throw new RuntimeException("Field " + fieldName + " cannot be set on " + target);
         }
     }
@@ -298,7 +298,7 @@ public final class AnnotationSupport {
                     field.setAccessible(true);
                 }
                 FIELD_CACHE.put(key, field);
-            } catch (NoSuchFieldException e) {
+            } catch (final NoSuchFieldException e) {
                 throw new RuntimeException("Field " + fieldName + " does not exist on " + target);
             }
         }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list