Skip to content

Commit 6d2b809

Browse files
Refactor C-style arrays declarations to Java-style. (#10323)
1 parent 61273bc commit 6d2b809

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

dd-java-agent/instrumentation/java/java-io-1.8/src/test/java/foo/bar/TestPrintWriterSuite.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ public void write(String s) {
1919
pw.write(s);
2020
}
2121

22-
public void write(char buf[], int off, int len) {
22+
public void write(char[] buf, int off, int len) {
2323
pw.write(buf, off, len);
2424
}
2525

26-
public void write(char buf[]) {
26+
public void write(char[] buf) {
2727
pw.write(buf);
2828
}
2929

@@ -43,15 +43,15 @@ public PrintWriter testPrintf(Locale l, String format, Object... args) {
4343
return pw.printf(l, format, args);
4444
}
4545

46-
public void println(char x[]) {
46+
public void println(char[] x) {
4747
pw.println(x);
4848
}
4949

5050
public void println(String x) {
5151
pw.println(x);
5252
}
5353

54-
public void print(char s[]) {
54+
public void print(char[] s) {
5555
pw.print(s);
5656
}
5757

dd-java-agent/instrumentation/servlet/jakarta-servlet-5.0/src/test/java/foo/bar/smoketest/TestJspWriterSuite.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@ public TestJspWriterSuite(final JspWriter writer) {
1111
this.writer = writer;
1212
}
1313

14-
public void printlnTest(char x[]) throws IOException {
14+
public void printlnTest(char[] x) throws IOException {
1515
writer.println(x);
1616
}
1717

1818
public void printlnTest(String x) throws IOException {
1919
writer.println(x);
2020
}
2121

22-
public void printTest(char s[]) throws IOException {
22+
public void printTest(char[] s) throws IOException {
2323
writer.print(s);
2424
}
2525

2626
public void printTest(String s) throws IOException {
2727
writer.print(s);
2828
}
2929

30-
public void write(char s[]) throws IOException {
30+
public void write(char[] s) throws IOException {
3131
writer.write(s);
3232
}
3333

dd-java-agent/instrumentation/servlet/javax-servlet/javax-servlet-common/src/test/java/foo/bar/TestJspWriterSuite.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@ public TestJspWriterSuite(final JspWriter writer) {
1111
this.writer = writer;
1212
}
1313

14-
public void printlnTest(char x[]) throws IOException {
14+
public void printlnTest(char[] x) throws IOException {
1515
writer.println(x);
1616
}
1717

1818
public void printlnTest(String x) throws IOException {
1919
writer.println(x);
2020
}
2121

22-
public void printTest(char s[]) throws IOException {
22+
public void printTest(char[] s) throws IOException {
2323
writer.print(s);
2424
}
2525

2626
public void printTest(String s) throws IOException {
2727
writer.print(s);
2828
}
2929

30-
public void write(char s[]) throws IOException {
30+
public void write(char[] s) throws IOException {
3131
writer.write(s);
3232
}
3333

remote-config/remote-config-core/src/main/java/datadog/remoteconfig/JsonCanonicalizer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private static void serialize(ByteArrayOutputStream os, List<Object> list) {
8585
private static void serialize(ByteArrayOutputStream os, Map<String, Object> map) {
8686
os.write('{');
8787

88-
boolean first[] = new boolean[] {true};
88+
boolean[] first = new boolean[] {true};
8989
map.entrySet().stream()
9090
// the canonical json spec only says "keys are lexicographically sorted"
9191
.sorted((e1, e2) -> String.CASE_INSENSITIVE_ORDER.compare(e1.getKey(), e2.getKey()))

0 commit comments

Comments
 (0)