diff options
author | Jake Wharton <jakew@google.com> | 2019-03-25 11:03:39 -0400 |
---|---|---|
committer | Jake Wharton <jakew@google.com> | 2019-03-25 11:03:39 -0400 |
commit | e79bb2f09d29678ece0abfb50abe3e4a855aee4f (patch) | |
tree | 5214a6571960f7abbef4ecd071ab13790b033c1e | |
parent | 1676ff4a8cd00888e7514c7ccfba974df7ce4372 (diff) | |
download | javapoet-e79bb2f09d29678ece0abfb50abe3e4a855aee4f.tar.gz |
Remove argument whose value isn't needed
The single-argument overload will use the end of the String as the end index automatically.
-rw-r--r-- | src/main/java/com/squareup/javapoet/CodeBlock.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/squareup/javapoet/CodeBlock.java b/src/main/java/com/squareup/javapoet/CodeBlock.java index 33e3846..47c6ff7 100644 --- a/src/main/java/com/squareup/javapoet/CodeBlock.java +++ b/src/main/java/com/squareup/javapoet/CodeBlock.java @@ -189,7 +189,7 @@ public final class CodeBlock { while (p < format.length()) { int nextP = format.indexOf("$", p); if (nextP == -1) { - formatParts.add(format.substring(p, format.length())); + formatParts.add(format.substring(p)); break; } |