From: Kai Moritz Date: Mon, 21 Dec 2015 16:01:42 +0000 (+0100) Subject: Fixed bug regarding the skipping of unmodified builds X-Git-Tag: hibernate-maven-plugin-2.0.0~7 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=9d6e06c972ddda45bf0cd2e6a5e11d8fa319c290;p=hibernate4-maven-plugin 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. --- 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; }