[jira] [Comment Edited] (SLING-2534) Strings of zero length on update in post servlet delete the property

2012-07-17 Thread Endolf (JIRA)

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

Endolf edited comment on SLING-2534 at 7/17/12 3:22 PM:


That parameter would be problematic as this is only valid for strings, all 
other types cannot have no value. I appreciate the backwards compatibility 
issue with the patch.

  was (Author: endolf):
That parameter would be problematic as this is only valid for strings, all 
other types cannot have no value.
  
> Strings of zero length on update in post servlet delete the property
> 
>
> Key: SLING-2534
> URL: https://issues.apache.org/jira/browse/SLING-2534
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Affects Versions: Servlets Post 2.1.2
>Reporter: Endolf
> Attachments: blankstrings.patch
>
>
> According to JCR specs, for string type properties, a blank string should be 
> a valid value. Currently the post servlet delets any property where 1 or less 
> values are specifed and the 1 value has a 0 length. I think string properties 
> with a zero length should be blanked instead of deleted.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Comment Edited] (SLING-2534) Strings of zero length on update in post servlet delete the property

2012-07-17 Thread Justin Edelson (JIRA)

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

Justin Edelson edited comment on SLING-2534 at 7/17/12 5:34 PM:


bq. That parameter would be problematic as this is only valid for strings, all 
other types cannot have no value. I appreciate the backwards compatibility 
issue with the patch. 

How is this problematic? The parameter would just be ignored for non-string 
properties?

bq. One solution would be to add a configuration switch to the post servlet 
where the current default behaviour can be changed to treat empty strings as 
empty strings. However, this would be a global switch. Or we could add a 
special request parameter like :deleteEmptyStringIfBlank=false which you could 
use on your requests? 

IMHO, applying this on the global or even request level is too coarse-grained.

  was (Author: justinedelson):
bq. That parameter would be problematic as this is only valid for strings, 
all other types cannot have no value. I appreciate the backwards compatibility 
issue with the patch. 

How is this problematic? The parameter would just be ignored for non-string 
properties?

bq. One solution would be to add a configuration switch to the post servlet 
where the current default behaviour can be changed to treat empty strings as 
empty strings. However, this would be a global switch. Or we could add a 
special request parameter like :deleteEmptyStringIfBlank=false which you could 
use on your requests? 

IMHO, applying this on the global or even request level is too course-grained.
  
> Strings of zero length on update in post servlet delete the property
> 
>
> Key: SLING-2534
> URL: https://issues.apache.org/jira/browse/SLING-2534
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Affects Versions: Servlets Post 2.1.2
>Reporter: Endolf
> Attachments: blankstrings.patch
>
>
> According to JCR specs, for string type properties, a blank string should be 
> a valid value. Currently the post servlet delets any property where 1 or less 
> values are specifed and the 1 value has a 0 length. I think string properties 
> with a zero length should be blanked instead of deleted.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Comment Edited] (SLING-2534) Strings of zero length on update in post servlet delete the property

2012-07-17 Thread Justin Edelson (JIRA)

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

Justin Edelson edited comment on SLING-2534 at 7/17/12 5:35 PM:


bq. That parameter would be problematic as this is only valid for strings, all 
other types cannot have no value. I appreciate the backwards compatibility 
issue with the patch. 

How is this problematic? The parameter would just be ignored for non-string 
properties?

bq. One solution would be to add a configuration switch to the post servlet 
where the current default behaviour can be changed to treat empty strings as 
empty strings. However, this would be a global switch. Or we could add a 
special request parameter like :deleteEmptyStringIfBlank=false which you could 
use on your requests? 

IMHO, applying this on the global or even request level is too coarse-grained 
and would end up breaking application components which depend upon the current 
behavior.

  was (Author: justinedelson):
bq. That parameter would be problematic as this is only valid for strings, 
all other types cannot have no value. I appreciate the backwards compatibility 
issue with the patch. 

How is this problematic? The parameter would just be ignored for non-string 
properties?

bq. One solution would be to add a configuration switch to the post servlet 
where the current default behaviour can be changed to treat empty strings as 
empty strings. However, this would be a global switch. Or we could add a 
special request parameter like :deleteEmptyStringIfBlank=false which you could 
use on your requests? 

IMHO, applying this on the global or even request level is too coarse-grained.
  
> Strings of zero length on update in post servlet delete the property
> 
>
> Key: SLING-2534
> URL: https://issues.apache.org/jira/browse/SLING-2534
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Affects Versions: Servlets Post 2.1.2
>Reporter: Endolf
> Attachments: blankstrings.patch
>
>
> According to JCR specs, for string type properties, a blank string should be 
> a valid value. Currently the post servlet delets any property where 1 or less 
> values are specifed and the 1 value has a 0 length. I think string properties 
> with a zero length should be blanked instead of deleted.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Comment Edited] (SLING-2534) Strings of zero length on update in post servlet delete the property

2012-07-17 Thread Endolf (JIRA)

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

Endolf edited comment on SLING-2534 at 7/17/12 5:39 PM:


Just have the global parameter as defaulted to the existing behaviour.

  was (Author: endolf):
Just have the parameter as defaulted to the existing behaviour?.
  
> Strings of zero length on update in post servlet delete the property
> 
>
> Key: SLING-2534
> URL: https://issues.apache.org/jira/browse/SLING-2534
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Affects Versions: Servlets Post 2.1.2
>Reporter: Endolf
> Attachments: blankstrings.patch
>
>
> According to JCR specs, for string type properties, a blank string should be 
> a valid value. Currently the post servlet delets any property where 1 or less 
> values are specifed and the 1 value has a 0 length. I think string properties 
> with a zero length should be blanked instead of deleted.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira