RFR: 8375477: CoreUtils support for SA tests should attempt to locate and unzip core files when they have been zipped [v2]

Kevin Walls kevinw at openjdk.org
Tue Jan 27 17:11:15 UTC 2026


On Tue, 27 Jan 2026 16:59:34 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> test/lib/jdk/test/lib/util/CoreUtils.java line 237:
>> 
>>> 235:              * into this path.
>>> 236:              */
>>> 237:             Matcher m = Pattern.compile(ALT_LOCATION_STRING + ".* ([^ ]+[^\\)])\\)?").matcher(stringWithLocation);
>> 
>> Trying to understand the regex. 8-)
>> os::get_core_path printed " (alternatively, falling back to %s/core.%d)"
>> 
>> Do we need the initial .* in the regex?
>> Would it be " ([^ ]+)\)" or " (.*)\)"
>> 
>> Maybe there's some complication and the other [^\)])\)? is needed?  Thanks
>
> TBH I didn't look into this pattern much because it was so ugly, but was working. I focused on just the start of the pattern, which is where the text that changed was.

Oh I thought it was a change, due to the way the diff was on screen, but it's the same old ugly pattern.
Suspect .* is matching nothing if the capture group actually finding the core file.  If it's not part of the change it shouldn't hold this up... 8-)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29284#discussion_r2733013556


More information about the serviceability-dev mailing list