[java-opensaml COMMIT] /trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/PopulateClientStor...

noreply at shibboleth.net noreply at shibboleth.net
Fri Jan 13 17:18:55 EST 2017


Author: scantor
Date: Fri Jan 13 17:18:54 2017
New Revision: 4601

URL: http://svn.shibboleth.net/view/java-opensaml?rev=4601&view=rev
Log:
OSJ-173 - Audit Guava Collections transform and filter for problematic usage

https://issues.shibboleth.net/jira/browse/OSJ-173

Modified:
    trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/PopulateClientStorageSaveContext.java

Modified: trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/PopulateClientStorageSaveContext.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/PopulateClientStorageSaveContext.java?rev=4601&r1=4600&r2=4601&view=diff
==============================================================================
--- trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/PopulateClientStorageSaveContext.java	(original)
+++ trunk/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/PopulateClientStorageSaveContext.java	Fri Jan 13 17:18:54 2017
@@ -115,14 +115,17 @@
             log.debug("{} No ClientStorageServices require saving, nothing to do", getLogPrefix());
             ActionSupport.buildEvent(profileRequestContext, SAVE_NOT_NEEDED);
         } else {
-            final Collection<String> ids = Collections2.transform(saveCtx.getStorageOperations(),
-                    new Function<ClientStorageServiceOperation,String>() {
-                public String apply(ClientStorageServiceOperation input) {
-                    return input.getStorageServiceID();
-                }
-            });
-            log.debug("{} ClientStorageServices requiring save: {}", getLogPrefix(), ids);
             profileRequestContext.addSubcontext(saveCtx, true);
+            
+            if (log.isDebugEnabled()) {
+                final Collection<String> ids = Collections2.transform(saveCtx.getStorageOperations(),
+                        new Function<ClientStorageServiceOperation,String>() {
+                    public String apply(ClientStorageServiceOperation input) {
+                        return input.getStorageServiceID();
+                    }
+                });
+                log.debug("{} ClientStorageServices requiring save: {}", getLogPrefix(), ids);
+            }
         }
     }
 



More information about the commits mailing list