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

List:       openjdk-serviceability-dev
Subject:    Re: RFR: 8244681: Add a warning for possibly lossy conversion in compound assignments [v14]
From:       Adam Sotona <asotona () openjdk ! org>
Date:       2022-06-27 9:25:58
Message-ID: cg1cvzaYh2RZByrgkAI6sPvZ1J0B4JAOiqVe4ib_e34=.9ec074a6-f3c0-4226-8b8c-8064fefd393b () github ! com
[Download RAW message or body]

> Please review this patch adding new lint option, **lossy-conversions**, to javac to \
> warn about type casts in compound assignments with possible lossy conversions. 
> The new lint warning is shown if the type of the right-hand operand of a compound \
> assignment is not assignment compatible with the type of the variable. 
> The implementation of the warning is based on similar check performed to emit \
> "possible lossy conversion" compilation error for simple assignments.  
> Proposed patch also include complex matrix-style test with positive and negative \
> test cases of lossy conversions in compound assignments. 
> Proposed patch also disables this new lint option in all affected JDK modules and \
> libraries to allow smooth JDK build. Individual cases to address possibly lossy \
> conversions warnings in JDK are already addressed in a separate umbrella issue and \
> its sub-tasks. 
> Thanks for your review,
> Adam

Adam Sotona has updated the pull request incrementally with one additional commit \
since the last revision:

  re-enabled lossy conversions warnings for java.security.jgss, jdk.crypto.ec and \
jdk.internal.le

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/8599/files
  - new: https://git.openjdk.org/jdk/pull/8599/files/cab6ce59..6f32938d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=8599&range=13
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=8599&range=12-13

  Stats: 3 lines in 3 files changed: 0 ins; 3 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/8599.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/8599/head:pull/8599

PR: https://git.openjdk.org/jdk/pull/8599


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

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