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

8261200: Some code in the ICC_Profile may not close file streams properly #2421

Closed
wants to merge 5 commits into from

Conversation

@mrserb
Copy link
Member

@mrserb mrserb commented Feb 5, 2021

In a few places where we use streams the try/with/res blocks are added.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8261200: Some code in the ICC_Profile may not close file streams properly

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2421/head:pull/2421
$ git checkout pull/2421

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Feb 5, 2021

👋 Welcome back serb! 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
Copy link

@openjdk openjdk bot commented Feb 5, 2021

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

  • 2d
  • awt

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 2d awt labels Feb 5, 2021
@mrserb
Copy link
Member Author

@mrserb mrserb commented Feb 5, 2021

/label remove awt

@openjdk openjdk bot removed the awt label Feb 5, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Feb 5, 2021

@mrserb
The awt label was successfully removed.

@mrserb mrserb marked this pull request as ready for review Feb 5, 2021
@openjdk openjdk bot added the rfr label Feb 5, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Feb 5, 2021

Webrevs

if (data1.length != data2.length) {
throw new RuntimeException("Wrong size");
}
for (int i = 0; i < data1.length; ++i) {
if (data1[i] != data2[i]) {
throw new RuntimeException("Wrong data");
}
}
}
Copy link
Member

@azvegint azvegint Feb 6, 2021

Just a matter of taste, but if you OK with not elaborating why arrays differs, the method may be shortened with Arrays.equals() usage.

Copy link
Member Author

@mrserb mrserb Feb 6, 2021

updated

testViaFile(gold);
testViaStream(gold);
Copy link
Member

@azvegint azvegint Feb 6, 2021

Are we OK with not calling testViaFile() and testViaStream in case of testViaDataArray() failure?

Copy link
Member Author

@mrserb mrserb Feb 6, 2021

yeah, it intentionally "fails fast".

@openjdk
Copy link

@openjdk openjdk bot commented Feb 6, 2021

@mrserb 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:

8261200: Some code in the ICC_Profile may not close file streams properly

Reviewed-by: azvegint

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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 Feb 6, 2021
@mrserb
Copy link
Member Author

@mrserb mrserb commented Feb 6, 2021

/integrate

@openjdk openjdk bot closed this Feb 6, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Feb 6, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Feb 6, 2021

@mrserb Pushed as commit 74d40ab.

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

@mrserb mrserb deleted the JDK-8261200 branch Feb 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants