Menu

#320 AllHttpScopesHashModel should user set/getObjectWrapper

closed-fixed
5
2011-05-17
2010-07-22
Anonymous
No

I encountered a problem when using FreeMarker as a view component for Spring MVC. Defining custom and properly configuring ObjectWrapper didn't work, all calls were still delegated to the default object wrapper. After analyzing both the code for Spring's FreeMarker integration and FreeMarker itself, I'm sure that this problem is caused by a bug in FreeMarker's AllHttpScopesHashModel.

The class AllHttpScopesHashModel should not contain a private field 'wrapper' containing the ObjectWrapper passed in the constructor. Instead, it should call 'setObjectWrapper(wrapper)' in the constructor and then all calls to 'wrapper.wrap(...)' should be replaced by 'getObjectWrapper().wrap(...)'. This will surely fix the whole problem.

(This bug is the same as 2938070, but I couldn't add a comment to it - I got strange error message about Group not set.)

Discussion

  • Attila Szegedi

    Attila Szegedi - 2011-05-06

    Fixed for 2.3.17

     
  • Attila Szegedi

    Attila Szegedi - 2011-05-06
    • status: open --> open-fixed
     
  • Attila Szegedi

    Attila Szegedi - 2011-05-06
    • assigned_to: nobody --> szegedia
     
  • Dániel Dékány

    • status: open-fixed --> closed-fixed
     
  • Dániel Dékány

    Fixed in 2.3.17.

     

Log in to post a comment.

MongoDB Logo MongoDB