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

5074006: Swing JOptionPane shows </html> tag as a string after newline #10081

Closed
wants to merge 5 commits into from

Conversation

prsadhuk
Copy link
Contributor

@prsadhuk prsadhuk commented Aug 30, 2022

If JOptionPane's message contains both linefeed/cursor return and HTML tag ie, <html>" + "This is a test\n" + "</html>,
then "</html>" will be shown in the JOptionPane dialog box because after every new line it creates a new messageComponent so the characters after the newline ie "</html>"tag will be considered as a new JLabel string and displayed.

Fix is to ignore closing html tag if appearing after newline from the displayed string.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issues

  • JDK-5074006: Swing JOptionPane shows tag as a string after newline
  • JDK-8042134: JOptionPane bungles HTML messages

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10081/head:pull/10081
$ git checkout pull/10081

Update a local copy of the PR:
$ git checkout pull/10081
$ git pull https://git.openjdk.org/jdk pull/10081/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10081

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10081.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 30, 2022

👋 Welcome back psadhukhan! 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.

@prsadhuk prsadhuk changed the title 5074006: Swing JOptionPane shows <html> tag as a string after newline 5074006: Swing JOptionPane shows </html> tag as a string after newline Aug 30, 2022
@openjdk
Copy link

openjdk bot commented Aug 30, 2022

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

  • client

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 client client-libs-dev@openjdk.org label Aug 30, 2022
@openjdk openjdk bot added the rfr Pull request is ready for review label Aug 30, 2022
@mlbridge
Copy link

mlbridge bot commented Aug 30, 2022

Webrevs

@prsadhuk
Copy link
Contributor Author

/issue add JDK-8042134

@openjdk
Copy link

openjdk bot commented Sep 12, 2022

@prsadhuk
Adding additional issue to issue list: 8042134: JOptionPane bungles HTML messages.

@openjdk
Copy link

openjdk bot commented Sep 15, 2022

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

5074006: Swing JOptionPane shows </html> tag as a string after newline
8042134: JOptionPane bungles HTML messages

Reviewed-by: jdv, tr

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

  • 274ea1d: 8295993: use K instead of 1024 in a couple of hotspot outputs
  • 9b9be88: 8295125: os::signal should be os specific
  • f8cc067: 8296087: Problem list headful tests which may fail on Linux VMs
  • 2e71637: 8282463: javax/sound/sampled/Clip/DataPusherThreadCheck.java fails
  • f3ca0ca: 8293999: [JVMCI] need support for aligned constants in generated code larger than 8 bytes
  • 8aa1526: 8285835: SIGSEGV in PhaseIdealLoop::build_loop_late_post_work
  • a44ebd5: 8295849: Consolidate Threads::owning_thread*
  • 1c86cf5: 8294672: Typo in description of JDWP VirtualMachine/AllThreads command
  • 823fd4a: 8293785: Add a jtreg test for TraceOptoParse
  • 754bd53: 8296030: compiler/c2/irTests/TestVectorizeTypeConversion.java fails with release VMs after JDK-8291781
  • ... and 759 more: https://git.openjdk.org/jdk/compare/b3450e930e52f03ffc3891de7672625ac45b13d0...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 Sep 15, 2022
Copy link
Contributor

@TejeshR13 TejeshR13 left a comment

Choose a reason for hiding this comment

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

Tested and verified.

@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 31, 2022
@openjdk openjdk bot added ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 31, 2022
@prsadhuk
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Oct 31, 2022

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

  • 274ea1d: 8295993: use K instead of 1024 in a couple of hotspot outputs
  • 9b9be88: 8295125: os::signal should be os specific
  • f8cc067: 8296087: Problem list headful tests which may fail on Linux VMs
  • 2e71637: 8282463: javax/sound/sampled/Clip/DataPusherThreadCheck.java fails
  • f3ca0ca: 8293999: [JVMCI] need support for aligned constants in generated code larger than 8 bytes
  • 8aa1526: 8285835: SIGSEGV in PhaseIdealLoop::build_loop_late_post_work
  • a44ebd5: 8295849: Consolidate Threads::owning_thread*
  • 1c86cf5: 8294672: Typo in description of JDWP VirtualMachine/AllThreads command
  • 823fd4a: 8293785: Add a jtreg test for TraceOptoParse
  • 754bd53: 8296030: compiler/c2/irTests/TestVectorizeTypeConversion.java fails with release VMs after JDK-8291781
  • ... and 759 more: https://git.openjdk.org/jdk/compare/b3450e930e52f03ffc3891de7672625ac45b13d0...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 31, 2022
@openjdk openjdk bot closed this Oct 31, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 31, 2022
@openjdk
Copy link

openjdk bot commented Oct 31, 2022

@prsadhuk Pushed as commit 91072ee.

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

@prsadhuk prsadhuk deleted the JDK-5074006 branch October 31, 2022 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client client-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants