mirror of
https://github.com/apple/pkl.git
synced 2026-03-25 02:21:11 +01:00
Fix IntelliJ warnings in Java code
Fix all IntelliJ warnings in Java production code except for bogus spelling warnings and warnings about unused public methods. Also fix some warnings emitted by Code->Inspect Code. Changes made: - use text block instead of string concatenation - extract method to avoid code duplication - use switch expression - fix Javadoc syntax and spelling - fix spelling in comment - increase class visibility to match visibility of use site - delete overriding method with same implementation - use String.isEmpty() and StringBuilder.isEmpty() - add @Serial annotation - make field final - remove unused field - remove unused private method - remove exceptions that aren't thrown from throws clause - insert non-null assertion - annotate overriding method with @Nonnull - suppress warning - delete unused class (WriteAuxiliarySlotNode) - add final modifier - remove unused error message - repeat @Nullable modifier in overriding method - remove never thrown exception from throws clause - remove redundant suppression
This commit is contained in:
committed by
Daniel Chao
parent
5feaa2aaf7
commit
ae69e4776f
@@ -30,30 +30,31 @@ public class ParserBenchmark {
|
||||
public void run() {
|
||||
new Parser()
|
||||
.parseModule(
|
||||
"a1 {\n"
|
||||
+ " a2 {\n"
|
||||
+ " a3 {\n"
|
||||
+ " a4 {\n"
|
||||
+ " a5 {\n"
|
||||
+ " a6 {\n"
|
||||
+ " a7 {\n"
|
||||
+ " a8 {\n"
|
||||
+ " a9 {\n"
|
||||
+ " a10 {\n"
|
||||
+ " a11 {\n"
|
||||
+ " a12 {\n"
|
||||
+ " a13 = map(map(map((x) -> 1)))\n"
|
||||
+ " }\n"
|
||||
+ " }\n"
|
||||
+ " }\n"
|
||||
+ " }\n"
|
||||
+ " }\n"
|
||||
+ " }\n"
|
||||
+ " }\n"
|
||||
+ " }\n"
|
||||
+ " }\n"
|
||||
+ " }\n"
|
||||
+ " }\n"
|
||||
+ "}");
|
||||
"""
|
||||
a1 {
|
||||
a2 {
|
||||
a3 {
|
||||
a4 {
|
||||
a5 {
|
||||
a6 {
|
||||
a7 {
|
||||
a8 {
|
||||
a9 {
|
||||
a10 {
|
||||
a11 {
|
||||
a12 {
|
||||
a13 = map(map(map((x) -> 1)))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}""");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user