You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Tobias Bocanegra (JIRA)" <ji...@apache.org> on 2006/12/05 15:42:21 UTC

[jira] Created: (JCR-664) Property.setValue(Node) explicitly checks for NodeImpl

Property.setValue(Node) explicitly checks for NodeImpl
------------------------------------------------------

                 Key: JCR-664
                 URL: http://issues.apache.org/jira/browse/JCR-664
             Project: Jackrabbit
          Issue Type: Bug
            Reporter: Tobias Bocanegra


The implementation of Propert.setValue(Node) explicitly checks if the argument is a NodeImpl:

if (target instanceof NodeImpl) {
   [...]
} else {
   String msg = "incompatible Node object: " + target;
   log.debug(msg);
   throw new RepositoryException(msg);
}

This is not very convenient for applications that decorate the jcr objects.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] Updated: (JCR-664) Property.setValue(Node) explicitly checks for NodeImpl

Posted by Thomas Mueller <th...@gmail.com>.
Hi,

Log Wrapper: I didn't know about this problem. It is possible to
unwrap the object in the log wrapper before calling the method.

Thomas


> > Property.setValue(Node) explicitly checks for NodeImpl
> > ------------------------------------------------------
> >
> >                 Key: JCR-664
> >                 URL: http://issues.apache.org/jira/browse/JCR-664
> >             Project: Jackrabbit
> >          Issue Type: Wish
> >         Environment: that's neither a bug nor is it a major issue
> >            Reporter: Tobias Bocanegra
> >            Priority: Minor
> >
> > The implementation of Propert.setValue(Node) explicitly checks if the argument is a NodeImpl:
> > if (target instanceof NodeImpl) {
> >    [...]
> > } else {
> >    String msg = "incompatible Node object: " + target;
> >    log.debug(msg);
> >    throw new RepositoryException(msg);
> > }
> > This is not very convenient for applications that decorate the jcr objects.
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>

[jira] Commented: (JCR-664) Property.setValue(Node) explicitly checks for NodeImpl

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-664?page=comments#action_12455662 ] 
            
Marcel Reutegger commented on JCR-664:
--------------------------------------

Shouldn't a decoration layer un-wrap a Node instance in the first place when it passes it to the decorated repository?

> Property.setValue(Node) explicitly checks for NodeImpl
> ------------------------------------------------------
>
>                 Key: JCR-664
>                 URL: http://issues.apache.org/jira/browse/JCR-664
>             Project: Jackrabbit
>          Issue Type: Bug
>            Reporter: Tobias Bocanegra
>
> The implementation of Propert.setValue(Node) explicitly checks if the argument is a NodeImpl:
> if (target instanceof NodeImpl) {
>    [...]
> } else {
>    String msg = "incompatible Node object: " + target;
>    log.debug(msg);
>    throw new RepositoryException(msg);
> }
> This is not very convenient for applications that decorate the jcr objects.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JCR-664) Property.setValue(Node) explicitly checks for NodeImpl

Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-664?page=comments#action_12455673 ] 
            
Tobias Bocanegra commented on JCR-664:
--------------------------------------

if the JCR API takes a javax.jcr.Node, then it should work with any implementation. This might not work for all cases, i agree, but in this case, reading the UUID of the referenceable is implementation independent.

> Property.setValue(Node) explicitly checks for NodeImpl
> ------------------------------------------------------
>
>                 Key: JCR-664
>                 URL: http://issues.apache.org/jira/browse/JCR-664
>             Project: Jackrabbit
>          Issue Type: Wish
>         Environment: that's neither a bug nor is it a major issue 
>            Reporter: Tobias Bocanegra
>            Priority: Minor
>
> The implementation of Propert.setValue(Node) explicitly checks if the argument is a NodeImpl:
> if (target instanceof NodeImpl) {
>    [...]
> } else {
>    String msg = "incompatible Node object: " + target;
>    log.debug(msg);
>    throw new RepositoryException(msg);
> }
> This is not very convenient for applications that decorate the jcr objects.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (JCR-664) Property.setValue(Node) explicitly checks for NodeImpl

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

angela updated JCR-664:
-----------------------

    Component/s: jackrabbit-core

