jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Klimetschek (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (JCR-2068) null value could be set into propertyDefinition
Date Thu, 09 Apr 2009 13:25:13 GMT

    [ https://issues.apache.org/jira/browse/JCR-2068?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697504#action_12697504
] 

Alexander Klimetschek edited comment on JCR-2068 at 4/9/09 6:23 AM:
--------------------------------------------------------------------

Do you mean line 36 in JackRabbitTest.java where you set the property to a null value? This
is not a property definition (that is given in your node type definition file), but here you
set the actual property. Therefore the bug title is misleading.

Anyway, IMHO this behaviour is ok, since the property does not exist yet and setting a null
value there gives you a nullpointerexception, which is perfectly fine. Maybe the NPE could
be thrown directly in the setProperty() method to improve diagnostics on the stack trace.

      was (Author: alexander.klimetschek):
    Do you mean line 36 in JackRabbitTest.java where you set the property to a null value?
IMHO this is ok, since the property does not exist yet and setting a null value there gives
you a nullpointerexception, which is perfectly fine. Maybe the NPE could be thrown directly
in the setProperty() method to improve diagnostics on the stack trace.
  
> null value could be set into propertyDefinition
> -----------------------------------------------
>
>                 Key: JCR-2068
>                 URL: https://issues.apache.org/jira/browse/JCR-2068
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: jackrabbit-core
>    Affects Versions: 1.5.3
>         Environment: Windows XP, Tomcat 6.0, JRE6
>            Reporter: Sergey Sachkov 
>         Attachments: JackRabbitTest.java, test.xml
>
>
> It is possible to set null value into propertyDefinition and NullPointer is thrown inside
JackRabbit in EffectiveNodeType class, checkSetPropertyValueConstraintsmethod  line 615. So
it would be good to check those values for null, as null pointer inside framwork is not a
good practice

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


Mime
View raw message