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

8250855: Address reliance on default constructors in the Java 2D APIs #153

Closed
wants to merge 1 commit into from

Conversation

@c-cleary
Copy link
Contributor

@c-cleary c-cleary commented Sep 14, 2020

This issue relates to JDK-8250639 ' Address reliance on default constructors in the java.desktop module'. The changes address the reliance on default constructors by adding in basic constructors in the following classes:

  • java.awt.Image
  • java.awt.PrintJob
  • java.awt.font.GlyphVector
  • java.awt.font.LayoutPath
  • java.awt.font.LineMetrics
  • java.awt.image.AbstractMultiResolutionImage
  • java.awt.image.BufferStrategy
  • java.awt.image.ImageFilter
  • java.awt.image.RGBImageFilter
  • java.awt.image.VolatileImage
  • javax.print.PrintServiceLookup
  • javax.print.ServiceUI
  • javax.print.ServiceUIFactory
  • javax.print.StreamPrintServiceFactory
  • javax.print.event.PrintJobAdapter

specdiff: http://cr.openjdk.java.net/~ccleary/issues/webrevs-store/8250855/webrevs/webrev.02/specdiff/overview-summary.html
csr: https://bugs.openjdk.java.net/browse/JDK-8252495


Progress

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

Issue

  • JDK-8250855: Address reliance on default constructors in the Java 2D APIs

Reviewers

Download

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

@bridgekeeper bridgekeeper bot added the oca label Sep 14, 2020
@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Sep 14, 2020

Hi @ccleary-oracle, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user ccleary-oracle" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

@openjdk
Copy link

@openjdk openjdk bot commented Sep 14, 2020

@ccleary-oracle 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 (add|remove) "label" command.

@openjdk openjdk bot added the 2d label Sep 14, 2020
@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Sep 14, 2020

Thank you! Please allow for up to two weeks to process your OCA, although it is usually done within one to two business days. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated!

@c-cleary
Copy link
Contributor Author

@c-cleary c-cleary commented Sep 14, 2020

/covered

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Sep 14, 2020

Thank you! Please allow for a few business days to verify that your employer has signed the OCA. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated!

@c-cleary c-cleary marked this pull request as ready for review Sep 14, 2020
@openjdk openjdk bot added the rfr label Sep 14, 2020
@mlbridge
Copy link

@mlbridge mlbridge bot commented Sep 14, 2020

Webrevs

@openjdk
Copy link

@openjdk openjdk bot commented Sep 14, 2020

A test job has been started with id: github.com-149121954-153-692160485

@prrace
Copy link
Contributor

@prrace prrace commented Sep 14, 2020

/csr

@openjdk openjdk bot added the csr label Sep 14, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Sep 14, 2020

@prrace this pull request will not be integrated until the CSR request JDK-8252495 for issue JDK-8250855 has been approved.

prrace
prrace approved these changes Sep 14, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Sep 14, 2020

@ccleary-oracle 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 more details.

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

8250855: Address reliance on default constructors in the Java 2D APIs

Reviewed-by: prr, serb

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

  • 89c5e49: 8253500: [REDO] JDK-8253208 Move CDS related code to a separate class
  • bf442c5: 8253539: Remove unused JavaThread functions for set_last_Java_fp/pc
  • dd2c456: 8253583: java/util/StringJoiner tests failing on 32-bit VMs after JDK-8246697
  • b1e2f02: 8253524: C2: Refactor code that clones predicates during loop unswitching
  • c303fd5: 8253581: runtime/stringtable/StringTableCleaningTest.java fails on 32-bit platforms
  • f3ea0d3: 8252583: Clean up unused phi-to-copy degradation mechanism
  • 4440bda: 8219586: CodeHeap State Analytics processes dead nmethods
  • 154b8cf: 8253014: OopStorage bulk release logs entries multiple times
  • ba174af: 8253048: AArch64: When CallLeaf, no need to preserve callee-saved registers in caller
  • 3320fc0: 8253372: [TESTBUG] update tests which require jvmti - hotspot
  • ... and 127 more: https://git.openjdk.java.net/jdk/compare/68da63dcdead52418b41f80d381b105ce71a8162...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@prrace, @mrserb) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready label Sep 14, 2020
@prrace
Copy link
Contributor

@prrace prrace commented Sep 14, 2020

This needs the CSR to be approved before integration

mrserb
mrserb approved these changes Sep 14, 2020
@c-cleary
Copy link
Contributor Author

@c-cleary c-cleary commented Sep 15, 2020

Now awaiting CSR approval as advised

@prrace
Copy link
Contributor

@prrace prrace commented Sep 15, 2020

The CSR needs some updates to put the spec inline

@openjdk openjdk bot removed the csr label Sep 15, 2020
@mlbridge
Copy link

@mlbridge mlbridge bot commented Sep 17, 2020

Mailing list message from Peter Hull on 2d-dev:

Just for my curiosity, what issues can arise relying on default
constructors? I couldn't find anything with google (apart from links back
to these messages!)
Thanks,
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/2d-dev/attachments/20200917/2f0a9ae4/attachment.htm>

@mlbridge
Copy link

@mlbridge mlbridge bot commented Sep 17, 2020

Mailing list message from Kevin Rushforth on 2d-dev:

It is an anti-pattern to rely on an implicit default constructor in a
publicly exported class in a library. There are (at least) three good
reasons to avoid this:

1. The default constructor will have no API docs

2. You could end up with a public constructor in a class where you don't
want a publicly visible constructor, for example a class with factory
methods.

3. In a class where you do intend a public constructor, if you later add
another constructor with an argument, it will have the effect of
removing the default one, which is an incompatible API change.

-- Kevin

On 9/16/2020 11:53 PM, Peter Hull wrote:

Just for my curiosity, what issues can arise relying on default
constructors? I couldn't find anything with google (apart from links
back to these messages!)
Thanks,
Peter

@c-cleary
Copy link
Contributor Author

@c-cleary c-cleary commented Sep 23, 2020

/integrate

@openjdk openjdk bot added the sponsor label Sep 23, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Sep 23, 2020

@ccleary-oracle
Your change (at version d325655) is now ready to be sponsored by a Committer.

@prrace
Copy link
Contributor

@prrace prrace commented Sep 24, 2020

/sponsor

@openjdk openjdk bot closed this Sep 24, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Sep 24, 2020

@prrace @ccleary-oracle Since your change was applied there have been 138 commits pushed to the master branch:

  • a9d0440: 8250859: Address reliance on default constructors in the Accessibility APIs
  • 89c5e49: 8253500: [REDO] JDK-8253208 Move CDS related code to a separate class
  • bf442c5: 8253539: Remove unused JavaThread functions for set_last_Java_fp/pc
  • dd2c456: 8253583: java/util/StringJoiner tests failing on 32-bit VMs after JDK-8246697
  • b1e2f02: 8253524: C2: Refactor code that clones predicates during loop unswitching
  • c303fd5: 8253581: runtime/stringtable/StringTableCleaningTest.java fails on 32-bit platforms
  • f3ea0d3: 8252583: Clean up unused phi-to-copy degradation mechanism
  • 4440bda: 8219586: CodeHeap State Analytics processes dead nmethods
  • 154b8cf: 8253014: OopStorage bulk release logs entries multiple times
  • ba174af: 8253048: AArch64: When CallLeaf, no need to preserve callee-saved registers in caller
  • ... and 128 more: https://git.openjdk.java.net/jdk/compare/68da63dcdead52418b41f80d381b105ce71a8162...master

Your commit was automatically rebased without conflicts.

Pushed as commit 3495c19.

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

@openjdk openjdk bot removed the rfr label Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants