Re: RFR: 8286399: Address possibly lossy conversions in JDK Build Tools
On Fri, 13 May 2022 17:05:43 GMT, Naoto Sato wrote: > Applied required casts for the upcoming warning. Verified by cherry-picking > Adam's patch. Marked as reviewed by joehw (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/8706
Re: RFR: 8286399: Address possibly lossy conversions in JDK Build Tools
On Fri, 13 May 2022 22:11:17 GMT, Joe Wang wrote: >> Applied required casts for the upcoming warning. Verified by cherry-picking >> Adam's patch. > > make/jdk/src/classes/build/tools/generatebreakiteratordata/RuleBasedBreakIteratorBuilder.java > line 1278: > >> 1276: state[numCategories] |= (short) END_STATE_FLAG; >> 1277: if (sawEarlyBreak) { >> 1278: state[numCategories] |= LOOKAHEAD_STATE_FLAG; > > Does this need a cast as well? and also other cases, e.g. line 1019: > state[numCategories] = DONT_LOOP_FLAG;? No, it doesn't. `LOOKAHEAD_STATE_FLAG` is defined as `0x2000` which is within the range of `short`. OTOH, `END_STATE_FLAG` is `0x8000` thus a lossy conversion. - PR: https://git.openjdk.java.net/jdk/pull/8706
Re: RFR: 8286399: Address possibly lossy conversions in JDK Build Tools
On Fri, 13 May 2022 17:05:43 GMT, Naoto Sato wrote: > Applied required casts for the upcoming warning. Verified by cherry-picking > Adam's patch. make/jdk/src/classes/build/tools/generatebreakiteratordata/RuleBasedBreakIteratorBuilder.java line 1278: > 1276: state[numCategories] |= (short) END_STATE_FLAG; > 1277: if (sawEarlyBreak) { > 1278: state[numCategories] |= LOOKAHEAD_STATE_FLAG; Does this need a cast as well? and also other cases, e.g. line 1019: state[numCategories] = DONT_LOOP_FLAG;? - PR: https://git.openjdk.java.net/jdk/pull/8706
Re: RFR: 8286399: Address possibly lossy conversions in JDK Build Tools
On Fri, 13 May 2022 17:05:43 GMT, Naoto Sato wrote: > Applied required casts for the upcoming warning. Verified by cherry-picking > Adam's patch. Marked as reviewed by rriggs (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/8706
RFR: 8286399: Address possibly lossy conversions in JDK Build Tools
Applied required casts for the upcoming warning. Verified by cherry-picking Adam's patch. - Commit messages: - 8286399: Address possibly lossy conversions in JDK Build Tools Changes: https://git.openjdk.java.net/jdk/pull/8706/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8706&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8286399 Stats: 5 lines in 2 files changed: 0 ins; 0 del; 5 mod Patch: https://git.openjdk.java.net/jdk/pull/8706.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8706/head:pull/8706 PR: https://git.openjdk.java.net/jdk/pull/8706