From a9c7e3f06174d50c86238795e7bc9d18de0a9624 Mon Sep 17 00:00:00 2001 From: theli Date: Tue, 10 Oct 2006 08:39:27 +0000 Subject: [PATCH] *) Bugfix for NoSuchElementException git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2735 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaHTCache.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(); }