You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by db...@apache.org on 2015/12/29 20:21:54 UTC
[math] simplify: instanceof checks for nulls
Repository: commons-math
Updated Branches:
refs/heads/master fb83ba3fd -> e779883b2
simplify: instanceof checks for nulls
Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/e779883b
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/e779883b
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/e779883b
Branch: refs/heads/master
Commit: e779883b29a67d411493f985de984ffb8088ca05
Parents: fb83ba3
Author: Dave Brosius <db...@mebigfatguy.com>
Authored: Tue Dec 29 14:21:42 2015 -0500
Committer: Dave Brosius <db...@mebigfatguy.com>
Committed: Tue Dec 29 14:21:42 2015 -0500
----------------------------------------------------------------------
.../commons/math4/stat/descriptive/rank/PSquarePercentile.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-math/blob/e779883b/src/main/java/org/apache/commons/math4/stat/descriptive/rank/PSquarePercentile.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/stat/descriptive/rank/PSquarePercentile.java b/src/main/java/org/apache/commons/math4/stat/descriptive/rank/PSquarePercentile.java
index 79bdc5e..7ba2d16 100644
--- a/src/main/java/org/apache/commons/math4/stat/descriptive/rank/PSquarePercentile.java
+++ b/src/main/java/org/apache/commons/math4/stat/descriptive/rank/PSquarePercentile.java
@@ -159,7 +159,7 @@ public class PSquarePercentile extends AbstractStorelessUnivariateStatistic
boolean result = false;
if (this == o) {
result = true;
- } else if (o != null && o instanceof PSquarePercentile) {
+ } else if (o instanceof PSquarePercentile) {
PSquarePercentile that = (PSquarePercentile) o;
boolean isNotNull = markers != null && that.markers != null;
boolean isNull = markers == null && that.markers == null;
@@ -410,7 +410,7 @@ public class PSquarePercentile extends AbstractStorelessUnivariateStatistic
boolean result = false;
if (this == o) {
result = true;
- } else if (o != null && o instanceof Markers) {
+ } else if (o instanceof Markers) {
Markers that = (Markers) o;
result = Arrays.deepEquals(markerArray, that.markerArray);
}
@@ -802,7 +802,7 @@ public class PSquarePercentile extends AbstractStorelessUnivariateStatistic
boolean result = false;
if (this == o) {
result = true;
- } else if (o != null && o instanceof Marker) {
+ } else if (o instanceof Marker) {
Marker that = (Marker) o;
result = Double.compare(markerHeight, that.markerHeight) == 0;