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

8286371: Avoid use of deprecated str[n]icmp #8590

Closed
wants to merge 1 commit into from

Conversation

kimbarrett
Copy link

@kimbarrett kimbarrett commented May 9, 2022

Please review this trivial change to use _str[n]icmp instead of (deprecated)
str[n]icmp in the only places the latter are used in HotSpot, in
Windows-specific code. This change is in preparation for removing the global
disable of deprecation warnings for HotSpot Windows builds.

An alternative would be to use str[n]casecmp, which are defined in
globalDefinitions_visCPP.hpp for compatibilty in shared code. But since the
uses of the functions being changed are in Windows-specific code I think the
non-deprecated Windows-specific functions are more appropriate.

There are some other uses of the deprecated functions in the JDK. I didn't
change them. Those other places have different approaches to dealing with the
source compatibility and deprecation than does HotSpot, suppressing the
warning for this and various other functions using _CRT_NONSTDC_NO_DEPRECATE.

Note that the deprecation message for these functions is the same one used for
deprecating various POSIX functions, and the deprecation is under the control
of the same macro, even though these aren't actually from POSIX.


Progress

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

Issue

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 8590

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

Using diff file

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

Sorry, something went wrong.

@bridgekeeper
Copy link

bridgekeeper bot commented May 9, 2022

👋 Welcome back kbarrett! 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 the rfr Pull request is ready for review label May 9, 2022
@openjdk
Copy link

openjdk bot commented May 9, 2022

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

  • hotspot-runtime

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 hotspot-runtime hotspot-runtime-dev@openjdk.org label May 9, 2022
@mlbridge
Copy link

mlbridge bot commented May 9, 2022

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

Looks good and trivial.

Thanks.

@openjdk
Copy link

openjdk bot commented May 9, 2022

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

8286371: Avoid use of deprecated str[n]icmp

Reviewed-by: dholmes

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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 May 9, 2022
@kimbarrett
Copy link
Author

Thanks for review @dholmes-ora

@kimbarrett
Copy link
Author

/integrate

@openjdk
Copy link

openjdk bot commented May 9, 2022

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

  • 97a9835: 8274517: java/util/DoubleStreamSums/CompensatedSums.java fails with expected [true] but found [false]
  • 034f20f: 8212136: Remove finalizer implementation in SSLSocketImpl
  • 36e4df9: 8285516: clearPassword should be called in a finally try block
  • b849efd: 8285923: [REDO] JDK-8285802 AArch64: Consistently handle offsets in MacroAssembler as 64-bit quantities
  • f143386: 8286293: Tests ShortResponseBody and ShortResponseBodyWithRetry should use less resources
  • 64b05cc: 8286346: 3-parameter version of AllocateHeap should not ignore AllocFailType
  • 4f5d73f: 8286294: ForkJoinPool.commonPool().close() spins
  • d4474b5: 8285794: AsyncGetCallTrace might acquire a lock via JavaThread::thread_from_jni_environment
  • 39f4434: 8286312: Stop mixing signed and unsigned types in bit operations
  • b490a58: 8283899: Revert 8284190 after fix of 8281297
  • ... and 1 more: https://git.openjdk.java.net/jdk/compare/cdd1b0da14837f4bf65a3450ab671ccc18c497f6...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented May 9, 2022

@kimbarrett Pushed as commit fe6e0c0.

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

@kimbarrett kimbarrett deleted the no-stricmp branch May 9, 2022 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

None yet

2 participants