Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E84E311A41 for ; Tue, 24 Jun 2014 16:36:24 +0000 (UTC) Received: (qmail 81396 invoked by uid 500); 24 Jun 2014 16:36:24 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 81357 invoked by uid 500); 24 Jun 2014 16:36:24 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 81291 invoked by uid 99); 24 Jun 2014 16:36:24 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jun 2014 16:36:24 +0000 Date: Tue, 24 Jun 2014 16:36:24 +0000 (UTC) From: "Brandon Williams (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-7439) There are a number of places where Gossiper.instance.getEndpointStateForEndpoint is not checked for null MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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)