From 40b84416b154196c4525b21c58bcb380cad00420 Mon Sep 17 00:00:00 2001 From: Santos Zatarain Date: Fri, 12 May 2023 15:42:44 -0600 Subject: [PATCH] View maps entries are not restored in "finally" block of method "ViewMetadataImpl.createMetadataView" --- .../java/com/sun/faces/application/view/ViewMetadataImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/impl/src/main/java/com/sun/faces/application/view/ViewMetadataImpl.java b/impl/src/main/java/com/sun/faces/application/view/ViewMetadataImpl.java index 4ef0c5b32d..999d513360 100644 --- a/impl/src/main/java/com/sun/faces/application/view/ViewMetadataImpl.java +++ b/impl/src/main/java/com/sun/faces/application/view/ViewMetadataImpl.java @@ -97,8 +97,9 @@ public UIViewRoot createMetadataView(FacesContext context) { Map currentViewMap = currentViewRoot.getViewMap(false); if (!isEmpty(currentViewMap)) { + currentViewMapShallowCopy = new HashMap<>(currentViewMap); metadataView.getViewMap(true) - .putAll(new HashMap<>(currentViewMap)); + .putAll(currentViewMapShallowCopy); } }