cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "gabriele renzi (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CASSANDRA-631) possible NPE in StorageProxy?
Date Sat, 12 Dec 2009 18:31:23 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789777#action_12789777
] 

gabriele renzi commented on CASSANDRA-631:
------------------------------------------

Sorry, I wrote it in the patch comment but I failed to express myself clearly: in my setup
I have basically all warnings turned on, and for access of private fields from inner classes
there are some performance-related ones (the need for compiler-generated accessor methods)
which are not present in case of package visibility. 

It's a silly reason but I just use all possible warnings (+pmd, +findbugs) in my code, and
this happen to be in the set, I'll just turn this off if it seems unnecessary. Shall I update
the CodeStyle wiki page to point this out?

Same for generics, mostly a warning removal thingy. 
Regarding ObjectUtils, we save an array, a list and an iterator object instantiation, so it's
3 spoons! (that should be probably optimized away with escape analysis anyway :)

Thanks for applying the patch. 

> possible NPE in StorageProxy?
> -----------------------------
>
>                 Key: CASSANDRA-631
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-631
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: all
>            Reporter: gabriele renzi
>            Assignee: gabriele renzi
>             Fix For: 0.5, 0.9
>
>         Attachments: CASSANDRA-631-big.patch, CASSANDRA-631-tiny.patch
>
>   Original Estimate: 0.17h
>  Remaining Estimate: 0.17h
>
> insert() in StorageProxy contains a logging statement that refers to a possibly un-initialized
variable
> {{{
> logger.debug("insert writing key " + rm.key() + " to " + unhintedMessage.getMessageId()
+ "@" + hintedTarget + " for " + target);
> }}}
> this could happen if getHintedEndpointMap(rm.key(), naturalEndpoints) returns only elements
for which target.equals(hintedTarget) returns false, which seems possible to me. 
> Looking at the code I get the feeling the reference should probably be to 'hintedMessage',
instead of "unhintedMessage", if not so an 
> assert statement could be appropriate

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