8330702: Update failure handler to don't generate Error message if cores actions are empty

Reviewed-by: sspitsyn
This commit is contained in:
Leonid Mesnik 2024-06-14 15:32:04 +00:00
parent dae0bda9d0
commit 548e95a689
2 changed files with 9 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -104,8 +104,11 @@ public class ActionSet implements ProcessInfoGatherer, EnvironmentInfoGatherer,
private String[] getTools(PrintWriter writer, Properties p, String key) {
String value = p.getProperty(key);
if (value == null || value.isEmpty()) {
writer.printf("ERROR: '%s' property is empty%n", key);
if (value == null) {
writer.printf("ERROR: '%s' property is not set%n", key);
return new String[]{};
}
if (value.isEmpty()) {
return new String[]{};
}
return value.split(" ");

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -59,6 +59,8 @@ native.stack.params.repeat=6
native.core.app=cdb
native.core.args=-c ".dump /mA core.%p;qd" -p %p
native.core.params.timeout=600000
cores=
################################################################################
# environment info to gather
################################################################################