Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
[BZ 1180324] Display the correct org.rhq.discoveryDelay value in the …
Browse files Browse the repository at this point in the history
…UI on the first deployment

(cherry picked from commit c3e31d5)
Signed-off-by: Libor Zoubek <lzoubek@redhat.com>
  • Loading branch information
Michael Burman authored and Libor Zoubek committed Jan 27, 2015
1 parent c6b6cbe commit 087592d
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -142,17 +142,19 @@ private String getDiscoveryDelayConfigurationValue() {
// If user wanted to override the value in recipe, allow it
Property discoveryDelayProperty = wizard.getNewDeploymentConfig().get("org.rhq.discoveryDelay");

if(discoveryDelayProperty == null) {
if (discoveryDelayProperty == null) {
// If there was no recipe value, assume the current value is the default one and check live-deployment
BundleDeployment liveDeployment = wizard.getLiveDeployment();

// If previous deployment had modified deploymentDelay, use it
if(liveDeployment != null) {
if (liveDeployment != null) {
Integer previousDeploymentDelay = liveDeployment.getDiscoveryDelay();
if(previousDeploymentDelay != null) {
if (previousDeploymentDelay != null) {
rValue = previousDeploymentDelay;
}
}
} else {
rValue = ((PropertySimple) discoveryDelayProperty).getIntegerValue();
}

wizard.getNewDeploymentConfig().setSimpleValue("org.rhq.discoveryDelay", rValue.toString());
Expand Down

0 comments on commit 087592d

Please sign in to comment.