Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Starlight220 committed Mar 29, 2023
1 parent 3eb0daa commit 806afc7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ public Optional<String> preferredWidget() {
}

private static Optional<String> loadWidgetFromWidgetEntry(NetworkTable table) {
return Optional.ofNullable(table.getValue(".widget")).filter(NetworkTableValue::isString).map(NetworkTableValue::getString);
return Optional.ofNullable(table.getValue(".widget"))
.filter(NetworkTableValue::isString)
.map(NetworkTableValue::getString);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ private static Optional<String> loadWidgetFromTopicProps(Topic topic) {
JsonObject obj = parser.parse(metadata).getAsJsonObject();
JsonElement widgetProp = obj.get("widget");
if (widgetProp == null || !widgetProp.isJsonPrimitive()) {
System.err.println("Metadata widget field for topic `" + topic.getName() + "` doesn't exist or isn't primitive!");
System.err.println("Metadata widget field for topic `" + topic.getName()
+ "` doesn't exist or isn't primitive!");
return Optional.empty();
}
return Optional.of(widgetProp.getAsString());
Expand Down

0 comments on commit 806afc7

Please sign in to comment.