aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJake Wharton <jakew@google.com>2019-03-25 11:03:39 -0400
committerJake Wharton <jakew@google.com>2019-03-25 11:03:39 -0400
commite79bb2f09d29678ece0abfb50abe3e4a855aee4f (patch)
tree5214a6571960f7abbef4ecd071ab13790b033c1e
parent1676ff4a8cd00888e7514c7ccfba974df7ce4372 (diff)
downloadjavapoet-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.java2
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;
}