Skip to content

Commit 132ad8a

Browse files
committed
fix typos
1 parent 432cd16 commit 132ad8a

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/main/java/org/carlmontrobotics/lib199/Mocks.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public final class Mocks {
2424
private static final List<WeakReference<Object>> MOCKS = Collections.synchronizedList(new ArrayList<>());
2525
private static final Predicate<WeakReference<?>> IS_REFERENCE_CLEARED = reference -> reference.get() == null;
2626
private static final Consumer<WeakReference<Object>> CLEAR_INVOCATIONS_ON_REFERENCED_MOCK = reference -> Mockito.clearInvocations(reference.get());
27-
private static final Predicate<WeakReference<Object>> CLEAR_INVOCATIONS_ON_REFERENCED_MOCK_IF_REFERNCE_NOT_CLEARED = reference -> {
27+
private static final Predicate<WeakReference<Object>> CLEAR_INVOCATIONS_ON_REFERENCED_MOCK_IF_REFERENCE_NOT_CLEARED = reference -> {
2828
if(IS_REFERENCE_CLEARED.test(reference)) return true;
2929
CLEAR_INVOCATIONS_ON_REFERENCED_MOCK.accept(reference);
3030
return false;
@@ -37,7 +37,7 @@ public final class Mocks {
3737
// 2) Garbage collected references are removed
3838
// 3) Mock is garbage collected
3939
// 4) Mock invocations are cleared -> throws NullPointerException
40-
Lib199Subsystem.registerPeriodic(() -> MOCKS.removeIf(CLEAR_INVOCATIONS_ON_REFERENCED_MOCK_IF_REFERNCE_NOT_CLEARED));
40+
Lib199Subsystem.registerPeriodic(() -> MOCKS.removeIf(CLEAR_INVOCATIONS_ON_REFERENCED_MOCK_IF_REFERENCE_NOT_CLEARED));
4141
}
4242

4343
/**
@@ -61,7 +61,7 @@ public static <T, U> T createMock(Class<T> classToMock, U implClass, Class<?>...
6161
* @param <U> the class type which will be used to provide method implementations
6262
* @param classToMock the class type which will be mocked
6363
* @param implClass the object to which to try to forward method calls
64-
* @param forwardUnknownCalls whether methods which are not overriden will call their real methods
64+
* @param forwardUnknownCalls whether methods which are not overridden will call their real methods
6565
* @param interfaces a list of interfaces which the mocked object should extend
6666
* @return an instance of <code>T</code> in which some or all of the classes methods are replaced with a mocked implementation from <code>U</code>
6767
* @see #createMock(Class, Object, Class...)
@@ -77,7 +77,7 @@ public static <T, U> T createMock(Class<T> classToMock, U implClass, boolean for
7777
* @param <U> the class type which will be used to provide method implementations
7878
* @param classToMock the class type which will be mocked
7979
* @param implClass the object to which to try to forward method calls
80-
* @param defaultAnswer The answer to use when no overriden implementation is found
80+
* @param defaultAnswer The answer to use when no overridden implementation is found
8181
* @param interfaces a list of interfaces which the mocked object should extend
8282
* @return an instance of <code>T</code> in which some or all of the classes methods are replaced with a mocked implementation from <code>U</code>
8383
* @see #createMock(Class, Object, Class...)

src/main/java/org/carlmontrobotics/lib199/MotorControllerFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public static UsbCamera configureCamera() {
171171
}
172172

173173
/**
174-
* This method is equivilent to calling {@link #configureCamera()} {@code numCameras} times.
174+
* This method is equivalent to calling {@link #configureCamera()} {@code numCameras} times.
175175
* The last camera will be set as the primary Camera feed.
176176
* To change it, call {@code CameraServer.getServer().setSource()}.
177177
*

src/main/java/org/carlmontrobotics/lib199/MotorErrors.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ private static <T extends Enum<T>> void reportError(String vendor, T error, T ok
4747
if(error == null || error == ok) {
4848
return;
4949
}
50-
System.err.println("Error: " + error.name() + " occured while configuring " + vendor + " motor");
50+
System.err.println("Error: " + error.name() + " occurred while configuring " + vendor + " motor");
5151
System.err.println("Full stack trace:");
5252
StackTraceElement[] stack = Thread.currentThread().getStackTrace();
5353
System.err.println(Arrays.toString(stack));
5454
}
5555

5656
public static void checkSparkMaxErrors(CANSparkMax spark) {
57-
//Purposely obivously impersonal to differentiate from actual computer generated errors
57+
//Purposely obviously impersonal to differentiate from actual computer generated errors
5858
short faults = spark.getFaults();
5959
short stickyFaults = spark.getStickyFaults();
6060
short prevFaults = flags.containsKey(spark) ? flags.get(spark) : 0;
@@ -114,7 +114,7 @@ public static void doReportSparkMaxTemp() {
114114
temperatureSparks.forEach((port, spark) -> {
115115
double temp = spark.getMotorTemperature();
116116
SmartDashboard.putNumber("Port " + port + " Spark Max Temp", temp);
117-
// Check if temperature exceeds the setpoint or if the contoller has already overheated to prevent other code from resetting the current limit after the controller has cooled
117+
// Check if temperature exceeds the setpoint or if the controller has already overheated to prevent other code from resetting the current limit after the controller has cooled
118118
if(temp >= sparkTemperatureLimits.get(port) || overheatedSparks.contains(port)) {
119119
if(!overheatedSparks.contains(port)) {
120120
overheatedSparks.add(port);

0 commit comments

Comments
 (0)