https://issues.apache.org/bugzilla/show_bug.cgi?id=49548

           Summary: Refactoring SetSupport
           Product: Taglibs
           Version: 1.2.0
          Platform: PC
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Standard Taglib
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: jboy...@apache.org


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.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to