Skip to content

Conversation

@thswlsqls
Copy link
Contributor

@thswlsqls thswlsqls commented Dec 24, 2025

Summary

Fix incorrect regex usage in CoreUtils.getCoreFileLocation.

Description

CoreUtils.getCoreFileLocation uses String.split("\s", 2).
The string literal "\s" represents a backspace character, not a whitespace regex.
As a result, the split operation does not separate fields on whitespace.
This change replaces the pattern with "\\s+" to correctly split on whitespace.
No other logic is modified.

Bug ID : JDK-8374341

https://bugs.java.com/bugdatabase/view_bug?bug_id=8374341


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

Issue

  • JDK-8374341: Use of "\s" instead of "\s" in CoreUtils.java results in splitting on backspace instead of whitespace (Bug - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28984

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 24, 2025

👋 Welcome back thswlsqls! 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 Dec 24, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk
Copy link

openjdk bot commented Dec 24, 2025

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

  • serviceability

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 rfr Pull request is ready for review label Dec 24, 2025
@mlbridge
Copy link

mlbridge bot commented Dec 24, 2025

Webrevs

@thswlsqls thswlsqls changed the title 8374341: Fix whitespace split in CoreUtils.getCoreFileLocation 8374341: Use of "\s" instead of "\\s" in CoreUtils.java results in splitting on backspace instead of whitespace Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rfr Pull request is ready for review serviceability [email protected]

Development

Successfully merging this pull request may close these issues.

1 participant