# HG changeset patch # User Sascha L. Teichmann # Date 1312285271 0 # Node ID 03e508e57b85f5162319b82e72fe68000c78f143 # Parent 31ee2b3b5a5793e530de0e8f18a7ae805bbcd8cf Generate kill events if and only if there were killed collections or artifacts. artifacts/trunk@2448 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 31ee2b3b5a57 -r 03e508e57b85 ChangeLog --- a/ChangeLog Tue Aug 02 11:11:59 2011 +0000 +++ b/ChangeLog Tue Aug 02 11:41:11 2011 +0000 @@ -1,3 +1,8 @@ +2011-08-02 Sascha L. Teichmann + + * artifact-database/src/main/java/de/intevation/artifactdatabase/DatabaseCleaner.java: + Generate kill events if and only if there were killed collections or artifacts. + 2011-08-02 Sascha L. Teichmann * artifact-database/src/main/resources/sql/org-h2-driver.properties, diff -r 31ee2b3b5a57 -r 03e508e57b85 artifact-database/src/main/java/de/intevation/artifactdatabase/DatabaseCleaner.java --- a/artifact-database/src/main/java/de/intevation/artifactdatabase/DatabaseCleaner.java Tue Aug 02 11:11:59 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/DatabaseCleaner.java Tue Aug 02 11:41:11 2011 +0000 @@ -394,8 +394,13 @@ } } - reviver.killedCollections(deletedCollections); - reviver.killedArtifacts(deletedArtifacts); + if (!deletedCollections.isEmpty()) { + reviver.killedCollections(deletedCollections); + } + + if (!deletedArtifacts.isEmpty()) { + reviver.killedArtifacts(deletedArtifacts); + } if (logger.isDebugEnabled()) { logger.debug(