Bas Couwenberg pushed to branch master at Debian GIS Project / jmapviewer


Commits:
1ffe1cc1 by Bas Couwenberg at 2024-08-13T05:16:51+02:00
New upstream version 2.21+dfsg
- - - - -
1aabe27c by Bas Couwenberg at 2024-08-13T05:16:51+02:00
Update upstream source from tag 'upstream/2.21+dfsg'

Update to upstream version '2.21+dfsg'
with Debian dir 88c677feda3762f05ee81e7a74949f1c23b65afe
- - - - -
a799f4f1 by Bas Couwenberg at 2024-08-13T05:17:12+02:00
New upstream release.

- - - - -
a8b5f187 by Bas Couwenberg at 2024-08-13T05:19:31+02:00
Set distribution to unstable.

- - - - -


3 changed files:

- debian/changelog
- src/org/openstreetmap/gui/jmapviewer/MemoryTileCache.java
- src/org/openstreetmap/gui/jmapviewer/interfaces/TileCache.java


Changes:

=====================================
debian/changelog
=====================================
@@ -1,8 +1,9 @@
-jmapviewer (2.20+dfsg-2) UNRELEASED; urgency=medium
+jmapviewer (2.21+dfsg-1) unstable; urgency=medium
 
+  * New upstream release.
   * Bump Standards-Version to 4.7.0, no changes.
 
- -- Bas Couwenberg <sebas...@debian.org>  Sun, 28 Jul 2024 19:40:58 +0200
+ -- Bas Couwenberg <sebas...@debian.org>  Tue, 13 Aug 2024 05:19:21 +0200
 
 jmapviewer (2.20+dfsg-1) unstable; urgency=medium
 


=====================================
src/org/openstreetmap/gui/jmapviewer/MemoryTileCache.java
=====================================
@@ -1,10 +1,12 @@
 // License: GPL. For details, see Readme.txt file.
 package org.openstreetmap.gui.jmapviewer;
 
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+import java.util.stream.Collectors;
 
 import org.openstreetmap.gui.jmapviewer.interfaces.TileCache;
 import org.openstreetmap.gui.jmapviewer.interfaces.TileSource;
@@ -103,6 +105,13 @@ public class MemoryTileCache implements TileCache {
         lruTiles.clear();
     }
 
+    @Override
+    public synchronized void clearErrorTiles() {
+        Collection<CacheEntry> toRemove = 
hash.values().stream().filter(cacheEntry -> 
cacheEntry.tile.hasError()).collect(Collectors.toList());
+        hash.values().removeAll(toRemove);
+        toRemove.forEach(lruTiles::removeEntry);
+    }
+
     @Override
     public synchronized int getTileCount() {
         return hash.size();


=====================================
src/org/openstreetmap/gui/jmapviewer/interfaces/TileCache.java
=====================================
@@ -48,6 +48,14 @@ public interface TileCache {
      */
     void clear();
 
+    /**
+     * Removes error tiles from memory.
+     * This is implementation specific; the default calls {@link #clear()}.
+     */
+    default void clearErrorTiles() {
+        this.clear();
+    }
+
     /**
      * Size of the cache.
      * @return maximum number of tiles in cache



View it on GitLab: 
https://salsa.debian.org/debian-gis-team/jmapviewer/-/compare/d7af929030190584fa564af190a80203c385f8be...a8b5f1877e1efb87f28fa2505d61d76989b854fe

-- 
View it on GitLab: 
https://salsa.debian.org/debian-gis-team/jmapviewer/-/compare/d7af929030190584fa564af190a80203c385f8be...a8b5f1877e1efb87f28fa2505d61d76989b854fe
You're receiving this email because of your account on salsa.debian.org.


_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to