diff options
author | Håkon Hallingstad <hakon@oath.com> | 2018-05-07 00:19:57 +0200 |
---|---|---|
committer | Håkon Hallingstad <hakon@oath.com> | 2018-05-07 00:19:57 +0200 |
commit | b5181039ad233c4c28820ee9217334bcddb70e3f (patch) | |
tree | b6400d29b852bed8962c6979dfd3eaacb7d6b732 /node-admin/src/main/java | |
parent | 393581f67c338c426beafd464c2a9e6c8b01546c (diff) |
Move declaration to for-loop
Diffstat (limited to 'node-admin/src/main/java')
-rw-r--r-- | node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/editor/TextBufferImpl.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/editor/TextBufferImpl.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/editor/TextBufferImpl.java index 3c447a104d1..e09fc4deec0 100644 --- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/editor/TextBufferImpl.java +++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/editor/TextBufferImpl.java @@ -97,8 +97,8 @@ public class TextBufferImpl implements TextBuffer { } private void deleteLines(int startIndex, int endIndex) { - int fromIndex = endIndex; - for (int toIndex = startIndex; fromIndex <= getMaxLineIndex(); ++toIndex, ++fromIndex) { + for (int fromIndex = endIndex, toIndex = startIndex; fromIndex <= getMaxLineIndex(); + ++toIndex, ++fromIndex) { lines.set(toIndex, lines.get(fromIndex)); } |