> Property.setValue(Node) explicitly checks for NodeImpl
> ------------------------------------------------------
>
>                 Key: JCR-664
>                 URL: https://issues.apache.org/jira/browse/JCR-664
>             Project: Jackrabbit
>          Issue Type: Wish
>          Components: jackrabbit-core
>         Environment: that's neither a bug nor is it a major issue 
>            Reporter: Tobias Bocanegra
>            Priority: Minor
>
> The implementation of Propert.setValue(Node) explicitly checks if the argument is a NodeImpl:
> if (target instanceof NodeImpl) {
>    [...]
> } else {
>    String msg = "incompatible Node object: " + target;
>    log.debug(msg);
>    throw new RepositoryException(msg);
> }
> This is not very convenient for applications that decorate the jcr objects.

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


[jira] Resolved: (JCR-664) Property.setValue(Node) explicitly checks for NodeImpl

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

Marcel Reutegger resolved JCR-664.
----------------------------------

    Resolution: Won't Fix

+1, see also my previous comment.

> Property.setValue(Node) explicitly checks for NodeImpl
> ------------------------------------------------------
>
>                 Key: JCR-664
>                 URL: https://issues.apache.org/jira/browse/JCR-664
>             Project: Jackrabbit
>          Issue Type: Wish
>          Components: jackrabbit-core
>         Environment: that's neither a bug nor is it a major issue 
>            Reporter: Tobias Bocanegra
>            Priority: Minor
>
> The implementation of Propert.setValue(Node) explicitly checks if the argument is a NodeImpl:
> if (target instanceof NodeImpl) {
>    [...]
> } else {
>    String msg = "incompatible Node object: " + target;
>    log.debug(msg);
>    throw new RepositoryException(msg);
> }
> This is not very convenient for applications that decorate the jcr objects.

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


[jira] Commented: (JCR-664) Property.setValue(Node) explicitly checks for NodeImpl

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

Stefan Guggisberg commented on JCR-664:
---------------------------------------

+1 for 'Won't Fix'

> Property.setValue(Node) explicitly checks for NodeImpl
> ------------------------------------------------------
>
>                 Key: JCR-664
>                 URL: https://issues.apache.org/jira/browse/JCR-664
>             Project: Jackrabbit
>          Issue Type: Wish
>          Components: jackrabbit-core
>         Environment: that's neither a bug nor is it a major issue 
>            Reporter: Tobias Bocanegra
>            Priority: Minor
>
> The implementation of Propert.setValue(Node) explicitly checks if the argument is a NodeImpl:
> if (target instanceof NodeImpl) {
>    [...]
> } else {
>    String msg = "incompatible Node object: " + target;
>    log.debug(msg);
>    throw new RepositoryException(msg);
> }
> This is not very convenient for applications that decorate the jcr objects.

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


[jira] Commented: (JCR-664) Property.setValue(Node) explicitly checks for NodeImpl

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

Jukka Zitting commented on JCR-664:
-----------------------------------

I suggest to resolve this as Won't Fix until we have a good use case.

> Property.setValue(Node) explicitly checks for NodeImpl
> ------------------------------------------------------
>
>                 Key: JCR-664
>                 URL: https://issues.apache.org/jira/browse/JCR-664
>             Project: Jackrabbit
>          Issue Type: Wish
>          Components: jackrabbit-core
>         Environment: that's neither a bug nor is it a major issue 
>            Reporter: Tobias Bocanegra
>            Priority: Minor
>
> The implementation of Propert.setValue(Node) explicitly checks if the argument is a NodeImpl:
> if (target instanceof NodeImpl) {
>    [...]
> } else {
>    String msg = "incompatible Node object: " + target;
>    log.debug(msg);
>    throw new RepositoryException(msg);
> }
> This is not very convenient for applications that decorate the jcr objects.

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


[jira] Updated: (JCR-664) Property.setValue(Node) explicitly checks for NodeImpl

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-664?page=all ]

Stefan Guggisberg updated JCR-664:
----------------------------------

     Issue Type: Wish  (was: Bug)
    Environment: that's neither a bug nor is it a major issue 
       Priority: Minor  (was: Major)

> Property.setValue(Node) explicitly checks for NodeImpl
> ------------------------------------------------------
>
>                 Key: JCR-664
>                 URL: http://issues.apache.org/jira/browse/JCR-664
>             Project: Jackrabbit
>          Issue Type: Wish
>         Environment: that's neither a bug nor is it a major issue 
>            Reporter: Tobias Bocanegra
>            Priority: Minor
>
> The implementation of Propert.setValue(Node) explicitly checks if the argument is a NodeImpl:
> if (target instanceof NodeImpl) {
>    [...]
> } else {
>    String msg = "incompatible Node object: " + target;
>    log.debug(msg);
>    throw new RepositoryException(msg);
> }
> This is not very convenient for applications that decorate the jcr objects.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira