Skip to content

Backport MYFACES-4770 to 4.0.x - #1114

Merged
tandraschko merged 1 commit into
apache:4.0.xfrom
jungm:MYFACES-4770-4.0.x
Oct 12, 2026
Merged

tandraschko merged 1 commit into
apache:4.0.xfrom
jungm:MYFACES-4770-4.0.x

Conversation

@jungm

@jungm jungm commented Oct 12, 2026

Copy link
Copy Markdown
Member

https://issues.apache.org/jira/browse/MYFACES-4770

Backport of #1112 to 4.0.x.

Summary

Same change as on main: ViewScopeCDIMap.put() returns the previous value instead of the internal ContextualInstanceInfo wrapper.

-return getCreationalContextInstances().put(beanKey, info);
+ContextualInstanceInfo previous = getCreationalContextInstances().put(beanKey, info);
+return previous == null ? null : previous.getContextualInstance();

Evidence

  • Before: ViewScopeCDIMapTest.testPutReturnsPreviousValue fails with expected: <first> but was: <...ContextualInstanceInfo@...>
    After: passes; impl 1588 tests, 0 failures, 0 errors (JDK 11, as in the 4.0.x CI)

Merge Danger

Door: two-way

Blast Radius: small

Clean cherry-pick. Only callers using the return value of getViewMap().put(...) with CDI enabled are affected.

@tandraschko
tandraschko merged commit 152bc9b into apache:4.0.x Oct 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants