Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WFLY-6223] compare with resolved current value. #8693

Merged
merged 1 commit into from
Jun 10, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[WFLY-6223] compare with resolved current value.
  • Loading branch information
soul2zimate committed Feb 16, 2016
commit 54a6802ed2a02f5a69a9bf4808dc0261dfa6fa21
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