Skip to content

Commit

Permalink
Cleanup imports
Browse files Browse the repository at this point in the history
  • Loading branch information
srimanachanta committed Oct 13, 2023
1 parent 893aa1e commit 1992d6d
Show file tree
Hide file tree
Showing 289 changed files with 724 additions and 949 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,11 @@

package edu.wpi.first.cameraserver;

import edu.wpi.first.cscore.AxisCamera;
import edu.wpi.first.cscore.CameraServerJNI;
import edu.wpi.first.cscore.CvSink;
import edu.wpi.first.cscore.CvSource;
import edu.wpi.first.cscore.MjpegServer;
import edu.wpi.first.cscore.UsbCamera;
import edu.wpi.first.cscore.VideoEvent;
import edu.wpi.first.cscore.VideoException;
import edu.wpi.first.cscore.VideoListener;
import edu.wpi.first.cscore.VideoMode;
import edu.wpi.first.cscore.*;
import edu.wpi.first.cscore.VideoMode.PixelFormat;
import edu.wpi.first.cscore.VideoSink;
import edu.wpi.first.cscore.VideoSource;
import edu.wpi.first.networktables.BooleanEntry;
import edu.wpi.first.networktables.BooleanPublisher;
import edu.wpi.first.networktables.IntegerEntry;
import edu.wpi.first.networktables.IntegerPublisher;
import edu.wpi.first.networktables.NetworkTable;
import edu.wpi.first.networktables.NetworkTableInstance;
import edu.wpi.first.networktables.StringArrayPublisher;
import edu.wpi.first.networktables.StringArrayTopic;
import edu.wpi.first.networktables.StringEntry;
import edu.wpi.first.networktables.StringPublisher;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import edu.wpi.first.networktables.*;

import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
package edu.wpi.first.cscore;

import edu.wpi.first.util.RuntimeLoader;
import org.opencv.core.Core;

import java.io.IOException;
import java.util.concurrent.atomic.AtomicBoolean;
import org.opencv.core.Core;

