diff --git a/src/net/sf/freecol/client/control/MapEditorController.java b/src/net/sf/freecol/client/control/MapEditorController.java
index fa8106b5a..8141c78ff 100644
--- a/src/net/sf/freecol/client/control/MapEditorController.java
+++ b/src/net/sf/freecol/client/control/MapEditorController.java
@@ -270,8 +270,7 @@ public final class MapEditorController extends FreeColClientHolder {
                 } catch (IOException e) {
                     SwingUtilities.invokeLater(() -> {
                             gui.closeStatusPanel();
-                            gui.showErrorPanel(FreeCol.badFile("error.couldNotSave", file),
-                                (e == null) ? null : e.getMessage());
+                            gui.showErrorPanel(FreeCol.badFile("error.couldNotSave", file), e.getMessage());
                         });
                 }
             }
diff --git a/src/net/sf/freecol/client/gui/MapViewer.java b/src/net/sf/freecol/client/gui/MapViewer.java
index ecd2f34aa..02cb20d4a 100644
--- a/src/net/sf/freecol/client/gui/MapViewer.java
+++ b/src/net/sf/freecol/client/gui/MapViewer.java
@@ -1246,7 +1246,6 @@ public final class MapViewer extends FreeColClientHolder {
         final int y0 = firstRow;
         final List<Tile> baseTiles = map.subMap(x0, y0,
             lastColumn-firstColumn+1, lastRow-firstRow+1);
-        List<Tile> extendedTiles = null;
 
         // Display the base Tiles
         int xt0 = 0, yt0 = 0;
@@ -1291,13 +1290,12 @@ public final class MapViewer extends FreeColClientHolder {
             g2d.setTransform(baseTransform);
         }
 
+        List<Tile> extendedTiles = null;
         // Paint full region borders
         if (options.getInteger(ClientOptions.DISPLAY_TILE_TEXT)
                 == ClientOptions.DISPLAY_TILE_TEXT_REGIONS) {
-            if (extendedTiles == null) {
-                extendedTiles = map.subMap(x0, y0-1, lastColumn-firstColumn+1,
-                                           lastRow-firstRow+1+1);
-            }
+            extendedTiles = map.subMap(x0, y0-1, lastColumn-firstColumn+1,
+                                       lastRow-firstRow+1+1);
 
             xt0 = yt0 = 0;
             for (Tile t : extendedTiles) {
diff --git a/src/net/sf/freecol/client/gui/ModifierFormat.java b/src/net/sf/freecol/client/gui/ModifierFormat.java
index dd7bcd465..cbdabaed1 100644
--- a/src/net/sf/freecol/client/gui/ModifierFormat.java
+++ b/src/net/sf/freecol/client/gui/ModifierFormat.java
@@ -88,7 +88,7 @@ public class ModifierFormat {
         if (source == null) return getUnknownValue();
 
         String result = null;
-        if (result == null && source instanceof Nameable) {
+        if (source instanceof Nameable) {
             result = ((Nameable)source).getName();
             if (result != null && result.isEmpty()) result = null;
         }
diff --git a/src/net/sf/freecol/client/gui/animation/Animations.java b/src/net/sf/freecol/client/gui/animation/Animations.java
index 6785a0838..c7fd79098 100644
--- a/src/net/sf/freecol/client/gui/animation/Animations.java
+++ b/src/net/sf/freecol/client/gui/animation/Animations.java
@@ -64,11 +64,7 @@ public class Animations {
             UnitMoveAnimation a
                 = new UnitMoveAnimation(unit,
                     source, destination, speed, scale);
-            if (a == null) {
-                logger.warning("No move animation for: " + unit);
-            } else {
-                ret.add(a);
-            }
+            ret.add(a);
         }
         return ret;
     }
diff --git a/src/net/sf/freecol/client/gui/panel/MapEditorTransformPanel.java b/src/net/sf/freecol/client/gui/panel/MapEditorTransformPanel.java
index 3f77bfe43..04e2f3bc9 100644
--- a/src/net/sf/freecol/client/gui/panel/MapEditorTransformPanel.java
+++ b/src/net/sf/freecol/client/gui/panel/MapEditorTransformPanel.java
@@ -394,7 +394,7 @@ public final class MapEditorTransformPanel extends FreeColPanel {
                     newMapTransform = mt;
                 }
                 ctlr.setMapTransform(newMapTransform);
-                if (newMapTransform == null && mt != null) {
+                if (newMapTransform == null) {
                     // Select the invisible button, de-selecting all others
                     group.setSelected(group.getElements().nextElement()
                         .getModel(), true);
diff --git a/src/net/sf/freecol/common/metaserver/MetaServerUtils.java b/src/net/sf/freecol/common/metaserver/MetaServerUtils.java
index 6f3121ad1..38461cd1e 100644
--- a/src/net/sf/freecol/common/metaserver/MetaServerUtils.java
+++ b/src/net/sf/freecol/common/metaserver/MetaServerUtils.java
@@ -211,7 +211,7 @@ public class MetaServerUtils {
             lsi.add(sentinel);
             consumer = (l) -> {
                 lsi.clear();
-                if (lsi != null) lsi.addAll(l);
+                lsi.addAll(l);
             };
         }
 
diff --git a/src/net/sf/freecol/common/model/Map.java b/src/net/sf/freecol/common/model/Map.java
index 3d81e72b7..1343897d3 100644
--- a/src/net/sf/freecol/common/model/Map.java
+++ b/src/net/sf/freecol/common/model/Map.java
@@ -1393,7 +1393,6 @@ public class Map extends FreeColGameObject implements Location {
                         carrier, costDecider, l2);
                     l2.log(logger, Level.WARNING);
                 }
-                path = null;
 
                 // At the front of the path insert a node for the starting
                 // location in Europe, correcting for the turns to sail to
diff --git a/src/net/sf/freecol/common/model/Specification.java b/src/net/sf/freecol/common/model/Specification.java
index 7ef6ece7f..ef1b202ed 100644
--- a/src/net/sf/freecol/common/model/Specification.java
+++ b/src/net/sf/freecol/common/model/Specification.java
@@ -2772,7 +2772,6 @@ public final class Specification implements OptionContainer {
                 lb.add("\n  ~", level.getId(), "/", id, " -> ",
                     level.getId(), "/" + og.getId());
             } else {
-                op = null;
                 for (Option o : og.getOptions()) {
                     if (o.getId().equals(id)) {
                         op = o;
@@ -2825,7 +2824,6 @@ public final class Specification implements OptionContainer {
                 lb.add("\n  ~", level.getId(), "/", id, " -> ",
                     level.getId(), "/" + og.getId());
             } else {
-                op = null;
                 for (Option o : og.getOptions()) {
                     if (o.getId().equals(id)) {
                         op = o;
@@ -2874,7 +2872,6 @@ public final class Specification implements OptionContainer {
                 lb.add("\n  ~", level.getId(), "/", id, " -> ",
                     level.getId(), "/" + og.getId());
             } else {
-                op = null;
                 for (Option o : og.getOptions()) {
                     if (o.getId().equals(id)) {
                         op = o;
diff --git a/src/net/sf/freecol/common/model/Unit.java b/src/net/sf/freecol/common/model/Unit.java
index 76664d35d..882e6dbf0 100644
--- a/src/net/sf/freecol/common/model/Unit.java
+++ b/src/net/sf/freecol/common/model/Unit.java
@@ -2761,43 +2761,47 @@ public class Unit extends GoodsLocation
      */
     public Location getPathStartLocation() {
         final Unit carrier = getCarrier();
-        Location ret = getTile();
+        Location pathStartLocation = getTile();
         if (isOnCarrier()) {
-            if (ret != null) {
-                ; // OK
-            } else if (carrier.getDestination() == null) {
-                ret = null;
-            } else if (carrier.getDestination() instanceof Map) {
-                ret = carrier.getFullEntryLocation();
-            } else if (carrier.getDestination() instanceof Settlement) {
-                ret = carrier.getDestination();
-            } else { // destination must be Europe
-                ret = null;
+            if (pathStartLocation == null) {
+                if (carrier.getDestination() instanceof Map) {
+                    pathStartLocation = carrier.getFullEntryLocation();
+                } else if (carrier.getDestination() instanceof Settlement) {
+                    pathStartLocation = carrier.getDestination();
+                }
+                // destination must be Europe
             }
         } else if (isNaval()) {
-            if (ret != null) {
-                ; // OK
+            if (pathStartLocation != null) {
+                // OK
             } else if (getDestination() == null
-                || getDestination() instanceof Map) {
-                ret = getFullEntryLocation();
+                       || getDestination() instanceof Map) {
+                pathStartLocation = getFullEntryLocation();
             } else if (getDestination() instanceof Settlement) {
-                ret = getDestination();
+                pathStartLocation = getDestination();
             } else {
-                ret = getFullEntryLocation();
+                pathStartLocation = getFullEntryLocation();
             }
         }
-        if (ret != null) return ret;
 
-        // Must be a land unit not on the map.  May have a carrier.
+        if (pathStartLocation != null) {
+            return pathStartLocation;
+        }
+
+        // Must be a land unit not on the map. May have a carrier.
         // Get our nearest settlement to Europe, fallback to any other.
         final Player owner = getOwner();
         Settlement sett = minimize(owner.getSettlements(),
                                    settlementStartComparator);
-        if (sett == null) sett = first(owner.getSettlements());
-        if (sett != null) return sett;
+        if (sett == null) {
+            sett = first(owner.getSettlements());
+        }
+        if (sett != null) {
+            return sett;
+        }
 
-        // Owner has no settlements.  If it is the REF, start from a
-        // rebel colony.  Prefer the closest port.
+        // Owner has no settlements. If it is the REF, start from a
+        // rebel colony. Prefer the closest port.
         if (owner.isREF()) {
             return minimize(flatten(owner.getRebels(), Player::getSettlements),
                             settlementStartComparator);
@@ -2805,9 +2809,10 @@ public class Unit extends GoodsLocation
 
         // Desperately find the nearest land to the entry location.
         Location loc = getFullEntryLocation();
-        return (loc == null || loc.getTile() == null) ? null
-            : find(loc.getTile().getSurroundingTiles(1, INFINITY),
-                   Tile::isLand);
+        return (loc == null || loc.getTile() == null)
+                ? null
+                : find(loc.getTile().getSurroundingTiles(1, INFINITY),
+                       Tile::isLand);
     }
 
     /**
diff --git a/src/net/sf/freecol/common/networking/Connection.java b/src/net/sf/freecol/common/networking/Connection.java
index 4dbd0db4e..c1613202c 100644
--- a/src/net/sf/freecol/common/networking/Connection.java
+++ b/src/net/sf/freecol/common/networking/Connection.java
@@ -338,7 +338,6 @@ public class Connection implements Closeable {
                 lw = new FreeColXMLWriter(FreeColDirectories.getLogCommsWriter(),
                     FreeColXMLWriter.WriteScope.toSave(), true);
             } catch (FreeColException|IOException ex) {
-                lw = null; // Just do not log
                 logger.log(Level.WARNING, "Comms logs disabled", ex);
             }
         }
diff --git a/src/net/sf/freecol/common/networking/ReceivingThread.java b/src/net/sf/freecol/common/networking/ReceivingThread.java
index f189e1d64..d8ba97949 100644
--- a/src/net/sf/freecol/common/networking/ReceivingThread.java
+++ b/src/net/sf/freecol/common/networking/ReceivingThread.java
@@ -350,7 +350,6 @@ final class ReceivingThread extends Thread {
                 t = messageQuestion((QuestionMessage)m, replyId);
             } catch (FreeColException fce) {
                 logger.log(Level.WARNING, "No reader for " + replyId, fce);
-                t = null;
             }                
             break;
             
diff --git a/src/net/sf/freecol/common/option/AudioMixerOption.java b/src/net/sf/freecol/common/option/AudioMixerOption.java
index e8f97ffb2..ad67c63ec 100644
--- a/src/net/sf/freecol/common/option/AudioMixerOption.java
+++ b/src/net/sf/freecol/common/option/AudioMixerOption.java
@@ -222,7 +222,7 @@ public class AudioMixerOption extends AbstractOption<AudioMixerOption.MixerWrapp
     @Override
     protected void setValue(String valueString, String defaultValueString) {
         MixerWrapper mw = null;
-        if (mw == null && valueString != null) {
+        if (valueString != null) {
             mw = getMixerWrapperByName(valueString);
         }
         if (mw == null && defaultValueString != null) {
diff --git a/src/net/sf/freecol/common/option/LanguageOption.java b/src/net/sf/freecol/common/option/LanguageOption.java
index cb56a282c..a659628f2 100644
--- a/src/net/sf/freecol/common/option/LanguageOption.java
+++ b/src/net/sf/freecol/common/option/LanguageOption.java
@@ -273,7 +273,7 @@ public class LanguageOption extends AbstractOption<LanguageOption.Language> {
     @Override
     protected void setValue(String valueString, String defaultValueString) {
         Language l = null;
-        if (l == null && valueString != null) {
+        if (valueString != null) {
             l = getLanguage(valueString);
         }
         if (l == null && defaultValueString != null) {
diff --git a/src/net/sf/freecol/metaserver/MetaRegister.java b/src/net/sf/freecol/metaserver/MetaRegister.java
index 72f96464c..d4cb52776 100644
--- a/src/net/sf/freecol/metaserver/MetaRegister.java
+++ b/src/net/sf/freecol/metaserver/MetaRegister.java
@@ -150,13 +150,9 @@ public final class MetaRegister {
             try {
                 mc = new Connection(newSi.getAddress(), newSi.getPort(),
                                     FreeCol.METASERVER_THREAD);
-                if (mc == null) {
-                    logger.info("Server not found: " + identity);
-                } else {
-                    items.add(newSi);
-                    logger.info("Server added:" + identity);
-                    mc.startReceiving();
-                }
+                items.add(newSi);
+                logger.info("Server added:" + identity);
+                mc.startReceiving();
             } catch (IOException ioe) {
                 logger.log(Level.WARNING, "Server fail: " + identity, ioe);
             }
diff --git a/src/net/sf/freecol/server/ai/ColonyPlan.java b/src/net/sf/freecol/server/ai/ColonyPlan.java
index 34a4542a2..17e370ed9 100644
--- a/src/net/sf/freecol/server/ai/ColonyPlan.java
+++ b/src/net/sf/freecol/server/ai/ColonyPlan.java
@@ -1075,7 +1075,6 @@ public class ColonyPlan {
         // Use the unit with the least skill, in the hope that
         // remaining experts will be called upon in due course.
         int worstSkill = Integer.MAX_VALUE;
-        special = null;
         for (Unit u : todo) {
             if (u.getType().getSkill() < worstSkill) {
                 special = u;
diff --git a/src/net/sf/freecol/server/ai/mission/TransportMission.java b/src/net/sf/freecol/server/ai/mission/TransportMission.java
index b2462eb4f..da3573fe7 100644
--- a/src/net/sf/freecol/server/ai/mission/TransportMission.java
+++ b/src/net/sf/freecol/server/ai/mission/TransportMission.java
@@ -512,7 +512,6 @@ public final class TransportMission extends Mission {
                             path.getLastNode().getLocation(), true);
                     } catch (FreeColException fce) {
                         reason = fce.getMessage();
-                        cargo = null;
                     }
                 }
             }
@@ -524,7 +523,6 @@ public final class TransportMission extends Mission {
                 cargo = Cargo.newCargo(t, carrier);
             } catch (FreeColException fce) {
                 reason = fce.getMessage();
-                cargo = null;
             }
         }
         if (reason == null) {
diff --git a/test/src/net/sf/freecol/common/model/BuildingTest.java b/test/src/net/sf/freecol/common/model/BuildingTest.java
index 88b9ba0af..be1c42469 100644
--- a/test/src/net/sf/freecol/common/model/BuildingTest.java
+++ b/test/src/net/sf/freecol/common/model/BuildingTest.java
@@ -993,20 +993,18 @@ public class BuildingTest extends FreeColTestCase {
                         ut -> (building.getType().canAdd(ut)
                             && ut.isAvailableTo(colony.getOwner())))) {
                     unit.changeType(type);
-                    if (output != null) {
-                        int productivity = building.getUnitProduction(unit, outputType);
-                        int expect = (type == building.getExpertUnitType()) ? 6
-                            : (type == indenturedServantType) ? 2
-                            : (type == indianConvertType) ? 1
-                            : (type == pettyCriminalType) ? 1
-                            : output.getAmount();
-                        if (expect != output.getAmount()) {
-                            assertTrue("Modifiers expected",
-                                count(type.getModifiers(outputType.getId())) > 0);
-                        }
-                        assertEquals("Wrong productivity for " + type
-                            + " in " + building, expect, productivity);
+                    int productivity = building.getUnitProduction(unit, outputType);
+                    int expect = (type == building.getExpertUnitType()) ? 6
+                        : (type == indenturedServantType) ? 2
+                        : (type == indianConvertType) ? 1
+                        : (type == pettyCriminalType) ? 1
+                        : output.getAmount();
+                    if (expect != output.getAmount()) {
+                        assertTrue("Modifiers expected",
+                            count(type.getModifiers(outputType.getId())) > 0);
                     }
+                    assertEquals("Wrong productivity for " + type
+                        + " in " + building, expect, productivity);
                 }
             }
         }
diff --git a/test/src/net/sf/freecol/common/model/TileTest.java b/test/src/net/sf/freecol/common/model/TileTest.java
index 2959ab707..b7f887f9d 100644
--- a/test/src/net/sf/freecol/common/model/TileTest.java
+++ b/test/src/net/sf/freecol/common/model/TileTest.java
@@ -425,7 +425,7 @@ public class TileTest extends FreeColTestCase {
             if (!ct.getWorkTile().hasRoad()) {
                 if (colonyTile1 == null) {
                     colonyTile1 = ct;
-                } else if (colonyTile2 == null) {
+                } else {
                     colonyTile2 = ct;
                     break;
                 }
diff --git a/test/src/net/sf/freecol/util/test/FreeColTestCase.java b/test/src/net/sf/freecol/util/test/FreeColTestCase.java
index 35c9c286d..691ccabce 100644
--- a/test/src/net/sf/freecol/util/test/FreeColTestCase.java
+++ b/test/src/net/sf/freecol/util/test/FreeColTestCase.java
@@ -602,9 +602,6 @@ public class FreeColTestCase extends TestCase {
             for (int i = 0; i < initialBravesInCamp; i++) {
                 Unit brave = new ServerUnit(game, camp, indianPlayer,
                                             indianBraveType);
-                if (brave == null) {
-                    throw new RuntimeException("Null brave");
-                }
                 camp.addOwnedUnit(brave);
             }
             camp.placeSettlement(true);
