Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8286399: Address possibly lossy conversions in JDK Build Tools #8706

Closed
wants to merge 1 commit into from

Conversation

naotoj
Copy link
Member

@naotoj naotoj commented May 13, 2022

Applied required casts for the upcoming warning. Verified by cherry-picking Adam's patch.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (1 review required, with at least 1 reviewer)

Issue

  • JDK-8286399: Address possibly lossy conversions in JDK Build Tools

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/8706/head:pull/8706
$ git checkout pull/8706

Update a local copy of the PR:
$ git checkout pull/8706
$ git pull https://git.openjdk.java.net/jdk pull/8706/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 8706

View PR using the GUI difftool:
$ git pr show -t 8706

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/8706.diff

@bridgekeeper
Copy link

bridgekeeper bot commented May 13, 2022

👋 Welcome back naoto! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr label May 13, 2022
@openjdk
Copy link

openjdk bot commented May 13, 2022

@naotoj The following labels will be automatically applied to this pull request:

  • build
  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added build core-libs labels May 13, 2022
@mlbridge
Copy link

mlbridge bot commented May 13, 2022

Webrevs

@openjdk
Copy link

openjdk bot commented May 13, 2022

@naotoj This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8286399: Address possibly lossy conversions in JDK Build Tools

Reviewed-by: rriggs, joehw

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 51 new commits pushed to the master branch:

  • f56396f: 6829250: Reg test: java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java fails in Windows
  • 273c732: 8277493: [REDO] Quarantined jpackage apps are labeled as "damaged"
  • 583a61a: 8286671: (fc) Modify sun.nio.ch.FileChannelImpl.map0() to accept a FileDescriptor parameter
  • 1e843c3: 8286604: Update InputStream and OutputStream to use @implSpec
  • 78ffefb: 8286668: JFR: Cleanup
  • 76caeed: 8285366: Fix typos in serviceability
  • f631c98: 8285380: Fix typos in security
  • 237f280: 8286393: Address possibly lossy conversions in java.rmi
  • cbe7e7b: 8284956: Potential leak awtImageData/color_data when initializes X11GraphicsEnvironment
  • 8daf08d: 8286628: Remove unused BufferNode::Allocator::flush_free_list
  • ... and 41 more: https://git.openjdk.java.net/jdk/compare/46a775af11bce4bc780b5f85e0cd2f648dee1d03...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label May 13, 2022
@@ -1273,7 +1273,7 @@ else if (c == '/') {
for (int i = 0; i < decisionPointList.size(); i++) {
int rowNum = decisionPointList.elementAt(i).intValue();
state = tempStateTable.elementAt(rowNum);
state[numCategories] |= END_STATE_FLAG;
state[numCategories] |= (short) END_STATE_FLAG;
if (sawEarlyBreak) {
state[numCategories] |= LOOKAHEAD_STATE_FLAG;
Copy link
Member

@JoeWang-Java JoeWang-Java May 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need a cast as well? and also other cases, e.g. line 1019: state[numCategories] = DONT_LOOP_FLAG;?

Copy link
Member Author

@naotoj naotoj May 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@naotoj
Copy link
Member Author

naotoj commented May 16, 2022

/integrate

@openjdk
Copy link

openjdk bot commented May 16, 2022

Going to push as commit c044cb8.
Since your change was applied there have been 73 commits pushed to the master branch:

  • b884db8: 8285844: TimeZone.getTimeZone(ZoneOffset) does not work for all ZoneOffsets and returns GMT unexpected
  • dbd3737: 8286200: SequenceInputStream::read(b, off, 0) returns -1 at EOF
  • 743c779: 8286390: Address possibly lossy conversions in jdk.incubator.foreign moved to java.base
  • 22139c3: 8286704: G1: Call offset_of directly in subclasses of G1CardSetContainer
  • 77dfbb4: 8178701: Compile error with switch statement on protected enum defined in parent inner class
  • f4258a5: 8209137: Add ability to bind to specific local address to HTTP client
  • 65da38d: 8284585: PushPromiseContinuation test fails intermittently in timeout
  • 652044d: 8286297: G1: Simplify parallel and serial verification code paths
  • 0155e4b: 8282274: Compiler implementation for Pattern Matching for switch (Third Preview)
  • 2d34acf: 8286638: C2: CmpU needs to do more precise over/underflow analysis
  • ... and 63 more: https://git.openjdk.java.net/jdk/compare/46a775af11bce4bc780b5f85e0cd2f648dee1d03...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated label May 16, 2022
@openjdk openjdk bot closed this May 16, 2022
@openjdk openjdk bot removed ready rfr labels May 16, 2022
@openjdk
Copy link

openjdk bot commented May 16, 2022

@naotoj Pushed as commit c044cb8.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build core-libs integrated
3 participants