ICU-22920 Fix raw type warnings in icu4j core tests #3305
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To make the review easier this only fixes one kind of warning:
XYZ is a raw type. References to generic type XYZ should be parameterized.
This PR removes about 440 warnings.
Only fixed the warnings in tests, leaving the main code untouched.
The non-test code might needs a bit more care.
Some might be implementation details, private methods / members, easy to change.
But some might affect public APIs
There is also a leftover class in tests that need fixing.
LocaleAliasTest
fails if I fix it, because it is already broken, but no tests run.There is a generic (typeless)
Map
, initialized with someString
(key) =>Strings
(value).Later on there are
get(ULocale)
calls, which returnnull
, and that test case if skipped.So no test is executed, because in fact all test cases are skipped.
If I fix the type of the map to
<ULocale, ULocale>
(as it should be), then the real tests are executed and some are failing.Checklist