[MAGNOLIA-5985] Instantiation of inner classes FilteredInheritancePredicate and InheritancePredicate in ConfiguredInheritance fails Created: 13/Nov/14  Updated: 09/Dec/14  Resolved: 05/Dec/14

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 5.3.5
Fix Version/s: 5.3.6

Type: Bug Priority: Neutral
Reporter: Evzen Fochr Assignee: Christoph Meier
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
caused by MAGNOLIA-4516 TemplatingFunctions.inherit() limits ... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

To reproduce:

  • install shop
  • free marker error on shop home page
     
    Proxy class cannot extend info.magnolia.rendering.template.configured.ConfiguredInheritance$FilteredInheritancePredicate, because it has no visible "default" constructor.
    
  • Be careful - you need to solve problem with non static nodeTypes!
  1. Deprecate functions introduced by MAGNOLIA-4516.
  2. Inheritance could be ideally configured under /modules/rendering/renderers/freemarker/contextAttributes/cmsfn instead of per call of TemplatingFunctions (not straightforward)


 Comments   
Comment by Christoph Meier [ 05/Dec/14 ]

The recommendation to change the signature of the inner classes to puclic static (from protected) is not feasible because they use non static ConfiguredInheritance#nodeTypes.
Instead i moved the inner classes FilteredInheritancePredicate and InheritancePredicate to own class files; this way instantiation works.

Comment by Christoph Meier [ 05/Dec/14 ]

Fix has been committed onto branch "MAGNOLIA-5985_5.3.x".
Since Instantiation works now, i have not yet added a possibility to make it configurable. If this would be required, i propose to create a follow-up-ticket for the configurability.

Generated at Mon Feb 12 04:10:14 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.