Fix changes not being saved for flatfile bulkupdate operations

This commit is contained in:
Luck 2017-10-27 23:17:57 +01:00
parent af5c859385
commit 7279fdc25f
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -323,8 +323,10 @@ public abstract class ConfigurateDao extends AbstractDao {
.map(bulkUpdate::apply) .map(bulkUpdate::apply)
.filter(Objects::nonNull) .filter(Objects::nonNull)
.collect(Collectors.toSet()); .collect(Collectors.toSet());
if (!nodes.equals(results)) { if (!nodes.equals(results)) {
writeNodes(object, results); writeNodes(object, results);
saveFile(file, object);
} }
} catch (Exception e) { } catch (Exception e) {
reportException(file.getName(), e); reportException(file.getName(), e);
@ -347,8 +349,10 @@ public abstract class ConfigurateDao extends AbstractDao {
.map(bulkUpdate::apply) .map(bulkUpdate::apply)
.filter(Objects::nonNull) .filter(Objects::nonNull)
.collect(Collectors.toSet()); .collect(Collectors.toSet());
if (!nodes.equals(results)) { if (!nodes.equals(results)) {
writeNodes(object, results); writeNodes(object, results);
saveFile(file, object);
} }
} catch (Exception e) { } catch (Exception e) {
reportException(file.getName(), e); reportException(file.getName(), e);