[java-opensaml COMMIT] in /trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl: JPAStorageService.jav...

noreply at shibboleth.net noreply at shibboleth.net
Fri Dec 12 17:43:32 EST 2014


Author: scantor
Date: Fri Dec 12 17:43:31 2014
New Revision: 4184

URL: http://svn.shibboleth.net/view/java-opensaml?rev=4184&view=rev
Log:
Bit of cleanup and lower some logging.

Modified:
    trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/JPAStorageService.java
    trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/MemoryStorageService.java
    trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/ServletRequestScopedStorageService.java

Modified: trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/JPAStorageService.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/JPAStorageService.java?rev=4184&r1=4183&r2=4184&view=diff
==============================================================================
--- trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/JPAStorageService.java (original)
+++ trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/JPAStorageService.java Fri Dec 12 17:43:31 2014
@@ -436,6 +436,7 @@
         log.debug("Reaped all entities in context '{}'", context);
     }
 
+// Checkstyle: CyclomaticComplexity OFF    
     /**
      * Deletes every record with the supplied context. If expiration is supplied, only records with an expiration before
      * the supplied expiration will be removed.
@@ -478,6 +479,8 @@
             }
         }
     }
+// Checkstyle: CyclomaticComplexity ON
+
 
     /**
      * Executes the supplied named query.
@@ -510,21 +513,22 @@
     /** {@inheritDoc} */
     @Override @Nullable protected TimerTask getCleanupTask() {
         return new TimerTask() {
+            
             /** {@inheritDoc} */
             @Override public void run() {
-                log.info("Running cleanup task");
+                log.debug("Running cleanup task");
                 final Long now = System.currentTimeMillis();
                 List<String> contexts = null;
                 try {
                     contexts = readContexts();
-                } catch (IOException e) {
+                } catch (final IOException e) {
                     log.error("Error reading contexts", e);
                 }
                 if (contexts != null && !contexts.isEmpty()) {
-                    for (String context : contexts) {
+                    for (final String context : contexts) {
                         try {
                             deleteContextImpl(context, now);
-                        } catch (IOException e) {
+                        } catch (final IOException e) {
                             log.error("Error deleting records in context '{}' for timestamp '{}'", context, now, e);
                         }
                     }

Modified: trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/MemoryStorageService.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/MemoryStorageService.java?rev=4184&r1=4183&r2=4184&view=diff
==============================================================================
--- trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/MemoryStorageService.java (original)
+++ trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/MemoryStorageService.java Fri Dec 12 17:43:31 2014
@@ -67,9 +67,9 @@
     /** {@inheritDoc} */
     @Override
     protected void doDestroy() {
-        super.doDestroy();
         contextMap = null;
         lock = null;
+        super.doDestroy();
     }
 
 
@@ -89,9 +89,11 @@
     @Override
     @Nullable protected TimerTask getCleanupTask() {
         return new TimerTask() {
+            
             /** {@inheritDoc} */
+            @Override
             public void run() {
-                log.info("Running cleanup task");
+                log.debug("Running cleanup task");
                 
                 final Long now = System.currentTimeMillis();
                 final Lock writeLock = getLock().writeLock();
@@ -117,9 +119,9 @@
                 }
                 
                 if (purged) {
-                    log.info("Purged expired record(s) from storage");
+                    log.debug("Purged expired record(s) from storage");
                 } else {
-                    log.info("No expired records found in storage");
+                    log.debug("No expired records found in storage");
                 }
             }
         };

Modified: trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/ServletRequestScopedStorageService.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/ServletRequestScopedStorageService.java?rev=4184&r1=4183&r2=4184&view=diff
==============================================================================
--- trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/ServletRequestScopedStorageService.java (original)

[... 11 lines stripped ...]


More information about the commits mailing list