diff --git a/console/systems/common/src/main/java/tech/uom/demo/systems/common/ThePerfectStorm.java b/console/systems/common/src/main/java/tech/uom/demo/systems/common/ThePerfectStorm.java index 1a6c0247..b2fd1900 100644 --- a/console/systems/common/src/main/java/tech/uom/demo/systems/common/ThePerfectStorm.java +++ b/console/systems/common/src/main/java/tech/uom/demo/systems/common/ThePerfectStorm.java @@ -114,7 +114,8 @@ public static void main(String[] args) { scale = STD; } - if (scale !=null) { + if (scale != null) { + // If the wind scale has a maximum we take that assuming the worst case, otherwise the minimum final Quantity metricSpeed = scale.hasMaximum() ? scale.getMaximum().to(KILOMETRE_PER_HOUR) : scale.getMinimum().to(KILOMETRE_PER_HOUR); @@ -122,10 +123,10 @@ public static void main(String[] args) { System.out.print(metricSpeed); System.out.println(" (" + Messages.getString("SaffirSimpsonHurricaneWindScale." + scale.getCategory(), true) + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - Quantity l = Quantities.getQuantity(500, KILO(METRE)); - System.out.println(String.format(Messages.getString("ThePerfectStorm.1"), l)); //$NON-NLS-1$ + final Quantity distance = Quantities.getQuantity(500, KILO(METRE)); + System.out.println(String.format(Messages.getString("ThePerfectStorm.1"), distance)); //$NON-NLS-1$ - Quantity