From fc680f89299be36ef7389c25e0efdfdb9cf02723 Mon Sep 17 00:00:00 2001 From: Austin Shalit Date: Sat, 27 Aug 2016 13:30:12 -0400 Subject: [PATCH] Cleanup --- .../edu/wpi/grip/core/sources/NetworkTableEntrySource.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/edu/wpi/grip/core/sources/NetworkTableEntrySource.java b/core/src/main/java/edu/wpi/grip/core/sources/NetworkTableEntrySource.java index 98d6e7be21..9742a4392c 100644 --- a/core/src/main/java/edu/wpi/grip/core/sources/NetworkTableEntrySource.java +++ b/core/src/main/java/edu/wpi/grip/core/sources/NetworkTableEntrySource.java @@ -73,6 +73,10 @@ protected SocketHint createSocketHint() { public String toString() { return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name()); } + + public String toProperty() { + return toString().toUpperCase(); + } } @AssistedInject @@ -134,7 +138,7 @@ protected boolean updateOutputSockets() { public Properties getProperties() { Properties properties = new Properties(); properties.setProperty(PATH_PROPERTY, path); - properties.setProperty(TYPE_PROPERTY, type.toString().toUpperCase()); + properties.setProperty(TYPE_PROPERTY, type.toProperty()); return properties; }