You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@turbine.apache.org by gk...@apache.org on 2022/01/10 14:03:50 UTC

[turbine-fulcrum-cache] branch master updated (c4d893f -> b5fc03c)

This is an automated email from the ASF dual-hosted git repository.

gk pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/turbine-fulcrum-cache.git.


    from c4d893f  Update parent poms
     new d9030a0  Use Parent v11
     new 25595b2  Remove duplicate custom/skin setting (since Turbine Parent 11
     new b5fc03c  Update:  Use Java 8 streams and Method refs, update .gitignore

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitignore                                            |  4 ++--
 pom.xml                                               |  2 +-
 .../org/apache/fulcrum/cache/impl/EHCacheService.java | 19 ++++++++-----------
 src/site/site.xml                                     | 14 ++------------
 4 files changed, 13 insertions(+), 26 deletions(-)

[turbine-fulcrum-cache] 02/03: Remove duplicate custom/skin setting (since Turbine Parent 11

Posted by gk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/turbine-fulcrum-cache.git

commit 25595b2593f753adbdbd3078da22a074f1a6c92e
Author: Georg Kallidis <gk...@apache.org>
AuthorDate: Tue Dec 14 11:43:19 2021 +0100

    Remove duplicate custom/skin setting (since Turbine Parent 11
---
 src/site/site.xml | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/src/site/site.xml b/src/site/site.xml
index be0a12e..e5b0a0f 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -22,12 +22,7 @@
   xsi:schemaLocation="http://maven.apache.org/DECORATION/1.4.0 http://maven.apache.org/xsd/decoration-1.4.0.xsd"
   name="Fulcrum Cache">
   
-  
-    <skin>
-    <groupId>org.apache.maven.skins</groupId>
-    <artifactId>maven-fluido-skin</artifactId>
-    <version>1.8</version>
-  </skin>
+ 
   <body>
   
    <menu name="Overview">
@@ -42,10 +37,5 @@
     </menu>
       
   </body>
-  <custom>
-      <fluidoSkin>
-        <topBarEnabled>false</topBarEnabled>
-        <sideBarEnabled>true</sideBarEnabled>
-      </fluidoSkin>
-  </custom>
+
 </project>

[turbine-fulcrum-cache] 01/03: Use Parent v11

Posted by gk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/turbine-fulcrum-cache.git

commit d9030a09b0d718546055e08f2e02293602430bec
Author: Georg Kallidis <gk...@apache.org>
AuthorDate: Mon Jan 10 11:41:12 2022 +0100

    Use Parent v11
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index a757cbf..2d1f2e0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,7 +19,7 @@
   <parent>
     <groupId>org.apache.turbine</groupId>
     <artifactId>turbine-parent</artifactId>
-    <version>9</version>
+    <version>11</version>
     <relativePath />
   </parent>
 

[turbine-fulcrum-cache] 03/03: Update: Use Java 8 streams and Method refs, update .gitignore

Posted by gk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/turbine-fulcrum-cache.git

commit b5fc03c1261032cd4201e067fe8837e18d43a704
Author: Georg Kallidis <gk...@apache.org>
AuthorDate: Tue Dec 14 12:06:38 2021 +0100

    Update:  Use Java 8 streams and Method refs, update .gitignore
---
 .gitignore                                            |  4 ++--
 .../org/apache/fulcrum/cache/impl/EHCacheService.java | 19 ++++++++-----------
 2 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/.gitignore b/.gitignore
index f84b100..0f49c04 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
-target
 *.log
-junit*.properties
+target/
+.settings/
 *.ser
 .classpath
 .project
diff --git a/src/java/org/apache/fulcrum/cache/impl/EHCacheService.java b/src/java/org/apache/fulcrum/cache/impl/EHCacheService.java
index 6be51bf..7273e24 100644
--- a/src/java/org/apache/fulcrum/cache/impl/EHCacheService.java
+++ b/src/java/org/apache/fulcrum/cache/impl/EHCacheService.java
@@ -22,6 +22,8 @@ package org.apache.fulcrum.cache.impl;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
 
 import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.activity.Initializable;
@@ -189,17 +191,12 @@ public class EHCacheService extends AbstractLogEnabled implements
     @Override
     public List<CachedObject<?>> getCachedObjects()
     {
-        ArrayList<CachedObject<?>> values = new ArrayList<CachedObject<?>>();
-
-        for (String key : getKeys())
-        {
-            Element cachedElement = this.cache.get(key);
-
-            if (cachedElement != null)
-            {
-                values.add((CachedObject<?>)cachedElement.getObjectValue());
-            }
-        }
+        ArrayList<CachedObject<?>> values =
+                getKeys().stream()
+                        .map(key -> this.cache.get(key))
+                        .filter(Objects::nonNull)
+                        .map(cachedElement -> (CachedObject<?>) cachedElement.getObjectValue())
+                        .collect(Collectors.toCollection(ArrayList::new));
 
         return values;
     }