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

Remove deprecated bindings field #5174

Merged
Merged
Show file tree
Hide file tree
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
8 changes: 1 addition & 7 deletions impl/src/main/java/jakarta/faces/component/UIComponent.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2022 Contributors to Eclipse Foundation.
* Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -2377,11 +2378,4 @@ private Resource findComponentResourceBundleLocaleMatch(FacesContext context, St
return resourceBundle != null ? result : null;
}

// The set of ValueExpressions for this component, keyed by property
// name This collection is lazily instantiated
// The set of ValueExpressions for this component, keyed by property
// name This collection is lazily instantiated
@Deprecated
protected Map<String, ValueExpression> bindings = null;

}
33 changes: 1 addition & 32 deletions impl/src/main/java/jakarta/faces/component/UIComponentBase.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2022 Contributors to Eclipse Foundation.
* Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -1140,10 +1141,6 @@ public Object saveState(FacesContext context) {
Object savedBehaviors = saveBehaviorsState(context);
Object savedBindings = null;

if (bindings != null) {
savedBindings = saveBindingsState(context);
}

Object savedHelper = null;
if (stateHelper != null) {
savedHelper = stateHelper.saveState(context);
Expand Down Expand Up @@ -1177,10 +1174,6 @@ public Object saveState(FacesContext context) {
values[1] = saveSystemEventListeners(context);
values[2] = saveBehaviorsState(context);

if (bindings != null) {
values[3] = saveBindingsState(context);
}

if (stateHelper != null) {
values[4] = stateHelper.saveState(context);
}
Expand Down Expand Up @@ -1224,10 +1217,6 @@ public void restoreState(FacesContext context, Object state) {
behaviors = restoreBehaviorsState(context, values[2]);
}

if (values[3] != null) {
bindings = restoreBindingsState(context, values[3]);
}

if (values[4] != null) {
getStateHelper().restoreState(context, values[4]);
}
Expand Down Expand Up @@ -1445,26 +1434,6 @@ private static Map<String, ValueExpression> restoreBindingsState(FacesContext co

}

private Object saveBindingsState(FacesContext context) {

if (bindings == null) {
return null;
}

Object values[] = new Object[2];
values[0] = bindings.keySet().toArray(new String[bindings.size()]);

Object[] bindingValues = bindings.values().toArray();
for (int i = 0; i < bindingValues.length; i++) {
bindingValues[i] = saveAttachedState(context, bindingValues[i]);
}

values[1] = bindingValues;

return values;

}

private Object saveSystemEventListeners(FacesContext ctx) {

if (listenersByEventClass == null) {
Expand Down