SlingPropertyValueHelper.setPropertyAsIs() handles impossible empty-value-list 
case
-----------------------------------------------------------------------------------

                 Key: SLING-538
                 URL: https://issues.apache.org/jira/browse/SLING-538
             Project: Sling
          Issue Type: Bug
          Components: Servlets Post
            Reporter: Alexander Klimetschek
            Priority: Minor


The list of values of the request property can never have the length of null - 
RequestProperty.getStringValues() ensures this, and it also does not make any 
sense with form posts, since a request parameter must always have at least one 
value, otherwise it would simply not exist in the request. So this code is 
superfluous (also for single-value property handling):

        } else if (values.length == 0) {
            // do not create new prop here, but clear existing
            if (parent.hasProperty(prop.getName())) {
                response.onModified(
                    parent.setProperty(prop.getName(), "").getPath()
                );
            }


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to