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

6211198: ICC_Profile.getInstance(byte[]): IAE is not specified #2328

Closed
wants to merge 5 commits into from

Conversation

mrserb
Copy link
Member

@mrserb mrserb commented Jan 31, 2021

The specification of the java.awt.color.ICC_Profile.getInstance(byte[]) is updated.
Its implementation changed over time, and different exceptions were thrown, but since JDK-8013430 always throws an IllegalArgumentException on null and invalid data.


Progress

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

Issue

  • JDK-6211198: ICC_Profile.getInstance(byte[]): IAE is not specified

Reviewers

Download

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

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 31, 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 bot commented Jan 31, 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 client-libs-dev@openjdk.org awt client-libs-dev@openjdk.org labels Jan 31, 2021
@@ -963,12 +965,7 @@ public static ICC_Profile getInstance(String fileName) throws IOException {
* Profile data
*/
public static ICC_Profile getInstance(InputStream s) throws IOException {
byte[] profileData;
if ((profileData = getProfileDataFromStream(s)) == null) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This additional check was needed when the getInstance(byte[]) thrown NPE on null

@mrserb
Copy link
Member Author

mrserb commented Jan 31, 2021

/csr

@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label Jan 31, 2021
@openjdk
Copy link

openjdk bot commented Jan 31, 2021

@mrserb this pull request will not be integrated until the CSR request JDK-8260689 for issue JDK-6211198 has been approved.

@mrserb
Copy link
Member Author

mrserb commented Jan 31, 2021

/label remove awt

@openjdk openjdk bot removed the awt client-libs-dev@openjdk.org label Jan 31, 2021
@openjdk
Copy link

openjdk bot commented Jan 31, 2021

@mrserb
The awt label was successfully removed.

@mrserb mrserb marked this pull request as ready for review January 31, 2021 11:54
@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 31, 2021
@mlbridge
Copy link

mlbridge bot commented Jan 31, 2021

Webrevs

@@ -764,6 +764,8 @@ protected void finalize () {
* @param data the specified ICC Profile data
* @return an {@code ICC_Profile} object corresponding to the data in the
* specified {@code data} array
* @throws IllegalArgumentException If the byte array does not contain valid
Copy link
Contributor

Choose a reason for hiding this comment

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

The spec does already say "Throws an {@code IllegalArgumentException} if the data does
* not correspond to a valid ICC Profile"
So really you are just adding the @throws clause.
You might want to consider removing the now redundant text.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree. that text is removed.

@openjdk openjdk bot removed the csr Pull request needs approved CSR before integration label Feb 9, 2021
@openjdk
Copy link

openjdk bot commented Feb 9, 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:

6211198: ICC_Profile.getInstance(byte[]): IAE is not specified

Reviewed-by: prr, pbansal

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 27 new commits pushed to the master branch:

  • 699a3cd: 8223188: Removed unnecessary #ifdef __cplusplus from .cpp sources
  • 05c6009: 8259656: fixpath.sh changes broke _NT_SYMBOL_PATH in RunTests.gmk
  • ef7ee3f: 8225081: Remove Telia Company CA certificate expiring in April 2021
  • 7c565f8: 8261209: isStandalone property: remove dependency on pretty-print
  • 01d9280: 8261299: Use-after-free on failure path in LinuxPackage.c, getJvmLauncherLibPath
  • a00b130: 8261356: Clean up enum G1Mark
  • becee64: 8261279: sun/util/resources/cldr/TimeZoneNamesTest.java timed out
  • f395ee0: 8261306: ServiceLoader documentation has malformed Unicode escape
  • 8f4c15f: 8198540: Dynalink leaks memory when generating type converters
  • edd5fc8: 8261096: Convert jlink tool to use Stream.toList()
  • ... and 17 more: https://git.openjdk.java.net/jdk/compare/d6d5d9bf2f1a3343af6cf30a9d06a1f1b5f764ad...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 Pull request is ready to be integrated label Feb 9, 2021
@mrserb
Copy link
Member Author

mrserb commented Feb 10, 2021

/integrate

@openjdk openjdk bot closed this Feb 10, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Feb 10, 2021
@openjdk
Copy link

openjdk bot commented Feb 10, 2021

@mrserb Since your change was applied there have been 37 commits pushed to the master branch:

  • cc5691c: 8248162: serviceability/attach/RemovingUnixDomainSocketTest.java failed
  • 40754f1: 4841153: java.awt.geom.Rectangle2D.add(double,double) documented incorrectly
  • 4caeb39: 8260380: Upgrade to LittleCMS 2.12
  • a772639: 8261298: LinuxPackage.c, getJvmLauncherLibPath RPM->DEB typo
  • 52fc01b: 8261268: LOAD_INSTANCE placeholders unneeded for parallelCapable class loaders
  • a3d6e37: 8261302: NMT: Improve malloc site table hashing
  • ad54d8d: 8260934: java/lang/StringBuilder/HugeCapacity.java fails without Compact Strings
  • 752f92b: 6211242: AreaAveragingScaleFilter(int, int): IAE is not specified
  • 3af334a: 6211257: BasicStroke.createStrokedShape(Shape): NPE is not specified
  • 4619f37: 8261472: BasicConstraintsExtension::toString shows "PathLen:2147483647" if there is no pathLenConstraint
  • ... and 27 more: https://git.openjdk.java.net/jdk/compare/d6d5d9bf2f1a3343af6cf30a9d06a1f1b5f764ad...master

Your commit was automatically rebased without conflicts.

Pushed as commit 447db62.

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

@mrserb mrserb deleted the JDK-6211198 branch February 11, 2021 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2d client-libs-dev@openjdk.org integrated Pull request has been integrated
3 participants