Skip to content

Commit

Permalink
Merge pull request #8693 from soul2zimate/WFLY-6223
Browse files Browse the repository at this point in the history
[WFLY-6223] compare with resolved current value.
  • Loading branch information
bstansberry authored Jun 10, 2016
2 parents 8b9bcfb + 54a6802 commit c8f8ba4
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected boolean applyUpdateToRuntime(OperationContext context, ModelNode opera

//if the server is booting or the required value is the current one,
//we do not need to do anything and reload is not required
if (isSameValue(resolvedValue, currentValue, attributeName) || context.isBooting()) {
if (isSameValue(context, resolvedValue, currentValue, attributeName) || context.isBooting()) {
return false;
}

Expand All @@ -67,8 +67,9 @@ protected boolean applyUpdateToRuntime(OperationContext context, ModelNode opera
return !done; //reload required if runtime has not been updated
}

private boolean isSameValue(ModelNode resolvedValue, ModelNode currentValue, String attributeName) {
if (resolvedValue.equals(currentValue)) {
private boolean isSameValue(OperationContext context, ModelNode resolvedValue, ModelNode currentValue, String attributeName)
throws OperationFailedException {
if (resolvedValue.equals(getAttributeDefinition(attributeName).resolveValue(context, currentValue))) {
return true;
}
if (!currentValue.isDefined()) {
Expand Down

0 comments on commit c8f8ba4

Please sign in to comment.