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

JDK-8283668: Update IllegalFormatException to use sealed classes #7950

Closed
wants to merge 1 commit into from

Conversation

jddarcy
Copy link
Member

@jddarcy jddarcy commented Mar 25, 2022

Working down the list of candidates to be sealed, this time IllegalFormatException.

Please also review the companion CSR: https://bugs.openjdk.java.net/browse/JDK-8283669


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed
  • Change requires a CSR request to be approved

Issues

  • JDK-8283668: Update IllegalFormatException to use sealed classes
  • JDK-8283669: Update IllegalFormatException to use sealed classes (CSR)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 7950

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

Using diff file

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

@jddarcy
Copy link
Member Author

jddarcy commented Mar 25, 2022

/csr

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 25, 2022

👋 Welcome back darcy! 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 rfr csr labels Mar 25, 2022
@openjdk
Copy link

openjdk bot commented Mar 25, 2022

@jddarcy this pull request will not be integrated until the CSR request JDK-8283669 for issue JDK-8283668 has been approved.

@openjdk
Copy link

openjdk bot commented Mar 25, 2022

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

  • core-libs

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 core-libs label Mar 25, 2022
@mlbridge
Copy link

mlbridge bot commented Mar 25, 2022

Webrevs

@mlbridge
Copy link

mlbridge bot commented Mar 25, 2022

Mailing list message from Bernd Eckenfels on core-libs-dev:

I wonder should the CSR not describe what?s the advantage of this change is and what the compatibility problems are and why they don?t apply here? Especially given the fact that the specific sub exceptions are not sealed I wonder if the risk of breaking existing code is worth it? (But I do see the beauty of such a construct for new code!)

Gruss
Bernd

--
http://bernd.eckenfels.net
________________________________
Von: core-libs-dev <core-libs-dev-retn at openjdk.java.net> im Auftrag von Jaikiran Pai <jpai at openjdk.java.net>
Gesendet: Friday, March 25, 2022 10:27:40 AM
An: core-libs-dev at openjdk.java.net <core-libs-dev at openjdk.java.net>
Betreff: Re: RFR: JDK-8283668: Update IllegalFormatException to use sealed classes

On Fri, 25 Mar 2022 04:17:57 GMT, Joe Darcy <darcy at openjdk.org> wrote:

Working down the list of candidates to be sealed, this time IllegalFormatException.

Please also review the companion CSR: https://bugs.openjdk.java.net/browse/JDK-8283669

Marked as reviewed by jpai (Committer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/7950

@mlbridge
Copy link

mlbridge bot commented Mar 25, 2022

Mailing list message from Alan Bateman on core-libs-dev:

On 25/03/2022 09:37, Bernd Eckenfels wrote:

I wonder should the CSR not describe what?s the advantage of this change is and what the compatibility problems are and why they don?t apply here? Especially given the fact that the specific sub exceptions are not sealed I wonder if the risk of breaking existing code is worth it? (But I do see the beauty of such a construct for new code!)

IllegalFormatException does not have any accessible constructors so
can't extended by classes outside of the java.util packages. So I think
the only compatibility risk is doing something off label with
deserialization to create sub-classes.

-Alan

@openjdk openjdk bot removed the csr label Mar 25, 2022
@openjdk
Copy link

openjdk bot commented Mar 25, 2022

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

8283668: Update IllegalFormatException to use sealed classes

Reviewed-by: iris, jpai

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

  • 5ca8b91: 8283713: [BACKOUT] Unexpected TypeElement in ANALYZE TaskEvent
  • 7bac0a8: 8283681: Improve ZonedDateTime offset handling
  • 2600f99: 8282685: fileToEncodedURL_[name|signature] symbols are unused
  • e97cf15: 8283691: Classes in java.security still reference deprecated classes in spec
  • cb012a5: 8283648: Improve the snippet "file not found" message.
  • 36b36ef: 8283661: Unexpected TypeElement in ANALYZE TaskEvent
  • f4fd53d: 8273370: Preferences.exportSubtree() generates invalid XML if value contains control char
  • 3b5dfee: 8283665: Two Jarsigner tests needs to be updated with JDK-8267319
  • 656cba7: 8283349: Robustness improvements to java/util/prefs/AddNodeChangeListener.jar
  • f8a1649: 8274735: javax.imageio.IIOException: Unsupported Image Type while processing a valid JPEG image
  • ... and 6 more: https://git.openjdk.java.net/jdk/compare/f16244509df7659572bfd23e55a62bb9a891000a...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 25, 2022
@jddarcy
Copy link
Member Author

jddarcy commented Mar 25, 2022

Mailing list message from Alan Bateman on core-libs-dev:

On 25/03/2022 09:37, Bernd Eckenfels wrote:

I wonder should the CSR not describe what?s the advantage of this change is and what the compatibility problems are and why they don?t apply here? Especially given the fact that the specific sub exceptions are not sealed I wonder if the risk of breaking existing code is worth it? (But I do see the beauty of such a construct for new code!)

IllegalFormatException does not have any accessible constructors so can't extended by classes outside of the java.util packages. So I think the only compatibility risk is doing something off label with deserialization to create sub-classes.

-Alan

Right; the general user "interface" in question is "this class cannot be extended outside of the JDK." Altering the way that property is implemented, no accessible constructor or being declared sealed, etc. is considered a compatible change.

-Joe

@jddarcy
Copy link
Member Author

jddarcy commented Mar 25, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Mar 25, 2022

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

  • 5ca8b91: 8283713: [BACKOUT] Unexpected TypeElement in ANALYZE TaskEvent
  • 7bac0a8: 8283681: Improve ZonedDateTime offset handling
  • 2600f99: 8282685: fileToEncodedURL_[name|signature] symbols are unused
  • e97cf15: 8283691: Classes in java.security still reference deprecated classes in spec
  • cb012a5: 8283648: Improve the snippet "file not found" message.
  • 36b36ef: 8283661: Unexpected TypeElement in ANALYZE TaskEvent
  • f4fd53d: 8273370: Preferences.exportSubtree() generates invalid XML if value contains control char
  • 3b5dfee: 8283665: Two Jarsigner tests needs to be updated with JDK-8267319
  • 656cba7: 8283349: Robustness improvements to java/util/prefs/AddNodeChangeListener.jar
  • f8a1649: 8274735: javax.imageio.IIOException: Unsupported Image Type while processing a valid JPEG image
  • ... and 6 more: https://git.openjdk.java.net/jdk/compare/f16244509df7659572bfd23e55a62bb9a891000a...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Mar 25, 2022

@jddarcy Pushed as commit f520b4f.

💡 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
core-libs integrated
3 participants