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

List:       openjdk-2d-dev
Subject:    [OpenJDK 2D-Dev] Integrated: 8267521: Post JEP 411 refactoring: maximum covering > 50K
From:       Weijun Wang <weijun () openjdk ! java ! net>
Date:       2021-06-02 15:51:33
Message-ID: zkd_bofYu1MISkzzGFuI8utKnvp_M7M4icu-ws3be7k=.d7621e87-5890-492f-a64a-187e1f9eb9ed () github ! com
[Download RAW message or body]

On Fri, 21 May 2021 01:52:27 GMT, Weijun Wang <weijun@openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: 508cec75
Author:    Weijun Wang <weijun@openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/508cec7535cd0ad015d566389bc9e5f53ce4103b
                
Stats:     245 lines in 18 files changed: 140 ins; 39 del; 66 mod

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

Reviewed-by: dfuchs, prr

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

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