This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new 82b6f10 Trivial refactoring: Replace with Java-Style code
82b6f10 is described below
commit 82b6f1047cb7608f0beface235825ff6cf501bf4
Author: Daniel Sun <[email protected]>
AuthorDate: Sat Apr 11 23:02:26 2020 +0800
Trivial refactoring: Replace with Java-Style code
---
.../src/main/java/org/apache/groovy/json/internal/CharScanner.java | 4 ++--
.../java/org/apache/groovy/json/internal/ReaderCharacterSource.java | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git
a/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/CharScanner.java
b/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/CharScanner.java
index aa6ba10..a4d8567 100644
---
a/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/CharScanner.java
+++
b/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/CharScanner.java
@@ -41,7 +41,7 @@ public class CharScanner {
static final String MIN_INT_STR_NO_SIGN =
String.valueOf(Integer.MIN_VALUE);
static final String MAX_INT_STR = String.valueOf(Integer.MAX_VALUE);
- private static double powersOf10[] = {
+ private static double[] powersOf10 = {
1.0,
10.0,
100.0,
@@ -285,7 +285,7 @@ public class CharScanner {
return c == COMMA || c == CLOSED_CURLY || c == CLOSED_BRACKET;
}
- public static Number parseJsonNumber(char[] buffer, int from, int max, int
size[]) {
+ public static Number parseJsonNumber(char[] buffer, int from, int max,
int[] size) {
Number value = null;
boolean simple = true;
int digitsPastPoint = 0;
diff --git
a/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/ReaderCharacterSource.java
b/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/ReaderCharacterSource.java
index 117d7bc..1c7fe71 100644
---
a/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/ReaderCharacterSource.java
+++
b/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/ReaderCharacterSource.java
@@ -241,7 +241,7 @@ public class ReaderCharacterSource implements
CharacterSource {
if (index >= length && more) {
ensureBuffer();
if (length != 0) {
- char results2[] = readNumber();
+ char[] results2 = readNumber();
return Chr.add(results, results2);
} else {
return results;