Skip to content

8281523: Accessibility: Conversion from string literal loses const qualifier#7380

Closed
djelinski wants to merge 3 commits intoopenjdk:masterfrom
djelinski:accessibility-string-handling
Closed

8281523: Accessibility: Conversion from string literal loses const qualifier#7380
djelinski wants to merge 3 commits intoopenjdk:masterfrom
djelinski:accessibility-string-handling

Conversation

@djelinski
Copy link
Member

@djelinski djelinski commented Feb 8, 2022

This patch fixes jdk.accessibility compilation under VisualStudio 2019 with /Zc:strictStrings enabled.

Strict string handling is already enabled in GCC and Clang. With some effort we should be able to enable it in MSVC as well.


Progress

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

Issue

  • JDK-8281523: Accessibility: Conversion from string literal loses const qualifier

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 7380

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 8, 2022

👋 Welcome back djelinski! 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 Feb 8, 2022

@djelinski 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 Feb 8, 2022
@djelinski djelinski changed the title Accessibility: Conversion from string literal loses const qualifier 8281523: Accessibility: Conversion from string literal loses const qualifier Feb 9, 2022
@djelinski djelinski marked this pull request as ready for review February 9, 2022 07:47
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 9, 2022
@mlbridge
Copy link

mlbridge bot commented Feb 9, 2022

Webrevs

@djelinski
Copy link
Member Author

Hi, can I get a review for this change?
This is similar to #7379, but in a different subcomponent (Accessibility vs. AWT). I added const qualifier to a bunch of function parameters.

Additionally I removed one (unused) function and one (mismatching) function declaration; build passed, tier1 and tier2 green. Verified with both vs2019 and vs2017.


/**
* Send Java debugging info to the appropriate place
*/
Copy link
Contributor

@prrace prrace Feb 14, 2022

Choose a reason for hiding this comment

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

Deleting this function - without comment ! - seems to be somewhat out of scope here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Reverted.

I removed this function because its definition (PrintJavaDebugString2) did not match the declaration (PrintJavaDebugString), so the function wasn't really usable. I'm fine with leaving it as is, or cleaning up separately.

This reverts commit 8576f91.
@openjdk
Copy link

openjdk bot commented Feb 16, 2022

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

8281523: Accessibility: Conversion from string literal loses const qualifier

Reviewed-by: prr, aivanov, kizune

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

  • cc7cf81: 8280861: Robot color picker broken on Linux with scaling above 100%
  • d7a706a: 8253757: Add LLVM-based backend for hsdis
  • bdae1d8: 8282147: [TESTBUG] waitForIdle after creating frame in JSpinnerMouseAndKeyPressTest.java
  • 51f4420: 8282130: (bf) Remove unused ARRAY_BASE_OFFSET, ARRAY_INDEX_SCALE from read-only Heap Buffers
  • 34aae32: 8282166: JDK-8282158 changed ECParameters' package by accident
  • c5d9142: 8282096: G1: Remove redundant checks in G1CardSet::free_mem_object
  • 52a85d8: 8282158: ECParameters InvalidParameterSpecException messages missed ECKeySizeParameterSpec
  • 4e0b81c: 8281544: assert(VM_Version::supports_avx512bw()) failed for Tests jdk/incubator/vector/
  • 8563d86: 8282085: The REGISTER_DEFINITION macro is useless after JDK-8269122
  • d28b048: 8281815: x86: Use short jumps in TIG::generate_slow_signature_handler
  • ... and 141 more: https://git.openjdk.java.net/jdk/compare/2f71a6b39ed6bb869b4eb3e81bc1d87f4b3328ff...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, @aivanov-jdk, @azuev-java) 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 Pull request is ready to be integrated label Feb 16, 2022
@djelinski
Copy link
Member Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Feb 17, 2022
@openjdk
Copy link

openjdk bot commented Feb 17, 2022

@djelinski
Your change (at version fc67bf6) is now ready to be sponsored by a Committer.

@djelinski
Copy link
Member Author

hi, could you sponsor this? It's already integrated. Thank you!

@aivanov-jdk
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Feb 21, 2022

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

  • cc7cf81: 8280861: Robot color picker broken on Linux with scaling above 100%
  • d7a706a: 8253757: Add LLVM-based backend for hsdis
  • bdae1d8: 8282147: [TESTBUG] waitForIdle after creating frame in JSpinnerMouseAndKeyPressTest.java
  • 51f4420: 8282130: (bf) Remove unused ARRAY_BASE_OFFSET, ARRAY_INDEX_SCALE from read-only Heap Buffers
  • 34aae32: 8282166: JDK-8282158 changed ECParameters' package by accident
  • c5d9142: 8282096: G1: Remove redundant checks in G1CardSet::free_mem_object
  • 52a85d8: 8282158: ECParameters InvalidParameterSpecException messages missed ECKeySizeParameterSpec
  • 4e0b81c: 8281544: assert(VM_Version::supports_avx512bw()) failed for Tests jdk/incubator/vector/
  • 8563d86: 8282085: The REGISTER_DEFINITION macro is useless after JDK-8269122
  • d28b048: 8281815: x86: Use short jumps in TIG::generate_slow_signature_handler
  • ... and 141 more: https://git.openjdk.java.net/jdk/compare/2f71a6b39ed6bb869b4eb3e81bc1d87f4b3328ff...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Feb 21, 2022

@aivanov-jdk @djelinski Pushed as commit e1c98bd.

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

@djelinski djelinski deleted the accessibility-string-handling branch February 21, 2022 18:51
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.

4 participants