From 6c949c65cc1a911bdc7f8c38ec98f0623fcf6979 Mon Sep 17 00:00:00 2001 From: toby Date: Wed, 18 Apr 2018 09:14:04 +0200 Subject: LineEdit type does not need to be public --- .../com/yahoo/vespa/hosted/node/admin/task/util/file/Editor.java | 6 +----- .../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()); } -- cgit v1.2.3