You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2011/09/26 18:25:26 UTC

[jira] [Created] (JCR-3083) Degrade gracefully when reading invalid date values

Degrade gracefully when reading invalid date values
---------------------------------------------------

                 Key: JCR-3083
                 URL: https://issues.apache.org/jira/browse/JCR-3083
             Project: Jackrabbit Content Repository
          Issue Type: Bug
            Reporter: Jukka Zitting
            Priority: Minor


As noted in JCR-1996, it is possible for an old version of Jackrabbit to store date invalid date values in the repository. Currently such values cause exceptions when the repository attempts to read them. A better approach would be to automatically detect such dates and map them instead to string values to avoid losing any information. A client could then access the information as a string through the normal JCR API, and would only get a ValueFormatException when trying to read the value as a date, i.e. using the getDate() method.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3083) Degrade gracefully when reading invalid date values

Posted by "Jukka Zitting (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated JCR-3083:
-------------------------------

    Fix Version/s:     (was: 2.3.0)
                   2.2.9

Merged to the 2.2 branch in revision 1176484.
                
> Degrade gracefully when reading invalid date values
> ---------------------------------------------------
>
>                 Key: JCR-3083
>                 URL: https://issues.apache.org/jira/browse/JCR-3083
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>            Reporter: Jukka Zitting
>            Priority: Minor
>             Fix For: 2.2.9
>
>         Attachments: JCR-3083.patch
>
>
> As noted in JCR-1996, it is possible for an old version of Jackrabbit to store date invalid date values in the repository. Currently such values cause exceptions when the repository attempts to read them. A better approach would be to automatically detect such dates and map them instead to string values to avoid losing any information. A client could then access the information as a string through the normal JCR API, and would only get a ValueFormatException when trying to read the value as a date, i.e. using the getDate() method.

--
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] [Resolved] (JCR-3083) Degrade gracefully when reading invalid date values

Posted by "Alex Parvulescu (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Parvulescu resolved JCR-3083.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3.0
    
> Degrade gracefully when reading invalid date values
> ---------------------------------------------------
>
>                 Key: JCR-3083
>                 URL: https://issues.apache.org/jira/browse/JCR-3083
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>            Reporter: Jukka Zitting
>            Priority: Minor
>             Fix For: 2.3.0
>
>         Attachments: JCR-3083.patch
>
>
> As noted in JCR-1996, it is possible for an old version of Jackrabbit to store date invalid date values in the repository. Currently such values cause exceptions when the repository attempts to read them. A better approach would be to automatically detect such dates and map them instead to string values to avoid losing any information. A client could then access the information as a string through the normal JCR API, and would only get a ValueFormatException when trying to read the value as a date, i.e. using the getDate() method.

--
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] [Commented] (JCR-3083) Degrade gracefully when reading invalid date values

Posted by "Alex Parvulescu (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13115558#comment-13115558 ] 

Alex Parvulescu commented on JCR-3083:
--------------------------------------

fixed in revision #1176423
                
> Degrade gracefully when reading invalid date values
> ---------------------------------------------------
>
>                 Key: JCR-3083
>                 URL: https://issues.apache.org/jira/browse/JCR-3083
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>            Reporter: Jukka Zitting
>            Priority: Minor
>             Fix For: 2.3.0
>
>         Attachments: JCR-3083.patch
>
>
> As noted in JCR-1996, it is possible for an old version of Jackrabbit to store date invalid date values in the repository. Currently such values cause exceptions when the repository attempts to read them. A better approach would be to automatically detect such dates and map them instead to string values to avoid losing any information. A client could then access the information as a string through the normal JCR API, and would only get a ValueFormatException when trying to read the value as a date, i.e. using the getDate() method.

--
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] [Updated] (JCR-3083) Degrade gracefully when reading invalid date values

Posted by "Alex Parvulescu (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Parvulescu updated JCR-3083:
---------------------------------

    Attachment: JCR-3083.patch

Patch that will allow read operations on bundles that have corrupted 'date' properties.

The value will be read as string when trying to read it as a date fails. The type of the value is still 'date', so any clients trying to access the value will still get an error.

This helps with repository level operations that need to be able to read bundles without actually using the values.

So just having old invalid 'date' properties in the repository will not interfere with operations any more.
Dealing with the errors that come from reading those specific dates is still to be handled by the client.
                
> Degrade gracefully when reading invalid date values
> ---------------------------------------------------
>
>                 Key: JCR-3083
>                 URL: https://issues.apache.org/jira/browse/JCR-3083
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>            Reporter: Jukka Zitting
>            Priority: Minor
>         Attachments: JCR-3083.patch
>
>
> As noted in JCR-1996, it is possible for an old version of Jackrabbit to store date invalid date values in the repository. Currently such values cause exceptions when the repository attempts to read them. A better approach would be to automatically detect such dates and map them instead to string values to avoid losing any information. A client could then access the information as a string through the normal JCR API, and would only get a ValueFormatException when trying to read the value as a date, i.e. using the getDate() method.

--
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] [Commented] (JCR-3083) Degrade gracefully when reading invalid date values

Posted by "Jukka Zitting (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13115551#comment-13115551 ] 

Jukka Zitting commented on JCR-3083:
------------------------------------

+1 The extra complexity around InternalValue, is justified by the fact that this way we can still keep the value type as date instead of string like I originally proposed.
                
> Degrade gracefully when reading invalid date values
> ---------------------------------------------------
>
>                 Key: JCR-3083
>                 URL: https://issues.apache.org/jira/browse/JCR-3083
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>            Reporter: Jukka Zitting
>            Priority: Minor
>         Attachments: JCR-3083.patch
>
>
> As noted in JCR-1996, it is possible for an old version of Jackrabbit to store date invalid date values in the repository. Currently such values cause exceptions when the repository attempts to read them. A better approach would be to automatically detect such dates and map them instead to string values to avoid losing any information. A client could then access the information as a string through the normal JCR API, and would only get a ValueFormatException when trying to read the value as a date, i.e. using the getDate() method.

--
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