[ 
https://issues.apache.org/jira/browse/SLING-8768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16960429#comment-16960429
 ] 

Eric Norman commented on SLING-8768:
------------------------------------

[~cziegeler],  [~rombert]  - It looks like reverting the code for this has 
broken one of the integration tests (see below).  Was it your intention to 
revert the SlingDefaultValuesTest back to the previous revision as well?

[ERROR] 
testDefaultBehaviour(org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingDefaultValuesTest)
  Time elapsed: 0.023 s  <<< FAILURE![ERROR] 
testDefaultBehaviour(org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingDefaultValuesTest)
  Time elapsed: 0.023 s  <<< FAILURE!junit.framework.AssertionFailedError: 
Expected '' but got 'undefined' for script='out.println("" + data.a)'' and 
data='\{"jcr:primaryType":"nt:unstructured"}' at 
org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingDefaultValuesTest.testDefaultBehaviour(SlingDefaultValuesTest.java:50)

 

> Revert SLING-2534 and let empty values remove the property
> ----------------------------------------------------------
>
>                 Key: SLING-8768
>                 URL: https://issues.apache.org/jira/browse/SLING-8768
>             Project: Sling
>          Issue Type: Improvement
>          Components: Servlets
>    Affects Versions: Servlets Post 2.3.28, Servlets Post 2.3.30, Servlets 
> Post 2.3.32, Servlets Post 2.3.34
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>            Priority: Major
>             Fix For: Servlets Post 2.3.36
>
>
> In SLING-2534 we changed the post implementation to treat a posted empty 
> value as an empty value. Before, empty values caused the property to be 
> removed.
> While the change seemed to be the logical step (we have @IgnoreBlanks and the 
> documentation explains it in this way as well), it turns out that a lot of 
> existing code expects the (wrong) behaviour that a property is removed if an 
> empty value is submitted.
> This makes it an incompatible change breaking existing customers.
> Therefore, we should revert SLING-2534 and update the documentation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to