<i18n dev> RFR: 8267521: Post JEP 411 refactoring: maximum covering > 50K [v2]
Weijun Wang
weijun at openjdk.java.net
Fri May 21 14:00:39 UTC 2021
> The code change refactors classes that have a `SuppressWarnings("removal")` annotation that covers more than 50KB of code. The big annotation is often quite faraway from the actual deprecated API usage it is suppressing, and with the annotation covering too big a portion it's easy to call other deprecated methods without being noticed.
>
> The code change shows some common solutions to avoid such too wide annotations:
>
> 1. Extract calls into a method and add annotation on that method
> 2. Assign the return value of a deprecated method call to a new local variable and add annotation on the declaration, and then assign that value to the original l-value.
> 3. Put declaration and assignment into a single statement if possible.
> 4. Rewrite code to achieve #3 above.
Weijun Wang has updated the pull request incrementally with one additional commit since the last revision:
typo on windows
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/4138/files
- new: https://git.openjdk.java.net/jdk/pull/4138/files/e3f0405a..d460efb8
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4138&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4138&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/jdk/pull/4138.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/4138/head:pull/4138
PR: https://git.openjdk.java.net/jdk/pull/4138
More information about the i18n-dev
mailing list