Skip to content

Commit

Permalink
Fixes a bunch of compiler and PMD warnings (#820)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamCarlberg authored Feb 10, 2017
1 parent 8d3fa6c commit 65ab349
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,6 @@ protected final void checkNamePresent() {
/**
* Close the network publisher. This should not throw an exception.
*/
@Override
public abstract void close();
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public NetworkReceiver(String path) {
public abstract void addListener(Consumer<Object> consumer);

/**
* Close the network reciever. This should not throw an exception.
* Close the network receiver. This should not throw an exception.
*/
@Override
public abstract void close();
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public interface InputSocket<T> extends Socket<T> {
/**
* Should be only called by parent classes.
*/
@Override
void onValueChanged();

interface Factory {
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/edu/wpi/grip/core/sockets/SocketHints.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ private SocketHints() { /* no op */ }
@SuppressWarnings("unchecked")
public static <T extends Enum<T>> SocketHint<T> createEnumSocketHint(final String identifier,
final T defaultValue) {
return new SocketHint.Builder(defaultValue.getClass())
return new SocketHint.Builder(defaultValue.getDeclaringClass())
.identifier(identifier).initialValue(defaultValue)
.view(SocketHint.View.SELECT)
.domain(defaultValue.getClass().getEnumConstants()).build();
.domain(defaultValue.getDeclaringClass().getEnumConstants()).build();
}

public static SocketHint<Number> createNumberSocketHint(
Expand Down
1 change: 1 addition & 0 deletions ui/src/main/java/edu/wpi/grip/ui/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ public void start(Stage stage) throws IOException {
}
}

@Override
public void stop() {
SafeShutdown.flagStopping();
}
Expand Down
1 change: 1 addition & 0 deletions ui/src/main/java/edu/wpi/grip/ui/OperationController.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public void addStep() {
this.pipeline.addStep(stepFactory.create(operationMetaData));
}

@Override
public GridPane getRoot() {
return root;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ public Collection<OutputSocketController> getOutputSockets() {
return outputSocketMapManager.keySet();
}

@Override
public VBox getRoot() {
return root;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class NumberSpinnerInputSocketController extends InputSocketController<Nu
}

@FXML
@Override
protected void initialize() {
super.initialize();
final Spinner<Double> spinner = new Spinner<>(this.valueFactory);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public final class CameraSourceController extends SourceController<CameraSource>
}

@FXML
@Override
public void initialize() throws Exception {
super.initialize();
addControls(startStoppableButtonFactory.create(getSource()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public Collection<OutputSocketController> getOutputSockets() {
return this.outputSocketMapManager.keySet();
}

@Override
public VBox getRoot() {
return root;
}
Expand Down

0 comments on commit 65ab349

Please sign in to comment.