[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] RFR: 8267521: Post JEP 411 refactoring: maximum covering > 50K [v4]
From:       Weijun Wang <weijun () openjdk ! java ! net>
Date:       2021-06-02 15:40:55
Message-ID: iWLNwxV2CvTVXj57-NbeWHor64Ab3P7461jOk1XxoJ0=.91556668-25eb-40b4-afae-730f9c1d621f () github ! com
[Download RAW message or body]

> 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 if not void. The local variable will be called `tmp` if later reassigned or \
> `dummy` if it will be discarded. 3. Put declaration and assignment into a single \
> statement if possible. 4. Rewrite code to achieve #3 above.
> 
> I'll add a copyright year update commit before integration.

Weijun Wang has updated the pull request with a new target base due to a merge or a \
rebase. The pull request now contains one commit:

  8267521: Post JEP 411 refactoring: maximum covering > 50K

-------------

Changes: https://git.openjdk.java.net/jdk/pull/4138/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4138&range=03
  Stats: 245 lines in 18 files changed: 140 ins; 39 del; 66 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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic