RFR: 8374341: Fix whitespace split in CoreUtils.getCoreFileLocation

eunbin son duke at openjdk.org
Wed Dec 24 23:47:12 UTC 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

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

Commit messages:
 - 8374341: Fix whitespace split in CoreUtils.getCoreFileLocation

Changes: https://git.openjdk.org/jdk/pull/28984/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28984&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8374341
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 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