When we designed the RenderingContext functionality to add "arbitrary" objects to RenderingContext
(like a Request) in a recent minor release, we tried start making RenderingContext immutable and added
the implementation using a "with'er".
This is in general a good idea: RenderinContext
should be immutable.
It is however problematic to do this with this
single property: It leads to too many and
partially breaking changes when consumers try
to use this.
As such, the patch rolls back to a setAttribute()
approach. With the default implementation being
done in the Fluid delivered RenderingContext,
this change is currently not considered breaking
since no (known) consumer actually uses it.
To make RenderingContext immutable, we need a new
approach, maybe re-starting with a new class that
does it. This is a topic for a different major
version, though.
When we designed the RenderingContext functionality to add "arbitrary" objects to RenderingContext (like a Request) in a recent minor release, we tried start making RenderingContext immutable and added the implementation using a "with'er".
This is in general a good idea: RenderinContext should be immutable.
It is however problematic to do this with this single property: It leads to too many and partially breaking changes when consumers try to use this.
As such, the patch rolls back to a setAttribute() approach. With the default implementation being done in the Fluid delivered RenderingContext, this change is currently not considered breaking since no (known) consumer actually uses it.
To make RenderingContext immutable, we need a new approach, maybe re-starting with a new class that does it. This is a topic for a different major version, though.