changeset 34:9935e1c928de

Bug Fixed: Comparation for outdated Artifacts was Wrong. artifacts/trunk@86 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 15 Sep 2009 09:43:57 +0000
parents 251e8904d6c2
children 7a01a464a83b
files Changelog artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactResource.java
diffstat 3 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Changelog	Mon Sep 14 13:36:35 2009 +0000
+++ b/Changelog	Tue Sep 15 09:43:57 2009 +0000
@@ -1,3 +1,10 @@
+2009-09-15  Tim Englich  <tim.englich@intevation.de>
+
+    * src/main/java/de/intevation/artifactdatabase/Backend.java: 
+      Bug Fixed: Comparation for outdated Artifacts was Wrong.
+    * src/main/java/de/intevation/artifactdatabase/rest/ArtifactResource.java (represent): 
+      Warn-Logging Integrated for Exception analysys.
+      
 2009-09-14  Tim Englich  <tim.englich@intevation.de>
 
     * src/main/java/de/intevation/artifacts/ArtifactFactory.java Edited:
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java	Mon Sep 14 13:36:35 2009 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java	Tue Sep 15 09:43:57 2009 +0000
@@ -129,7 +129,7 @@
 
             if (!load_result.wasNull()) { // real time to life
                 long last_access = load_result.getTimestamp(2).getTime();
-                if (last_access + ttl > System.currentTimeMillis()) {
+                if (last_access + ttl < System.currentTimeMillis()) {
                     artifactOutdated(id);
                     return null;
                 }
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactResource.java	Mon Sep 14 13:36:35 2009 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactResource.java	Tue Sep 15 09:43:57 2009 +0000
@@ -67,6 +67,7 @@
                 db.describe(identifier));
         }
         catch (ArtifactDatabaseException adbe) {
+            logger.warn(adbe,adbe);
             Response response = getResponse();
             response.setStatus(
                 Status.CLIENT_ERROR_NOT_FOUND, adbe.getMessage());

http://dive4elements.wald.intevation.org