diff --git a/core/src/main/java/com/google/googlejavaformat/InputOutput.java b/core/src/main/java/com/google/googlejavaformat/InputOutput.java index 6e78b5199..b072cbe7c 100644 --- a/core/src/main/java/com/google/googlejavaformat/InputOutput.java +++ b/core/src/main/java/com/google/googlejavaformat/InputOutput.java @@ -83,11 +83,10 @@ protected final void computeRanges(List toks) { * Given an {@code InputOutput}, compute the map from tok indices to line ranges. * * @param put the {@code InputOutput} - * @param kN the number of tokens * @return the map from {@link com.google.googlejavaformat.java.JavaInput.Tok} indices to line * ranges in this {@code put} */ - public static Map> makeKToIJ(InputOutput put, int kN) { + public static Map> makeKToIJ(InputOutput put) { Map> map = new HashMap<>(); int ijN = put.getLineCount(); for (int ij = 0; ij <= ijN; ij++) { diff --git a/core/src/main/java/com/google/googlejavaformat/java/JavaOutput.java b/core/src/main/java/com/google/googlejavaformat/java/JavaOutput.java index 5fdceb4ed..2a6f1ab55 100644 --- a/core/src/main/java/com/google/googlejavaformat/java/JavaOutput.java +++ b/core/src/main/java/com/google/googlejavaformat/java/JavaOutput.java @@ -208,7 +208,7 @@ public CommentsHelper getCommentsHelper() { */ public ImmutableList getFormatReplacements(RangeSet iRangeSet0) { ImmutableList.Builder result = ImmutableList.builder(); - Map> kToJ = JavaOutput.makeKToIJ(this, kN); + Map> kToJ = JavaOutput.makeKToIJ(this); // Expand the token ranges to align with re-formattable boundaries. RangeSet breakableRanges = TreeRangeSet.create();