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

fix: do not warn for unset disabled property change (#13509) (CP: 2.8) #13515

Merged
merged 1 commit into from
Apr 13, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.util.List;
import java.util.Optional;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.vaadin.flow.component.Component;
Expand Down Expand Up @@ -112,10 +113,20 @@ protected Optional<Runnable> handleNode(StateNode node,
return enqueuePropertyUpdate(node, invocationJson, feature,
property);
} else {
LoggerFactory.getLogger(MapSyncRpcHandler.class)
.warn("Property update request for disabled element is received from the client side. "
+ "The property is '{}'. Request is ignored.",
property);
final Logger logger = LoggerFactory
.getLogger(MapSyncRpcHandler.class);
if (node.getFeatureIfInitialized(ElementPropertyMap.class)
.map(feat -> feat.getProperty(property))
.orElse(null) != null) {
logger.warn(
"Property update request for disabled element is received from the client side. "
+ "The property is '{}'. Request is ignored.",
property);
} else {
logger.debug(
"Ignored property '{}' change for disabled element. Most likely client sent the default value as no value has been set for the property.",
property);
}
}
return Optional.empty();
}
Expand Down