[ https://issues.apache.org/jira/browse/SLING-7553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Munteanu closed SLING-7553. ---------------------------------- > Sling POST servlet - expand Patch method integration tests. > ----------------------------------------------------------- > > Key: SLING-7553 > URL: https://issues.apache.org/jira/browse/SLING-7553 > Project: Sling > Issue Type: Test > Components: Servlets > Affects Versions: Launchpad Integration Tests 1.0.6 > Reporter: John Logan > Assignee: Robert Munteanu > Priority: Minor > Fix For: Launchpad Integration Tests 1.0.8 > > Attachments: > sling-org-apache-sling-launchpad-integration-tests.patch.gz > > > Per the discussion at: > [https://lists.apache.org/thread.html/a57cec24f459fa0972c93ef4a2759755435a77d6a9c590e7a23440d4@%3Cusers.sling.apache.org%3E] > I was trying to include an empty string[] property in nodes created with the > POST servlet to avoid errors when adapting the nodes to Sling models, and > found that the Patch method supported this by adding and removing a property > on a newly created node in the same operation. > > At present this behavior is undocumented. If we wish to clarify the > behavior, it seems that there are two possibilities: > * Document the current behavior (it appears that Patch operations are > applied in sequence). For this case, I have attached a patch to the > integration tests that tests adding and removing a property for a new node, > as well as removing and adding a property. > * Update the documentation to state that the behavior for adding and > removing in the same operation is unspecified and therefore should not be > relied upon. > I have no preference, as I've since switched to the more natural approach of > using a default value attribute on the model classes to solve my original > problem. -- This message was sent by Atlassian JIRA (v7.6.3#76005)