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

8264002: Delete outdated assumptions about ColorSpace initialization #3140

Closed
wants to merge 1 commit into from

Conversation

@mrserb
Copy link
Member

@mrserb mrserb commented Mar 23, 2021

Some codes have outdated assumptions about the initialization of ColorSpace class.

  • The ColorSpace.getInstance() will never throw an IllegalArgumentException for the builtin profiles
  • The ColorSpace.getInstance() will not trigger initialisation of the CMM classes

Progress

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

Issue

  • JDK-8264002: Delete outdated assumptions about ColorSpace initialization

Reviewers

Download

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

To update a local copy of the PR:
$ git checkout pull/3140
$ git pull https://git.openjdk.java.net/jdk pull/3140/head

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Mar 23, 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 Mar 23, 2021

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

  • 2d

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

@openjdk openjdk bot added the 2d label Mar 23, 2021
&& !cs.equals(ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB))
&& !cs.equals(ColorSpace.getInstance(ColorSpace.CS_GRAY))
&& !cs.equals(ColorSpace.getInstance(ColorSpace.CS_CIEXYZ))
&& !cs.equals(ColorSpace.getInstance(ColorSpace.CS_PYCC));
}
Copy link
Member Author

@mrserb mrserb Mar 23, 2021

Choose a reason for hiding this comment

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

The method above was added by the tiff implementation in jdk9 and it is mostly a copy of the older code in the jpeg plugin. I merged two methods and leave it here in the "common" code.

/* These are kept in the inner class to avoid static initialization
* of the CMM class until someone actually needs it.
* (e.g. do not init CMM on the request for jpeg mime types)
*/
Copy link
Member Author

@mrserb mrserb Mar 23, 2021

Choose a reason for hiding this comment

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

It is not necessary to delay the usage of ColorSpace, it itself defers the usage of cmm.

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

@mlbridge mlbridge bot commented Mar 23, 2021

Webrevs

Copy link
Member

@azvegint azvegint left a comment

Looks good to me.

@openjdk
Copy link

@openjdk openjdk bot commented Mar 24, 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:

8264002: Delete outdated assumptions about ColorSpace initialization

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

  • 5ca5962: 8259926: Error in jpackage sample usage in the help text
  • 70d3401: 8263887: Re-create default icons
  • 133a63b: 8263968: CDS: java/lang/ModuleLayer.EMPTY_LAYER should be singleton
  • 3aee5ad: 8264026: Remove dependency between free collection set and eagerly reclaim humongous object tasks
  • deda80f: 8264057: [redo] JDK-8248904: Add support to jpackage for the Mac App Store.
  • 57c3f27: 8263989: Cleanup in EA
  • 4d8e986: 8261966: macOS M1: report in hs_err log if we are running x86 code in emulation mode (Rosetta)
  • bc91596: 8264051: Remove unused TRAPS parameters from runtime functions
  • 5d7e93c: 8264004: Don't use TRAPS if no exceptions are thrown
  • 9ee0b9a: 8264052: Shenandoah: Backout 8263832
  • ... and 47 more: https://git.openjdk.java.net/jdk/compare/f62b1008ed136dcbe7ee17191cc9b77ca2b70334...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 Mar 24, 2021
@mrserb
Copy link
Member Author

@mrserb mrserb commented Mar 24, 2021

/integrate

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

@openjdk openjdk bot commented Mar 24, 2021

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

Your commit was automatically rebased without conflicts.

Pushed as commit cfc9aa3.

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

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