openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim McConnell (JIRA)" <j...@apache.org>
Subject [jira] Updated: (OPENJPA-1315) org.apache.openjpa.persistence.QueryImpl
Date Mon, 21 Sep 2009 22:47:16 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-1315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tim McConnell updated OPENJPA-1315:
-----------------------------------

    Attachment: OPENJPA-1315.patch

Added check to hashcode() method to ensure that _query is not null prior to invoking its hashcode
method.  
Again, no testcase is provided in this case as it can be easily reproduced while debugging
in Eclipse, or adding println() statements to QueryImpl instantiation of _query (which is
what I did for expediency), which will invoke the toString() method, which will invoke the
hashcode() method, which will cause a NullPointerException. If a testcase is preferred though
please let me know. 

> org.apache.openjpa.persistence.QueryImpl
> ----------------------------------------
>
>                 Key: OPENJPA-1315
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1315
>             Project: OpenJPA
>          Issue Type: Sub-task
>    Affects Versions: 2.0.0
>            Reporter: Tim McConnell
>            Assignee: Tim McConnell
>            Priority: Minor
>             Fix For: 2.0.0
>
>         Attachments: OPENJPA-1315.patch
>
>
> The org.apache.openjpa.persistence.QueryImpl hashcode() implementation does not ensure
that recursive invocations of hashcode() on object(s) in that method will not result in a
NullPointerException. I.e., in this specific case it does not check whether _query is null,
and it should since there is no guarantee that _query will always be non-null. 

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