[java-opensaml] branch master updated: Convert to Java 8 removeIf method.

Scott Cantor cantor.2 at osu.edu
Mon Nov 4 12:16:02 EST 2019


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

scantor 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=0078334ecd978748513b830054311bcc165660f6

The following commit(s) were added to refs/heads/master by this push:
       new  0078334   Convert to Java 8 removeIf method.
0078334 is described below

commit 0078334ecd978748513b830054311bcc165660f6
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Nov 4 12:15:59 2019 -0500

    Convert to Java 8 removeIf method.
---
 .../java/org/opensaml/storage/AbstractMapBackedStorageService.java  | 6 ++----
 1 file changed, 2 insertions(+), 4 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 4f6bc89..1563690 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
@@ -37,8 +37,6 @@ import net.shibboleth.utilities.java.support.collection.Pair;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.collect.Iterables;
-
 /**
  * Partial implementation of {@link StorageService} that stores data in-memory with no persistence
  * using a simple map.
@@ -475,12 +473,12 @@ public abstract class AbstractMapBackedStorageService extends AbstractStorageSer
     protected boolean reapWithLock(@Nonnull @NonnullElements final Map<String, MutableStorageRecord<?>> dataMap,
             final long expiration) {
         
-        return Iterables.removeIf(dataMap.entrySet(), new Predicate<Entry<String, MutableStorageRecord<?>>>() {
+        return dataMap.entrySet().removeIf(new Predicate<Entry<String, MutableStorageRecord<?>>>() {
                 public boolean test(@Nullable final Entry<String, MutableStorageRecord<?>> entry) {
                     final Long exp = entry.getValue().getExpiration();
                     return exp != null && exp <= expiration;
                 }
-            }::test
+            }
         );
     }
     

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


More information about the commits mailing list