jakartaee / jakartaee/faces

ResourceWrapper should implement Externalizable to enable wrapper extensions to retain resource wrapper instance hierarchy

Open
#1,144 5 comments 0 reactions 0 assignees View on GitHub
Component: Resources Priority: Minor Type: Improvement
Dominant language
Java
Stars
127
Forks
59
Avg merge
23h
Merged PRs (30d)
7

Description

Currently ResourceWrapper has no way to handle being Serialized/Externalized by JSF State management, as it neither implements Serializable or Externalizable.

Implementation of Externalizable resides on ResourceImpl only.

This situation presents a problem when extending ResourceWrapper, as for the state management to work as expected the new class that extends ResourceWrapper needs to implement Externalizable.

In theory that seems fine, but then in readExternal() whatever class hierarchy was present through, possibly several, ResourceWrapper instances is not able to be re built (without writing code to save it all in writeExternal()).

This is a problem as losing all those classes in the hierarchy will have adverse affects to calls such as getRequestPath() or any methods that those classes may have customized.
#### Affected Versions
[2.0, 2.1, 2.2 Sprint 13]

Contributor guide

Open the contributing guide

Research direction

Start by reading ResourceWrapper and ResourceImpl, focusing on their Externalizable and JSF state-management behavior. Reproduce serialization of a ResourceWrapper subclass hierarchy and verify that wrapper classes and customized methods such as getRequestPath() remain available after restoration.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.