Skip to content

Commit 65ab349

Browse files
authored
Fixes a bunch of compiler and PMD warnings (#820)
1 parent 8d3fa6c commit 65ab349

File tree

10 files changed

+12
-3
lines changed

10 files changed

+12
-3
lines changed

core/src/main/java/edu/wpi/grip/core/operations/network/NetworkPublisher.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,6 @@ protected final void checkNamePresent() {
6565
/**
6666
* Close the network publisher. This should not throw an exception.
6767
*/
68+
@Override
6869
public abstract void close();
6970
}

core/src/main/java/edu/wpi/grip/core/operations/network/NetworkReceiver.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ public NetworkReceiver(String path) {
3939
public abstract void addListener(Consumer<Object> consumer);
4040

4141
/**
42-
* Close the network reciever. This should not throw an exception.
42+
* Close the network receiver. This should not throw an exception.
4343
*/
44+
@Override
4445
public abstract void close();
4546
}

core/src/main/java/edu/wpi/grip/core/sockets/InputSocket.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public interface InputSocket<T> extends Socket<T> {
2525
/**
2626
* Should be only called by parent classes.
2727
*/
28+
@Override
2829
void onValueChanged();
2930

3031
interface Factory {

core/src/main/java/edu/wpi/grip/core/sockets/SocketHints.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ private SocketHints() { /* no op */ }
2626
@SuppressWarnings("unchecked")
2727
public static <T extends Enum<T>> SocketHint<T> createEnumSocketHint(final String identifier,
2828
final T defaultValue) {
29-
return new SocketHint.Builder(defaultValue.getClass())
29+
return new SocketHint.Builder(defaultValue.getDeclaringClass())
3030
.identifier(identifier).initialValue(defaultValue)
3131
.view(SocketHint.View.SELECT)
32-
.domain(defaultValue.getClass().getEnumConstants()).build();
32+
.domain(defaultValue.getDeclaringClass().getEnumConstants()).build();
3333
}
3434

3535
public static SocketHint<Number> createNumberSocketHint(

ui/src/main/java/edu/wpi/grip/ui/Main.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ public void start(Stage stage) throws IOException {
164164
}
165165
}
166166

167+
@Override
167168
public void stop() {
168169
SafeShutdown.flagStopping();
169170
}

ui/src/main/java/edu/wpi/grip/ui/OperationController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ public void addStep() {
8686
this.pipeline.addStep(stepFactory.create(operationMetaData));
8787
}
8888

89+
@Override
8990
public GridPane getRoot() {
9091
return root;
9192
}

ui/src/main/java/edu/wpi/grip/ui/pipeline/StepController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ public Collection<OutputSocketController> getOutputSockets() {
183183
return outputSocketMapManager.keySet();
184184
}
185185

186+
@Override
186187
public VBox getRoot() {
187188
return root;
188189
}

ui/src/main/java/edu/wpi/grip/ui/pipeline/input/NumberSpinnerInputSocketController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public class NumberSpinnerInputSocketController extends InputSocketController<Nu
5454
}
5555

5656
@FXML
57+
@Override
5758
protected void initialize() {
5859
super.initialize();
5960
final Spinner<Double> spinner = new Spinner<>(this.valueFactory);

ui/src/main/java/edu/wpi/grip/ui/pipeline/source/CameraSourceController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public final class CameraSourceController extends SourceController<CameraSource>
3131
}
3232

3333
@FXML
34+
@Override
3435
public void initialize() throws Exception {
3536
super.initialize();
3637
addControls(startStoppableButtonFactory.create(getSource()));

ui/src/main/java/edu/wpi/grip/ui/pipeline/source/SourceController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ public Collection<OutputSocketController> getOutputSockets() {
9191
return this.outputSocketMapManager.keySet();
9292
}
9393

94+
@Override
9495
public VBox getRoot() {
9596
return root;
9697
}

0 commit comments

Comments
 (0)