diff options
author | toby <smorgrav@yahoo-inc.com> | 2018-04-18 09:14:04 +0200 |
---|---|---|
committer | toby <smorgrav@yahoo-inc.com> | 2018-04-18 14:14:42 +0200 |
commit | 6c949c65cc1a911bdc7f8c38ec98f0623fcf6979 (patch) | |
tree | b682c09dab7e7c924753e1077f00654bf095389d | |
parent | 8cdb9b19ea421c7373f4a086a28cb3c90c2b53c5 (diff) |
LineEdit type does not need to be public
-rw-r--r-- | node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/Editor.java | 6 | ||||
-rw-r--r-- | node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/LineEdit.java | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/Editor.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/Editor.java index ebc432ccd5f..0b2cc17a250 100644 --- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/Editor.java +++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/Editor.java @@ -107,11 +107,7 @@ public class Editor { consumer.accept(newLines); return true; } - - /** - * Read the file which must be encoded in UTF-8, use the LineEditor to edit it, - * and any modifications were done write it back and return true. - */ + public boolean converge(TaskContext context) { return this.edit(line -> context.recordSystemModification(logger, line)); } diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/LineEdit.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/LineEdit.java index 1745e63be56..78e7a3e71b6 100644 --- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/LineEdit.java +++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/LineEdit.java @@ -16,7 +16,7 @@ import static com.yahoo.vespa.hosted.node.admin.task.util.file.LineEdit.Type.NON */ @Immutable public class LineEdit { - public enum Type { NONE, REPLACE } + enum Type { NONE, REPLACE } public static LineEdit none() { return insert(Collections.emptyList(), Collections.emptyList()); } public static LineEdit remove() { return replaceWith(Collections.emptyList()); } |