cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brandon Williams (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-7439) There are a number of places where Gossiper.instance.getEndpointStateForEndpoint is not checked for null
Date Tue, 24 Jun 2014 16:36:24 GMT

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

Brandon Williams commented on CASSANDRA-7439:
---------------------------------------------

Though true, I think a lot of these instances are where it's impossible for it to return null,
e.g. we were responding to a notification of a join, so the state has to be there.

> There are a number of places where Gossiper.instance.getEndpointStateForEndpoint is not
checked for null
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-7439
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7439
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Mike Adamson
>            Priority: Minor
>
> In most places the getEndpointStateForEndpoint method is null checked but in a number
of places it isn't.
> Without testing each individual call point it is difficult to tell from the context whether
the state will be null or not.
> In this case wouldn't it make sense to null every call to this method to avoid race conditions
and NPEs



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message