From e545e2599dd812d89f1fbb7b10d8ba6b7c794bdd Mon Sep 17 00:00:00 2001 From: Werner Keil Date: Tue, 20 Aug 2024 21:09:27 +0200 Subject: [PATCH] 408: Turn QuantityRange into a record for Java 17+ Task-Url: https://github.com/unitsofmeasurement/indriya/issues/408 --- .../java17/src/main/java/tech/uom/demo/java17/PersonDemo.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/console/java17/src/main/java/tech/uom/demo/java17/PersonDemo.java b/console/java17/src/main/java/tech/uom/demo/java17/PersonDemo.java index 90ee8ff..bf74a12 100644 --- a/console/java17/src/main/java/tech/uom/demo/java17/PersonDemo.java +++ b/console/java17/src/main/java/tech/uom/demo/java17/PersonDemo.java @@ -41,7 +41,8 @@ public class PersonDemo { public static void main(String[] args) { - var person1 = new Person("John", "Doe", getQuantity(1.8, METRE), getQuantity(80, KILOGRAM)); + var height = getQuantity(1.8, METRE); + var person1 = new Person("John", "Doe", height, getQuantity(80, KILOGRAM)); System.out.println(person1); System.out.println(person1.getFullName()); var min = getQuantity(50, KILOGRAM);