You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Stepan Koltsov (JIRA)" <ji...@apache.org> on 2010/09/15 21:41:33 UTC

[jira] Created: (JCR-2750) MultiStatusResponse should not call resource.getProperties

MultiStatusResponse should not call resource.getProperties
----------------------------------------------------------

                 Key: JCR-2750
                 URL: https://issues.apache.org/jira/browse/JCR-2750
             Project: Jackrabbit Content Repository
          Issue Type: Improvement
            Reporter: Stepan Koltsov


current constructor MultiStatusResponse() calls resource.getProperties() even if propFindType == PROPFIND_BY_PROPERTY.

This is inconvenient, because some properties are expensive to generate if they are not requested. MultiStatusResponse() constructor with parameter PROPFIND_BY_PROPERTY should do:

===
if (propFindType == PROPFIND_BY_PROPERTY) {
  for (propName : propNameSet) {
    prop = resource.getProperty(propName);
    if (prop != null)
      status200.addContent(prop);
    else
      status404.addContent(propName);
  }
} else {
  ...
}
===

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


[jira] Commented: (JCR-2750) MultiStatusResponse should not call resource.getProperties

Posted by "Stepan Koltsov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-2750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913990#action_12913990 ] 

Stepan Koltsov commented on JCR-2750:
-------------------------------------

Thank you!

> MultiStatusResponse should not call resource.getProperties
> ----------------------------------------------------------
>
>                 Key: JCR-2750
>                 URL: https://issues.apache.org/jira/browse/JCR-2750
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>            Reporter: Stepan Koltsov
>            Assignee: Jukka Zitting
>             Fix For: 2.2.0
>
>
> current constructor MultiStatusResponse() calls resource.getProperties() even if propFindType == PROPFIND_BY_PROPERTY.
> This is inconvenient, because some properties are expensive to generate if they are not requested. MultiStatusResponse() constructor with parameter PROPFIND_BY_PROPERTY should do:
> ===
> if (propFindType == PROPFIND_BY_PROPERTY) {
>   for (propName : propNameSet) {
>     prop = resource.getProperty(propName);
>     if (prop != null)
>       status200.addContent(prop);
>     else
>       status404.addContent(propName);
>   }
> } else {
>   ...
> }
> ===

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


[jira] Commented: (JCR-2750) MultiStatusResponse should not call resource.getProperties

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

angela commented on JCR-2750:
-----------------------------

this issue was a duplicate of  JCR-397 (will be resolved as duplicate).

Note however: the fix will not prevent the expensive properties to be calculated due to the current implementation
of DavResource#getProperty as i stated in JCR-397:
   "Note: The current implementation(s) of the DavResource build the complete property set even
    if only a single property is accessed. This should be reviewed as well."

> MultiStatusResponse should not call resource.getProperties
> ----------------------------------------------------------
>
>                 Key: JCR-2750
>                 URL: https://issues.apache.org/jira/browse/JCR-2750
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: jackrabbit-webdav
>            Reporter: Stepan Koltsov
>            Assignee: Jukka Zitting
>             Fix For: 2.2.0
>
>
> current constructor MultiStatusResponse() calls resource.getProperties() even if propFindType == PROPFIND_BY_PROPERTY.
> This is inconvenient, because some properties are expensive to generate if they are not requested. MultiStatusResponse() constructor with parameter PROPFIND_BY_PROPERTY should do:
> ===
> if (propFindType == PROPFIND_BY_PROPERTY) {
>   for (propName : propNameSet) {
>     prop = resource.getProperty(propName);
>     if (prop != null)
>       status200.addContent(prop);
>     else
>       status404.addContent(propName);
>   }
> } else {
>   ...
> }
> ===

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


[jira] Resolved: (JCR-2750) MultiStatusResponse should not call resource.getProperties

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

Jukka Zitting resolved JCR-2750.
--------------------------------

         Assignee: Jukka Zitting
    Fix Version/s: 2.2.0
       Resolution: Fixed

Fixed in revision 1000414.

> MultiStatusResponse should not call resource.getProperties
> ----------------------------------------------------------
>
>                 Key: JCR-2750
>                 URL: https://issues.apache.org/jira/browse/JCR-2750
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>            Reporter: Stepan Koltsov
>            Assignee: Jukka Zitting
>             Fix For: 2.2.0
>
>
> current constructor MultiStatusResponse() calls resource.getProperties() even if propFindType == PROPFIND_BY_PROPERTY.
> This is inconvenient, because some properties are expensive to generate if they are not requested. MultiStatusResponse() constructor with parameter PROPFIND_BY_PROPERTY should do:
> ===
> if (propFindType == PROPFIND_BY_PROPERTY) {
>   for (propName : propNameSet) {
>     prop = resource.getProperty(propName);
>     if (prop != null)
>       status200.addContent(prop);
>     else
>       status404.addContent(propName);
>   }
> } else {
>   ...
> }
> ===

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


[jira] Commented: (JCR-2750) MultiStatusResponse should not call resource.getProperties

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

Jukka Zitting commented on JCR-2750:
------------------------------------

Sounds good to me. Could you formulate the above as a proper patch against the latest Jackrabbit trunk?

> MultiStatusResponse should not call resource.getProperties
> ----------------------------------------------------------
>
>                 Key: JCR-2750
>                 URL: https://issues.apache.org/jira/browse/JCR-2750
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>            Reporter: Stepan Koltsov
>
> current constructor MultiStatusResponse() calls resource.getProperties() even if propFindType == PROPFIND_BY_PROPERTY.
> This is inconvenient, because some properties are expensive to generate if they are not requested. MultiStatusResponse() constructor with parameter PROPFIND_BY_PROPERTY should do:
> ===
> if (propFindType == PROPFIND_BY_PROPERTY) {
>   for (propName : propNameSet) {
>     prop = resource.getProperty(propName);
>     if (prop != null)
>       status200.addContent(prop);
>     else
>       status404.addContent(propName);
>   }
> } else {
>   ...
> }
> ===

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


[jira] Updated: (JCR-2750) MultiStatusResponse should not call resource.getProperties

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

angela updated JCR-2750:
------------------------

    Component/s: jackrabbit-webdav

> MultiStatusResponse should not call resource.getProperties
> ----------------------------------------------------------
>
>                 Key: JCR-2750
>                 URL: https://issues.apache.org/jira/browse/JCR-2750
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: jackrabbit-webdav
>            Reporter: Stepan Koltsov
>            Assignee: Jukka Zitting
>             Fix For: 2.2.0
>
>
> current constructor MultiStatusResponse() calls resource.getProperties() even if propFindType == PROPFIND_BY_PROPERTY.
> This is inconvenient, because some properties are expensive to generate if they are not requested. MultiStatusResponse() constructor with parameter PROPFIND_BY_PROPERTY should do:
> ===
> if (propFindType == PROPFIND_BY_PROPERTY) {
>   for (propName : propNameSet) {
>     prop = resource.getProperty(propName);
>     if (prop != null)
>       status200.addContent(prop);
>     else
>       status404.addContent(propName);
>   }
> } else {
>   ...
> }
> ===

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