diff --git a/build.gradle b/build.gradle index 226cf5a64..f09840249 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ buildscript { classpath 'com.palantir.gradle.externalpublish:gradle-external-publish-plugin:1.2.1' classpath 'com.palantir.javaformat:gradle-palantir-java-format:2.2.0' classpath 'com.palantir.gradle.revapi:gradle-revapi:1.5.0' - classpath 'com.palantir.baseline:gradle-baseline-java:4.14.0' + classpath 'com.palantir.baseline:gradle-baseline-java:4.16.0' classpath 'gradle.plugin.org.inferred:gradle-processors:3.3.0' classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.12.3' classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:2.0.0' diff --git a/palantir-java-format/src/main/java/com/palantir/javaformat/java/JavaInput.java b/palantir-java-format/src/main/java/com/palantir/javaformat/java/JavaInput.java index ee13f0858..7d348a0af 100644 --- a/palantir-java-format/src/main/java/com/palantir/javaformat/java/JavaInput.java +++ b/palantir-java-format/src/main/java/com/palantir/javaformat/java/JavaInput.java @@ -429,7 +429,8 @@ public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOExcept // contains Unicode escapes. isToken = true; isNumbered = true; - for (char c : tokText.toCharArray()) { + for (int i = 0; i < tokText.length(); i++) { + char c = tokText.charAt(i); strings.add(String.valueOf(c)); } }