From b5cd08c1173650f62307f971dce5d4bf53100611 Mon Sep 17 00:00:00 2001 From: oh-yes-0-fps Date: Tue, 7 Jan 2025 14:44:53 -0500 Subject: [PATCH] fixed formatting and checkstyle --- .../wpilibj/smartdashboard/SmartDashboard.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SmartDashboard.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SmartDashboard.java index 5c69406ee63..97f19f3a159 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SmartDashboard.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SmartDashboard.java @@ -504,7 +504,7 @@ public static byte[] getRaw(String key, byte[] defaultValue) { /** * Put a value with units in the table. - * + * * @param key the key to be assigned to * @param value the value that will be assigned * @return False if the table key already exists with a different type @@ -515,7 +515,7 @@ public static boolean putMeasure(String key, Measure value, return false; } String publishedUnitSymbol = entry.getTopic().getProperty("unit"); - if (publishedUnitSymbol == "null") { + if (publishedUnitSymbol.equals("null")) { entry.getTopic().setProperty("unit", unit.symbol()); } else if (!publishedUnitSymbol.equals(unit.symbol())) { return false; @@ -526,7 +526,7 @@ public static boolean putMeasure(String key, Measure value, /** * Put a value with units in the table. - * + * * @param key the key to be assigned to * @param value the value that will be assigned * @return False if the table key already exists with a different type @@ -536,13 +536,13 @@ public static boolean putMeasure(String key, Measure value) } /** - * Returns the value with units the key maps to. If the key does not exist or is of different type, - * it will return the default value. - * + * Returns the value with units the key maps to. If the key does not exist or is of different + * type, it will return the default value. + * * @param key the key to look up * @param defaultValue the value to be returned if no value is found * @return the value associated with the given key or the given default value if there is no value - * associated with the key + * associated with the key */ @SuppressWarnings("unchecked") public static Measure getMeasure(String key, Measure defaultValue) { @@ -551,7 +551,7 @@ public static Measure getMeasure(String key, Measure defa return defaultValue; } String publishedUnitSymbol = entry.getTopic().getProperty("unit"); - if (publishedUnitSymbol == "null") { + if (publishedUnitSymbol.equals("null")) { return defaultValue; } U unit = defaultValue.baseUnit();