Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

*) Bugfix for NoSuchElementException

thelia9c7e3f06174
diff --git a/source/de/anomic/plasma/plasmaHTCache.java b/source/de/anomic/plasma/plasmaHTCache.java
index 0516e3f2b..18d083f85 100644
--- a/source/de/anomic/plasma/plasmaHTCache.java
+++ b/source/de/anomic/plasma/plasmaHTCache.java
@@ -432,8 +432,10 @@ public final class plasmaHTCache {
//System.out.println("%" + (String) cacheAge.firstKey() + "=" + cacheAge.get(cacheAge.firstKey()));
long ageHours = 0;
try {
- ageHours = (System.currentTimeMillis() -
+ if (!this.cacheAge.isEmpty()) {
+ ageHours = (System.currentTimeMillis() -
Long.parseLong(((String) this.cacheAge.firstKey()).substring(0, 16), 16)) / 3600000;
+ }
} catch (NumberFormatException e) {
//e.printStackTrace();
}