From 9d6e06c972ddda45bf0cd2e6a5e11d8fa319c290 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Mon, 21 Dec 2015 17:01:42 +0100 Subject: [PATCH] Fixed bug regarding the skipping of unmodified builds If a property or class was removed, its value or md5sum stayed in the set of md5sums, so that each following build (without a clean) was juged as modified. --- .../plugins/hibernate/ModificationTracker.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/juplo/plugins/hibernate/ModificationTracker.java b/src/main/java/de/juplo/plugins/hibernate/ModificationTracker.java index d9ce624d..f103ad1a 100644 --- a/src/main/java/de/juplo/plugins/hibernate/ModificationTracker.java +++ b/src/main/java/de/juplo/plugins/hibernate/ModificationTracker.java @@ -126,10 +126,18 @@ public class ModificationTracker boolean modified() { - modified |= !propertyNames.containsAll(properties.keySet()); - modified |= !properties.keySet().containsAll(propertyNames); - modified |= !classNames.containsAll(classes.keySet()); - modified |= !classes.keySet().containsAll(classNames); + for (String property : properties.keySet()) + if (!propertyNames.contains(property)) + { + modified = true; + properties.remove(property); + } + for (String clazz : classes.keySet()) + if (!classNames.contains(clazz)) + { + modified = true; + classes.remove(clazz); + } return modified; } -- 2.20.1