On Fri, 24 Jun 2022 18:06:41 GMT, Ryan Ernst <[email protected]> wrote:
>> Applied required casts in jdk.hotspot.agent for the upcoming warning. >> Verified by cherry-picking @asotona's patch. > > Ryan Ernst has updated the pull request with a new target base due to a merge > or a rebase. The incremental webrev excludes the unrelated changes brought in > by the merge/rebase. The pull request contains two additional commits since > the last revision: > > - Merge branch 'master' into implicit_casts_jdk.hotspot.agent > - 8286397: Address possibly lossy conversions in jdk.hotspot.agent > > Applied required casts in jdk.hotspot.agent for the upcoming warning. > Verified by cherry-picking @asotona's patch. src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java line 540: > 538: Iterator<Field> itr = null; > 539: // loader + signer + protectionDomain + 2 reserved + > fieldSize + cpool entris number > 540: size += (int) (OBJ_ID_SIZE * 5 + INT_SIZE + SHORT_SIZE); Why are INT_SIZE and SHORT_SIZE longs? It seems that making them int (along with all the other related _SIZE fields) is the proper fix for this and the changes below. ------------- PR: https://git.openjdk.org/jdk/pull/9280
