Use isEmpty().
diff --git a/src/main/java/org/apache/commons/math4/ode/ContinuousOutputFieldModel.java b/src/main/java/org/apache/commons/math4/ode/ContinuousOutputFieldModel.java
index c2caecd..9863e32 100644
--- a/src/main/java/org/apache/commons/math4/ode/ContinuousOutputFieldModel.java
+++ b/src/main/java/org/apache/commons/math4/ode/ContinuousOutputFieldModel.java
@@ -120,11 +120,11 @@
     public void append(final ContinuousOutputFieldModel<T> model)
         throws MathIllegalArgumentException, MaxCountExceededException {
 
-        if (model.steps.size() == 0) {
+        if (model.steps.isEmpty()) {
             return;
         }
 
-        if (steps.size() == 0) {
+        if (steps.isEmpty()) {
             initialTime = model.initialTime;
             forward     = model.forward;
         } else {
@@ -195,7 +195,7 @@
     public void handleStep(final FieldStepInterpolator<T> interpolator, final boolean isLast)
         throws MaxCountExceededException {
 
-        if (steps.size() == 0) {
+        if (steps.isEmpty()) {
             initialTime = interpolator.getPreviousState().getTime();
             forward     = interpolator.isForward();
         }
diff --git a/src/main/java/org/apache/commons/math4/ode/ContinuousOutputModel.java b/src/main/java/org/apache/commons/math4/ode/ContinuousOutputModel.java
index d89b700..c3589a8 100644
--- a/src/main/java/org/apache/commons/math4/ode/ContinuousOutputModel.java
+++ b/src/main/java/org/apache/commons/math4/ode/ContinuousOutputModel.java
@@ -129,11 +129,11 @@
   public void append(final ContinuousOutputModel model)
     throws MathIllegalArgumentException, MaxCountExceededException {
 
-    if (model.steps.size() == 0) {
+    if (model.steps.isEmpty()) {
       return;
     }
 
-    if (steps.size() == 0) {
+    if (steps.isEmpty()) {
       initialTime = model.initialTime;
       forward     = model.forward;
     } else {
@@ -190,7 +190,7 @@
 public void handleStep(final StepInterpolator interpolator, final boolean isLast)
       throws MaxCountExceededException {
 
-    if (steps.size() == 0) {
+    if (steps.isEmpty()) {
       initialTime = interpolator.getPreviousTime();
       forward     = interpolator.isForward();
     }
diff --git a/src/main/java/org/apache/commons/math4/optim/linear/SimplexSolver.java b/src/main/java/org/apache/commons/math4/optim/linear/SimplexSolver.java
index ae8eb8c..d762bd8 100644
--- a/src/main/java/org/apache/commons/math4/optim/linear/SimplexSolver.java
+++ b/src/main/java/org/apache/commons/math4/optim/linear/SimplexSolver.java
@@ -270,7 +270,7 @@
             }
         }
 
-        if (minRatioPositions.size() == 0) {
+        if (minRatioPositions.isEmpty()) {
             return null;
         } else if (minRatioPositions.size() > 1) {
             // there's a degeneracy as indicated by a tie in the minimum ratio test
diff --git a/src/main/java/org/apache/commons/math4/stat/ranking/NaturalRanking.java b/src/main/java/org/apache/commons/math4/stat/ranking/NaturalRanking.java
index 4d55867..cb07ad5 100644
--- a/src/main/java/org/apache/commons/math4/stat/ranking/NaturalRanking.java
+++ b/src/main/java/org/apache/commons/math4/stat/ranking/NaturalRanking.java
@@ -395,7 +395,7 @@
      * @param nanPositions list of index values to set to <code>Double.NaN</code>
      */
     private void restoreNaNs(double[] ranks, List<Integer> nanPositions) {
-        if (nanPositions.size() == 0) {
+        if (nanPositions.isEmpty()) {
             return;
         }
         Iterator<Integer> iterator = nanPositions.iterator();
diff --git a/src/test/java/org/apache/commons/math4/fitting/WeightedObservedPointsTest.java b/src/test/java/org/apache/commons/math4/fitting/WeightedObservedPointsTest.java
index ea0e9c8..186d0e5 100644
--- a/src/test/java/org/apache/commons/math4/fitting/WeightedObservedPointsTest.java
+++ b/src/test/java/org/apache/commons/math4/fitting/WeightedObservedPointsTest.java
@@ -74,7 +74,7 @@
         Assert.assertTrue(store.toList().size() == 2);
 
         store.clear();
-        Assert.assertTrue(store.toList().size() == 0);
+        Assert.assertTrue(store.toList().isEmpty());
     }
 
     // Ensure that an instance returned by "toList()" is independent from
@@ -95,7 +95,7 @@
 
         // Clearing "store" has no impact on "list".
         store.clear();
-        Assert.assertFalse(list.size() == 0);
+        Assert.assertFalse(list.isEmpty());
     }
 
     /**