mirror of
https://github.com/apple/pkl.git
synced 2026-04-28 19:27:18 +02: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
@@ -31,12 +31,6 @@ A for-generator cannot generate object properties (only entries and elements).
|
||||
forGeneratorCannotGenerateMethods=\
|
||||
A for-generator cannot generate object methods (only entries and elements).
|
||||
|
||||
legacyForGeneratorCannotHaveTwoVars=\
|
||||
A legacy for-generator cannot have two for-variables.\n\
|
||||
\n\
|
||||
The correct syntax for a for-generator with two for-variables is:\n\
|
||||
for (key, value in iterable) { ... }
|
||||
|
||||
cannotIterateOverThisValue=\
|
||||
Cannot iterate over value of type `{0}`.
|
||||
|
||||
@@ -92,13 +86,6 @@ Instead, instantiate a concrete subclass.
|
||||
cannotInstantiateType=\
|
||||
Cannot instantiate type `{0}`.
|
||||
|
||||
cannotAmendValueOfExternalClass=\
|
||||
Cannot amend value of external class `{0}`.\n\
|
||||
\n\
|
||||
Values of external classes cannot be amended.\n\
|
||||
Instead, create a new value using the class'' literal syntax or constructor method.\n\
|
||||
For example, `123` creates a value of class `Int`, and `Pair(1, 2)` creates a value of class `Pair`.
|
||||
|
||||
cannotAmendPropertyDefinition=\
|
||||
A property definition cannot be amended.\n\
|
||||
\n\
|
||||
@@ -135,6 +122,7 @@ Cannot amend fixed property `{0}`.
|
||||
cannotAssignConstProperty=\
|
||||
Cannot assign to const property `{0}`.
|
||||
|
||||
# suppress inspection "UnusedProperty"
|
||||
cannotAmendConstProperty=\
|
||||
Cannot amend const property `{0}`.
|
||||
|
||||
@@ -479,9 +467,6 @@ Undefined value.
|
||||
undefinedPropertyValue=\
|
||||
Tried to read property `{0}` but its value is undefined.
|
||||
|
||||
unreachableCode=\
|
||||
This code should not have been reached.
|
||||
|
||||
cannotFindModule=\
|
||||
Cannot find module `{0}`.
|
||||
|
||||
@@ -542,9 +527,6 @@ Cannot convert Float `{0}` to Int because it is too large.
|
||||
cannotConvertNonFiniteFloat=\
|
||||
Cannot convert non-finite Float `{0}` to Int.
|
||||
|
||||
cannotConvertMapWithNonStringKeyToTyped=\
|
||||
Cannot convert map with non-string key to typed object.
|
||||
|
||||
intValueTooLarge=\
|
||||
Int value `{0}` is too large (only Int32 supported here).
|
||||
|
||||
@@ -560,15 +542,9 @@ Cannot combine glob imports with triple-dot module URIs.
|
||||
cannotGlobUri=\
|
||||
Cannot expand glob pattern `{0}` because scheme `{1}` is not globbable.
|
||||
|
||||
expectedAClass=\
|
||||
Expected a class, but got a value of type `{0}`.
|
||||
|
||||
expectedAnnotationClass=\
|
||||
Expected an annotation class.
|
||||
|
||||
expectedAClassButGotNull=\
|
||||
Expected a class, but got `null`.
|
||||
|
||||
expectedNonNullValue=\
|
||||
Expected a non-null value, but got `null`.
|
||||
|
||||
@@ -665,10 +641,6 @@ For example: `package://example.com/my/project@1.0.0#/path/to/file.pkl`.
|
||||
invalidResourceUri=\
|
||||
Resource URI `{0}` has invalid syntax.
|
||||
|
||||
# used as {1} in invalidModuleUri and invalidResourceUri
|
||||
invalidUriFormat=\
|
||||
must match pattern `{0}`
|
||||
|
||||
invalidGlobPattern=\
|
||||
Invalid glob pattern `{0}`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user