RFR: 8374341: Use of "\s" instead of "\\s" in CoreUtils.java results in splitting on backspace instead of whitespace [v4]

Eunbin Son duke at openjdk.org
Wed Jan 7 12:48:29 UTC 2026


> ### 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

Eunbin Son has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:

  JDK-8374341: Remove unverified systemd-coredump handling code

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/28984/files
  - new: https://git.openjdk.org/jdk/pull/28984/files/cc6e5f6b..e0d36e8a

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=28984&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28984&range=02-03

  Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/28984.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28984/head:pull/28984

PR: https://git.openjdk.org/jdk/pull/28984


More information about the serviceability-dev mailing list