From d3aed2499c582c461676cece1a9f845fde77fe1b Mon Sep 17 00:00:00 2001 From: Arjan Tijms Date: Tue, 15 Nov 2022 21:38:55 +0100 Subject: [PATCH] Remove deprecated bindings field Signed-off-by: Arjan Tijms --- .../jakarta/faces/component/UIComponent.java | 8 +---- .../faces/component/UIComponentBase.java | 33 +------------------ 2 files changed, 2 insertions(+), 39 deletions(-) diff --git a/impl/src/main/java/jakarta/faces/component/UIComponent.java b/impl/src/main/java/jakarta/faces/component/UIComponent.java index 38f764f570..73ca46a156 100644 --- a/impl/src/main/java/jakarta/faces/component/UIComponent.java +++ b/impl/src/main/java/jakarta/faces/component/UIComponent.java @@ -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 @@ -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 bindings = null; - } diff --git a/impl/src/main/java/jakarta/faces/component/UIComponentBase.java b/impl/src/main/java/jakarta/faces/component/UIComponentBase.java index f40d8d8116..8ccbfee967 100644 --- a/impl/src/main/java/jakarta/faces/component/UIComponentBase.java +++ b/impl/src/main/java/jakarta/faces/component/UIComponentBase.java @@ -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 @@ -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); @@ -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); } @@ -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]); } @@ -1445,26 +1434,6 @@ private static Map 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) {