changcheng / wro4j

Automatically exported from code.google.com/p/wro4j
0 stars 0 forks source link

WroContextFilter causing the Context to create new WroConfiguration everytime #500

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.add the WroContextFilter as your entry filter

What is the expected output? What do you see instead?
All the resource processors gets injected with a default WroConfiguration.

What version of the product are you using? On what operating system?
1.4.7

Please provide any additional information below.

Line - 58 in WroContextFilter calls Context.set(..) which in turn creates a new 
WroConfiguration() and sets into the context for the InjectorBuilder.

Original issue reported on code.google.com by doncarea...@gmail.com on 31 Jul 2012 at 6:16

GoogleCodeExporter commented 9 years ago
The logic should have been like in the WroFilter 
--------------------------------------------------------------------------------
---
final WroConfiguration configAttribute = 
ServletContextAttributeHelper.create(filterConfig).getWroConfiguration();
      Context.set(Context.webContext(request, response, this.filterConfig), configAttribute != null ? configAttribute : new WroConfiguration());
--------------------------------------------------------------------------------
---

Original comment by doncarea...@gmail.com on 31 Jul 2012 at 6:24

GoogleCodeExporter commented 9 years ago

Original comment by alex.obj...@gmail.com on 31 Jul 2012 at 6:38

GoogleCodeExporter commented 9 years ago
Thanks for the hint.

Fixed in branch 1.4.x.

Original comment by alex.obj...@gmail.com on 31 Jul 2012 at 7:15