public class CameraServerCvJNI {
static boolean libraryLoaded = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import edu.wpi.first.cscore.raw.RawFrame;
import edu.wpi.first.util.RuntimeLoader;

import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.concurrent.atomic.AtomicBoolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package edu.wpi.first.cscore.raw;

import edu.wpi.first.cscore.CameraServerJNI;

import java.nio.ByteBuffer;

/**
Expand Down
13 changes: 6 additions & 7 deletions cscore/src/test/java/edu/wpi/first/cscore/UsbCameraTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@

package edu.wpi.first.cscore;

import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTimeoutPreemptively;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;

import java.time.Duration;
import java.util.Arrays;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;

import static org.junit.jupiter.api.Assertions.*;

class UsbCameraTest {
@Nested
Expand Down
4 changes: 2 additions & 2 deletions cscore/src/test/java/edu/wpi/first/cscore/VideoModeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

package edu.wpi.first.cscore;

import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;

import org.junit.jupiter.api.Test;

class VideoModeTest {
@Test
void equalityTest() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@

package edu.wpi.first.networktables;

import java.util.ArrayList;
import java.util.EnumSet;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.function.Consumer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,19 @@

package edu.wpi.first.networktables;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNotSame;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;

import edu.wpi.first.util.WPIUtilJNI;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;

import static org.junit.jupiter.api.Assertions.*;

class ConnectionListenerTest {
private NetworkTableInstance m_serverInst;
private NetworkTableInstance m_clientInst;
Expand Down
11 changes: 6 additions & 5 deletions ntcore/src/test/java/edu/wpi/first/networktables/LoggerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@

package edu.wpi.first.networktables;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.fail;

import java.util.ArrayList;
import java.util.List;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.util.ArrayList;
import java.util.List;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.fail;

class LoggerTest {
private NetworkTableInstance m_clientInst;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@

package edu.wpi.first.networktables;

import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Stream;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;

import static org.junit.jupiter.api.Assertions.assertEquals;

class NetworkTableTest {
private static Stream<Arguments> basenameKeyArguments() {
Expand Down
7 changes: 4 additions & 3 deletions ntcore/src/test/java/edu/wpi/first/networktables/RawTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@

package edu.wpi.first.networktables;

import java.nio.ByteBuffer;
import java.util.Arrays;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;
import java.nio.ByteBuffer;

import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;

@SuppressWarnings("PMD.SimplifiableTestAssertion")
class RawTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@

package edu.wpi.first.networktables;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.util.EnumSet;
import java.util.concurrent.atomic.AtomicInteger;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.util.EnumSet;
import java.util.concurrent.atomic.AtomicInteger;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

class TableListenerTest {
private NetworkTableInstance m_inst;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@

package edu.wpi.first.networktables;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;

class TimeSyncTest {
private NetworkTableInstance m_inst;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@

package edu.wpi.first.networktables;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;

import edu.wpi.first.util.WPIUtilJNI;
import java.util.EnumSet;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import java.util.EnumSet;

import static org.junit.jupiter.api.Assertions.*;

class TopicListenerTest {
private NetworkTableInstance m_serverInst;
private NetworkTableInstance m_clientInst;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
package edu.wpi.first.wpilibj;

// import java.lang.FdLibm.Pow;

import edu.wpi.first.hal.FRCNetComm.tResourceType;
import edu.wpi.first.hal.HAL;
import edu.wpi.first.hal.SimBoolean;
import edu.wpi.first.hal.SimDevice;
import edu.wpi.first.hal.SimDouble;
import edu.wpi.first.util.sendable.Sendable;
import edu.wpi.first.util.sendable.SendableBuilder;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import edu.wpi.first.networktables.NTSendable;
import edu.wpi.first.networktables.NTSendableBuilder;
import edu.wpi.first.util.sendable.SendableRegistry;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import edu.wpi.first.networktables.NTSendable;
import edu.wpi.first.networktables.NTSendableBuilder;
import edu.wpi.first.util.sendable.SendableRegistry;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;

Expand Down
1 change: 1 addition & 0 deletions wpilibj/src/main/java/edu/wpi/first/wpilibj/ADXL362.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import edu.wpi.first.networktables.NTSendable;
import edu.wpi.first.networktables.NTSendableBuilder;
import edu.wpi.first.util.sendable.SendableRegistry;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import edu.wpi.first.util.sendable.Sendable;
import edu.wpi.first.util.sendable.SendableBuilder;
import edu.wpi.first.util.sendable.SendableRegistry;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

package edu.wpi.first.wpilibj;

import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;

import edu.wpi.first.hal.FRCNetComm.tResourceType;
import edu.wpi.first.hal.HAL;
import edu.wpi.first.util.sendable.Sendable;
import edu.wpi.first.util.sendable.SendableBuilder;
import edu.wpi.first.util.sendable.SendableRegistry;

import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;

/**
* Handle operation of an analog accelerometer. The accelerometer reads acceleration directly
* through the sensor. Many sensors have multiple axis and can be treated as multiple devices. Each
Expand Down
4 changes: 2 additions & 2 deletions wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogGyro.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

package edu.wpi.first.wpilibj;

import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;

import edu.wpi.first.hal.AnalogGyroJNI;
import edu.wpi.first.hal.FRCNetComm.tResourceType;
import edu.wpi.first.hal.HAL;
Expand All @@ -14,6 +12,8 @@
import edu.wpi.first.util.sendable.SendableBuilder;
import edu.wpi.first.util.sendable.SendableRegistry;

import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;

/**
* Use a rate gyro to return the robots heading relative to a starting position. The Gyro class
* tracks the robots heading based on the starting position. As the robot rotates the new heading is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

package edu.wpi.first.wpilibj;

import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;

import edu.wpi.first.hal.AnalogJNI;
import edu.wpi.first.hal.FRCNetComm.tResourceType;
import edu.wpi.first.hal.HAL;
import edu.wpi.first.util.sendable.Sendable;
import edu.wpi.first.util.sendable.SendableBuilder;

import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;

/**
* Class to represent a specific output from an analog trigger. This class is used to get the
* current output value and also as a DigitalSource to provide routing of an output to digital
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

package edu.wpi.first.wpilibj;

import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;

import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.BiConsumer;

import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;

/**
* Class for handling asynchronous interrupts using a callback thread.
*
Expand Down
1 change: 1 addition & 0 deletions wpilibj/src/main/java/edu/wpi/first/wpilibj/CAN.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import edu.wpi.first.hal.CANData;
import edu.wpi.first.hal.FRCNetComm.tResourceType;
import edu.wpi.first.hal.HAL;

import java.io.Closeable;

/**
Expand Down
Loading

0 comments on commit 1992d6d

Please sign in to comment.