You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Michael Frericks (JIRA)" <ji...@apache.org> on 2006/05/02 10:38:46 UTC
[jira] Created: (JCR-420) NullPointerException when deleting a
property of type REFERENCE
NullPointerException when deleting a property of type REFERENCE
---------------------------------------------------------------
Key: JCR-420
URL: http://issues.apache.org/jira/browse/JCR-420
Project: Jackrabbit
Type: Bug
Components: rmi
Versions: 1.0
Reporter: Michael Frericks
Priority: Blocker
In method org.apache.jackrabbit.rmi.value.SerialValueFactory#createValue a NPE is thrown when parameter value is null.
Solution:
Change:
public final Value createValue(Node value) throws RepositoryException {
return createValue(value.getUUID(), PropertyType.REFERENCE);
}
to
public final Value createValue(Node value) throws RepositoryException {
if (value == null) {
return null;
}
return createValue(value.getUUID(), PropertyType.REFERENCE);
}
--
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] Assigned: (JCR-420) NullPointerException when deleting a
property of type REFERENCE
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JCR-420?page=all ]
Jukka Zitting reassigned JCR-420:
---------------------------------
Assign To: Jukka Zitting
> NullPointerException when deleting a property of type REFERENCE
> ---------------------------------------------------------------
>
> Key: JCR-420
> URL: http://issues.apache.org/jira/browse/JCR-420
> Project: Jackrabbit
> Type: Bug
> Components: rmi
> Versions: 1.0
> Reporter: Michael Frericks
> Assignee: Jukka Zitting
> Priority: Blocker
>
> In method org.apache.jackrabbit.rmi.value.SerialValueFactory#createValue a NPE is thrown when parameter value is null.
> Solution:
> Change:
> public final Value createValue(Node value) throws RepositoryException {
> return createValue(value.getUUID(), PropertyType.REFERENCE);
> }
> to
> public final Value createValue(Node value) throws RepositoryException {
> if (value == null) {
> return null;
> }
>
> return createValue(value.getUUID(), PropertyType.REFERENCE);
> }
--
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-420) NullPointerException when deleting a
property of type REFERENCE
Posted by "Michael Frericks (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JCR-420?page=comments#action_12414576 ]
Michael Frericks commented on JCR-420:
--------------------------------------
The fix didn't make it into the release 1.0.1!?
What happened?
> NullPointerException when deleting a property of type REFERENCE
> ---------------------------------------------------------------
>
> Key: JCR-420
> URL: http://issues.apache.org/jira/browse/JCR-420
> Project: Jackrabbit
> Type: Bug
> Components: rmi
> Versions: 1.0
> Reporter: Michael Frericks
> Assignee: Jukka Zitting
> Priority: Blocker
> Fix For: 1.0.1
>
> In method org.apache.jackrabbit.rmi.value.SerialValueFactory#createValue a NPE is thrown when parameter value is null.
> Solution:
> Change:
> public final Value createValue(Node value) throws RepositoryException {
> return createValue(value.getUUID(), PropertyType.REFERENCE);
> }
> to
> public final Value createValue(Node value) throws RepositoryException {
> if (value == null) {
> return null;
> }
>
> return createValue(value.getUUID(), PropertyType.REFERENCE);
> }
--
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] Resolved: (JCR-420) NullPointerException when deleting a
property of type REFERENCE
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JCR-420?page=all ]
Jukka Zitting resolved JCR-420:
-------------------------------
Fix Version: 1.0.1
Resolution: Fixed
Possible fix committed in revision 399638. I didn't have time to test this very much yet, so please reopen the issue if the problem persists.
> NullPointerException when deleting a property of type REFERENCE
> ---------------------------------------------------------------
>
> Key: JCR-420
> URL: http://issues.apache.org/jira/browse/JCR-420
> Project: Jackrabbit
> Type: Bug
> Components: rmi
> Versions: 1.0
> Reporter: Michael Frericks
> Assignee: Jukka Zitting
> Priority: Blocker
> Fix For: 1.0.1
>
> In method org.apache.jackrabbit.rmi.value.SerialValueFactory#createValue a NPE is thrown when parameter value is null.
> Solution:
> Change:
> public final Value createValue(Node value) throws RepositoryException {
> return createValue(value.getUUID(), PropertyType.REFERENCE);
> }
> to
> public final Value createValue(Node value) throws RepositoryException {
> if (value == null) {
> return null;
> }
>
> return createValue(value.getUUID(), PropertyType.REFERENCE);
> }
--
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-420) NullPointerException when deleting a
property of type REFERENCE
Posted by "Michael Frericks (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JCR-420?page=comments#action_12414579 ]
Michael Frericks commented on JCR-420:
--------------------------------------
Sorry, my fault. I attached the old (1.0) sources.
> NullPointerException when deleting a property of type REFERENCE
> ---------------------------------------------------------------
>
> Key: JCR-420
> URL: http://issues.apache.org/jira/browse/JCR-420
> Project: Jackrabbit
> Type: Bug
> Components: rmi
> Versions: 1.0
> Reporter: Michael Frericks
> Assignee: Jukka Zitting
> Priority: Blocker
> Fix For: 1.0.1
>
> In method org.apache.jackrabbit.rmi.value.SerialValueFactory#createValue a NPE is thrown when parameter value is null.
> Solution:
> Change:
> public final Value createValue(Node value) throws RepositoryException {
> return createValue(value.getUUID(), PropertyType.REFERENCE);
> }
> to
> public final Value createValue(Node value) throws RepositoryException {
> if (value == null) {
> return null;
> }
>
> return createValue(value.getUUID(), PropertyType.REFERENCE);
> }
--
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-420) NullPointerException when deleting a
property of type REFERENCE
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JCR-420?page=comments#action_12377359 ]
Jukka Zitting commented on JCR-420:
-----------------------------------
Good point. However, I think this is better handled in ClientNode.setProperty() (etc.) rather than in the SerialValueFactory. I'll take a look at it.
> NullPointerException when deleting a property of type REFERENCE
> ---------------------------------------------------------------
>
> Key: JCR-420
> URL: http://issues.apache.org/jira/browse/JCR-420
> Project: Jackrabbit
> Type: Bug
> Components: rmi
> Versions: 1.0
> Reporter: Michael Frericks
> Assignee: Jukka Zitting
> Priority: Blocker
>
> In method org.apache.jackrabbit.rmi.value.SerialValueFactory#createValue a NPE is thrown when parameter value is null.
> Solution:
> Change:
> public final Value createValue(Node value) throws RepositoryException {
> return createValue(value.getUUID(), PropertyType.REFERENCE);
> }
> to
> public final Value createValue(Node value) throws RepositoryException {
> if (value == null) {
> return null;
> }
>
> return createValue(value.getUUID(), PropertyType.REFERENCE);
> }
--
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-420) NullPointerException when deleting a
property of type REFERENCE
Posted by "Michael Frericks (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JCR-420?page=comments#action_12377396 ]
Michael Frericks commented on JCR-420:
--------------------------------------
It seems that there is a more general issue with setting References to null over rmi. The above Null-Checks do not fix the problem.
> NullPointerException when deleting a property of type REFERENCE
> ---------------------------------------------------------------
>
> Key: JCR-420
> URL: http://issues.apache.org/jira/browse/JCR-420
> Project: Jackrabbit
> Type: Bug
> Components: rmi
> Versions: 1.0
> Reporter: Michael Frericks
> Assignee: Jukka Zitting
> Priority: Blocker
>
> In method org.apache.jackrabbit.rmi.value.SerialValueFactory#createValue a NPE is thrown when parameter value is null.
> Solution:
> Change:
> public final Value createValue(Node value) throws RepositoryException {
> return createValue(value.getUUID(), PropertyType.REFERENCE);
> }
> to
> public final Value createValue(Node value) throws RepositoryException {
> if (value == null) {
> return null;
> }
>
> return createValue(value.getUUID(), PropertyType.REFERENCE);
> }
--
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-420) NullPointerException when deleting a
property of type REFERENCE
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JCR-420?page=comments#action_12413404 ]
Jukka Zitting commented on JCR-420:
-----------------------------------
Merged for 1.0.1 in revision 409598.
> NullPointerException when deleting a property of type REFERENCE
> ---------------------------------------------------------------
>
> Key: JCR-420
> URL: http://issues.apache.org/jira/browse/JCR-420
> Project: Jackrabbit
> Type: Bug
> Components: rmi
> Versions: 1.0
> Reporter: Michael Frericks
> Assignee: Jukka Zitting
> Priority: Blocker
> Fix For: 1.0.1
>
> In method org.apache.jackrabbit.rmi.value.SerialValueFactory#createValue a NPE is thrown when parameter value is null.
> Solution:
> Change:
> public final Value createValue(Node value) throws RepositoryException {
> return createValue(value.getUUID(), PropertyType.REFERENCE);
> }
> to
> public final Value createValue(Node value) throws RepositoryException {
> if (value == null) {
> return null;
> }
>
> return createValue(value.getUUID(), PropertyType.REFERENCE);
> }
--
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-420) NullPointerException when deleting a
property of type REFERENCE
Posted by "Michael Frericks (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JCR-420?page=comments#action_12377358 ]
Michael Frericks commented on JCR-420:
--------------------------------------
Method org.apache.jackrabbit.rmi.value.SerialValueFactory#makeSerialValue(Value value) needs a null check too:
public static Value makeSerialValue(Value value) {
if (value == null)
{
return null;
}
...
}
> NullPointerException when deleting a property of type REFERENCE
> ---------------------------------------------------------------
>
> Key: JCR-420
> URL: http://issues.apache.org/jira/browse/JCR-420
> Project: Jackrabbit
> Type: Bug
> Components: rmi
> Versions: 1.0
> Reporter: Michael Frericks
> Priority: Blocker
>
> In method org.apache.jackrabbit.rmi.value.SerialValueFactory#createValue a NPE is thrown when parameter value is null.
> Solution:
> Change:
> public final Value createValue(Node value) throws RepositoryException {
> return createValue(value.getUUID(), PropertyType.REFERENCE);
> }
> to
> public final Value createValue(Node value) throws RepositoryException {
> if (value == null) {
> return null;
> }
>
> return createValue(value.getUUID(), PropertyType.REFERENCE);
> }
--
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