This started with "add some more test cases for the setting code" and got more momentum. Patch primarily adds test cases and refactors the large "if" clause that sets the result into smaller methods. It also clears up IDE warnings (at least from IDEA). One side effect was I18N of the exception message for "SET_BAD_DEFERRED_SCOPE" This also required changing the POM so that the resources were included (that perhaps could have been a separate patch). We could also move the resource bundles to Maven's default of src/main/resources. I18N also needed access to the original value (which was not being retained) and in conjunction with that I replaced the "scopeSpecified" indicator with a check on whether the "scope" attribute is null. I also changed the comment where the exception is thrown when target is null. This can happen as target is a request-time attribute and the spec does define this behaviour. When setting a bean property, the for loop now exits after setting its property rather than continuing to iterate through all of them. This should have no impact unless a bean can have two PropertyDescriptors with the same name and I don't believe it can. Finally, all throws of JspException were replaced with JspTagException as these are errors coming from a Tag Handler rather than the JSP Engine itself.
Created attachment 25694 [details] Refactors SetSupport
pom.xml changes applied (r960812).
SetSupport and .properties changes also committed (r960817). On the tests - what are Syntax1 and Syntax3?
(In reply to comment #3) > On the tests - what are Syntax1 and Syntax3? They are references to the "Syntax" section in the spec. Syntax one is where a variable is set from the value attribute, syntax 3 is where a property on some target option is set. The description in the spec refers to them like that, which I will confess assumes you're looking at the spec doc :-)
Makes sense. I think it's a fair bit of tribal knowledge to have to pick up and I like the methodical spec based approach it leads to. svn ci -m "Adding more tests for SetSupport from Jeremy Boynes' patch to #49548. The Syntax1/Syntax3 notations refers to the specification. " Sending impl/src/test/java/org/apache/taglibs/standard/tag/common/core/TestSetSupport.java Transmitting file data . Committed revision 961058.