Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F310A184C8 for ; Thu, 10 Dec 2015 14:15:49 +0000 (UTC) Received: (qmail 61973 invoked by uid 500); 10 Dec 2015 14:15:49 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 61866 invoked by uid 500); 10 Dec 2015 14:15:49 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 61848 invoked by uid 99); 10 Dec 2015 14:15:49 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Dec 2015 14:15:49 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 47A91E1790; Thu, 10 Dec 2015 14:15:49 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: luc@apache.org To: commits@commons.apache.org Date: Thu, 10 Dec 2015 14:15:49 -0000 Message-Id: <10b3f42dc7854223a6c0e01517438ea6@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/5] [math] Prevent NullPointerException. Repository: commons-math Updated Branches: refs/heads/MATH_3_X 10c271f2c -> 7cbc5fe00 Prevent NullPointerException. Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/3dfedb1d Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/3dfedb1d Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/3dfedb1d Branch: refs/heads/MATH_3_X Commit: 3dfedb1db55574a751efea857285fed6a76dcdd9 Parents: 10c271f Author: Luc Maisonobe Authored: Thu Dec 10 14:28:07 2015 +0100 Committer: Luc Maisonobe Committed: Thu Dec 10 14:28:07 2015 +0100 ---------------------------------------------------------------------- src/main/java/org/apache/commons/math3/ode/FieldODEState.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-math/blob/3dfedb1d/src/main/java/org/apache/commons/math3/ode/FieldODEState.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math3/ode/FieldODEState.java b/src/main/java/org/apache/commons/math3/ode/FieldODEState.java index d18dc6a..e231337 100644 --- a/src/main/java/org/apache/commons/math3/ode/FieldODEState.java +++ b/src/main/java/org/apache/commons/math3/ode/FieldODEState.java @@ -113,7 +113,7 @@ public class FieldODEState> { * @return number of secondary states. */ public int getNumberOfSecondaryStates() { - return secondaryState.length; + return secondaryState == null ? 0 : secondaryState.length; } /** Get secondary state dimension.