Fixed NPE in case of passing null refs to "c:set" tag#16
Fixed NPE in case of passing null refs to "c:set" tag#16davidecavestro wants to merge 1 commit intofreemarker:2.3-gaefrom
Conversation
|
I can't merge without Contributor License Agreement (I will send it if you are interested), but no problem, I take it as bug report and fix it myself. As of bug #204, that's a different issue with |
|
No problem, let's keep things simple and go for fixing it yourself. where the wrapper simply delegates every call to an internal instance of So - to make a long story short - I'd like to hear from you if there's a better way to solve the problem originally signaled at bug #204 (other than the workaround I put in place). |
|
I don't even know it there's a real solution for all this... and I have to add that I'm not the author of the JSP support (or the original author of anything), nor I do know much about JSP internals. The problem is, as fas as I see, that if both FTL-s and real JSP-s are working in the same application, then one of them will end up using the Despite of this, a lot of serious users rely on the JSP support (Liferay and such). I guess the secret is not using JSTL tags in FTL, and in fact you aren't supposed to use them in FTL (kills the point of using FTL pretty much). (Of course, other custom taglibs could depend on the same EL-related features too, but apparently they don't do it, or not often.) Why do you need to use them? Could that need be solved otherwise maybe? |
|
In this particular case FreeMarker templates ran within some some jBPM processes to provide dynamically generated HTML on the top of contents from pre-existing JSPs. |
|
Maybe replacing the JSTL tags with FreeMarker equivalents will be the cheapest and also the most stable solution... Of course I don't know how much template this is, and if uses something that has no FTL equivalent. |
This should fix issues arising after an upgrade to JSP 2.1 (and above, I guess).
i.e. there's an issue filed at https://sourceforge.net/p/freemarker/bugs/204/
The problem lies on the fact that
SetSupportrelies onjavax.el.VariableMapper.setVariable(String, ValueExpression)supportingnullrefs on the last parameter. So atorg.apache.taglibs.standard.tag.common.core.SetSupport.doEndTag()it does things likewhile the original implementation doesn't provide null handling