mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[wpilibj] Consistently use ErrorMessages.requireNonNullParam (#4776)
Also remove wpilibj version of ErrorMessages and consistently use static import.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj;
|
||||
|
||||
import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam;
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj;
|
||||
|
||||
import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam;
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.hal.AnalogGyroJNI;
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj;
|
||||
|
||||
import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam;
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.hal.AnalogJNI;
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj;
|
||||
|
||||
import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam;
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj;
|
||||
|
||||
import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam;
|
||||
import static java.util.Objects.requireNonNull;
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.hal.CounterJNI;
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
@@ -279,7 +278,7 @@ public class Counter implements CounterBase, Sendable, AutoCloseable {
|
||||
* @param source the digital source to count
|
||||
*/
|
||||
public void setDownSource(DigitalSource source) {
|
||||
requireNonNull(source, "The Digital Source given was null");
|
||||
requireNonNullParam(source, "source", "setDownSource");
|
||||
|
||||
if (m_downSource != null && m_allocatedDownSource) {
|
||||
m_downSource.close();
|
||||
@@ -312,7 +311,9 @@ public class Counter implements CounterBase, Sendable, AutoCloseable {
|
||||
* @param fallingEdge true to count the falling edge
|
||||
*/
|
||||
public void setDownSourceEdge(boolean risingEdge, boolean fallingEdge) {
|
||||
requireNonNull(m_downSource, "Down Source must be set before setting the edge!");
|
||||
if (m_downSource == null) {
|
||||
throw new IllegalStateException("Down Source must be set before setting the edge!");
|
||||
}
|
||||
|
||||
CounterJNI.setCounterDownSourceEdge(m_counter, risingEdge, fallingEdge);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj;
|
||||
|
||||
import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam;
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.hal.EncoderJNI;
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj;
|
||||
|
||||
import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam;
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.hal.NotifierJNI;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
@@ -81,7 +81,7 @@ public class Notifier implements AutoCloseable {
|
||||
* or StartPeriodic.
|
||||
*/
|
||||
public Notifier(Runnable run) {
|
||||
requireNonNull(run);
|
||||
requireNonNullParam(run, "run", "Notifier");
|
||||
|
||||
m_handler = run;
|
||||
m_notifier.set(NotifierJNI.initializeNotifier());
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj;
|
||||
|
||||
import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam;
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj;
|
||||
|
||||
import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam;
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj;
|
||||
|
||||
import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam;
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.hal.InterruptJNI;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
@@ -142,8 +142,8 @@ public class Ultrasonic implements Sendable, AutoCloseable {
|
||||
* @param echoChannel The digital input object that times the return pulse to determine the range.
|
||||
*/
|
||||
public Ultrasonic(DigitalOutput pingChannel, DigitalInput echoChannel) {
|
||||
requireNonNull(pingChannel, "Provided ping channel was null");
|
||||
requireNonNull(echoChannel, "Provided echo channel was null");
|
||||
requireNonNullParam(pingChannel, "pingChannel", "Ultrasonic");
|
||||
requireNonNullParam(echoChannel, "echoChannel", "Ultrasonic");
|
||||
|
||||
m_allocatedChannels = false;
|
||||
m_pingChannel = pingChannel;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj.counter;
|
||||
|
||||
import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam;
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.hal.CounterJNI;
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj.counter;
|
||||
|
||||
import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam;
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.hal.CounterJNI;
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj.drive;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tInstances;
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
@@ -129,8 +129,8 @@ public class DifferentialDrive extends RobotDriveBase implements Sendable, AutoC
|
||||
* @param rightMotor Right motor.
|
||||
*/
|
||||
public DifferentialDrive(MotorController leftMotor, MotorController rightMotor) {
|
||||
requireNonNull(leftMotor, "Left motor cannot be null");
|
||||
requireNonNull(rightMotor, "Right motor cannot be null");
|
||||
requireNonNullParam(leftMotor, "leftMotor", "DifferentialDrive");
|
||||
requireNonNullParam(rightMotor, "rightMotor", "DifferentialDrive");
|
||||
|
||||
m_leftMotor = leftMotor;
|
||||
m_rightMotor = rightMotor;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj.drive;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tInstances;
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
@@ -109,10 +109,10 @@ public class MecanumDrive extends RobotDriveBase implements Sendable, AutoClosea
|
||||
MotorController rearLeftMotor,
|
||||
MotorController frontRightMotor,
|
||||
MotorController rearRightMotor) {
|
||||
requireNonNull(frontLeftMotor, "Front-left motor cannot be null");
|
||||
requireNonNull(rearLeftMotor, "Rear-left motor cannot be null");
|
||||
requireNonNull(frontRightMotor, "Front-right motor cannot be null");
|
||||
requireNonNull(rearRightMotor, "Rear-right motor cannot be null");
|
||||
requireNonNullParam(frontLeftMotor, "frontLeftMotor", "MecanumDrive");
|
||||
requireNonNullParam(rearLeftMotor, "rearLeftMotor", "MecanumDrive");
|
||||
requireNonNullParam(frontRightMotor, "frontRightMotor", "MecanumDrive");
|
||||
requireNonNullParam(rearRightMotor, "rearRightMotor", "MecanumDrive");
|
||||
|
||||
m_frontLeftMotor = frontLeftMotor;
|
||||
m_rearLeftMotor = rearLeftMotor;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj.event;
|
||||
|
||||
import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam;
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.networktables.BooleanSubscriber;
|
||||
import edu.wpi.first.networktables.BooleanTopic;
|
||||
|
||||
@@ -4,20 +4,20 @@
|
||||
|
||||
package edu.wpi.first.wpilibj.shuffleboard;
|
||||
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.networktables.GenericPublisher;
|
||||
import edu.wpi.first.networktables.NetworkTableEntry;
|
||||
import edu.wpi.first.networktables.NetworkTableType;
|
||||
import edu.wpi.first.util.function.FloatSupplier;
|
||||
import edu.wpi.first.util.sendable.Sendable;
|
||||
import edu.wpi.first.util.sendable.SendableRegistry;
|
||||
import edu.wpi.first.wpilibj.util.ErrorMessages;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.BooleanSupplier;
|
||||
@@ -58,7 +58,7 @@ final class ContainerHelper {
|
||||
}
|
||||
|
||||
ComplexWidget add(String title, Sendable sendable) {
|
||||
ErrorMessages.requireNonNullParam(sendable, "sendable", "add");
|
||||
requireNonNullParam(sendable, "sendable", "add");
|
||||
checkTitle(title);
|
||||
ComplexWidget widget = new ComplexWidget(m_container, title, sendable);
|
||||
m_components.add(widget);
|
||||
@@ -66,7 +66,7 @@ final class ContainerHelper {
|
||||
}
|
||||
|
||||
ComplexWidget add(Sendable sendable) {
|
||||
ErrorMessages.requireNonNullParam(sendable, "sendable", "add");
|
||||
requireNonNullParam(sendable, "sendable", "add");
|
||||
String name = SendableRegistry.getName(sendable);
|
||||
if (name.isEmpty()) {
|
||||
throw new IllegalArgumentException("Sendable must have a name");
|
||||
@@ -75,13 +75,13 @@ final class ContainerHelper {
|
||||
}
|
||||
|
||||
SimpleWidget add(String title, Object defaultValue) {
|
||||
Objects.requireNonNull(defaultValue, "Default value cannot be null");
|
||||
requireNonNullParam(defaultValue, "defaultValue", "add");
|
||||
return add(title, NetworkTableType.getStringFromObject(defaultValue), defaultValue);
|
||||
}
|
||||
|
||||
SimpleWidget add(String title, String typeString, Object defaultValue) {
|
||||
Objects.requireNonNull(title, "Title cannot be null");
|
||||
Objects.requireNonNull(defaultValue, "Default value cannot be null");
|
||||
requireNonNullParam(title, "title", "add");
|
||||
requireNonNullParam(defaultValue, "defaultValue", "add");
|
||||
checkTitle(title);
|
||||
checkNtType(defaultValue);
|
||||
|
||||
@@ -92,56 +92,58 @@ final class ContainerHelper {
|
||||
}
|
||||
|
||||
SuppliedValueWidget<String> addString(String title, Supplier<String> valueSupplier) {
|
||||
precheck(title, valueSupplier);
|
||||
precheck(title, valueSupplier, "addString");
|
||||
return addSupplied(title, "string", valueSupplier, GenericPublisher::setString);
|
||||
}
|
||||
|
||||
SuppliedValueWidget<Double> addNumber(String title, DoubleSupplier valueSupplier) {
|
||||
requireNonNullParam(title, "title", "addNumber");
|
||||
requireNonNullParam(valueSupplier, "valueSupplier", "addNumber");
|
||||
return addDouble(title, valueSupplier);
|
||||
}
|
||||
|
||||
SuppliedValueWidget<Double> addDouble(String title, DoubleSupplier valueSupplier) {
|
||||
precheck(title, valueSupplier);
|
||||
precheck(title, valueSupplier, "addDouble");
|
||||
return addSupplied(title, "double", valueSupplier::getAsDouble, GenericPublisher::setDouble);
|
||||
}
|
||||
|
||||
SuppliedValueWidget<Float> addFloat(String title, FloatSupplier valueSupplier) {
|
||||
precheck(title, valueSupplier);
|
||||
precheck(title, valueSupplier, "addFloat");
|
||||
return addSupplied(title, "float", valueSupplier::getAsFloat, GenericPublisher::setFloat);
|
||||
}
|
||||
|
||||
SuppliedValueWidget<Long> addInteger(String title, LongSupplier valueSupplier) {
|
||||
precheck(title, valueSupplier);
|
||||
precheck(title, valueSupplier, "addInteger");
|
||||
return addSupplied(title, "int", valueSupplier::getAsLong, GenericPublisher::setInteger);
|
||||
}
|
||||
|
||||
SuppliedValueWidget<Boolean> addBoolean(String title, BooleanSupplier valueSupplier) {
|
||||
precheck(title, valueSupplier);
|
||||
precheck(title, valueSupplier, "addBoolean");
|
||||
return addSupplied(title, "boolean", valueSupplier::getAsBoolean, GenericPublisher::setBoolean);
|
||||
}
|
||||
|
||||
SuppliedValueWidget<String[]> addStringArray(String title, Supplier<String[]> valueSupplier) {
|
||||
precheck(title, valueSupplier);
|
||||
precheck(title, valueSupplier, "addStringArray");
|
||||
return addSupplied(title, "string[]", valueSupplier, GenericPublisher::setStringArray);
|
||||
}
|
||||
|
||||
SuppliedValueWidget<double[]> addDoubleArray(String title, Supplier<double[]> valueSupplier) {
|
||||
precheck(title, valueSupplier);
|
||||
precheck(title, valueSupplier, "addDoubleArray");
|
||||
return addSupplied(title, "double[]", valueSupplier, GenericPublisher::setDoubleArray);
|
||||
}
|
||||
|
||||
SuppliedValueWidget<float[]> addFloatArray(String title, Supplier<float[]> valueSupplier) {
|
||||
precheck(title, valueSupplier);
|
||||
precheck(title, valueSupplier, "addFloatArray");
|
||||
return addSupplied(title, "float[]", valueSupplier, GenericPublisher::setFloatArray);
|
||||
}
|
||||
|
||||
SuppliedValueWidget<long[]> addIntegerArray(String title, Supplier<long[]> valueSupplier) {
|
||||
precheck(title, valueSupplier);
|
||||
precheck(title, valueSupplier, "addIntegerArray");
|
||||
return addSupplied(title, "int[]", valueSupplier, GenericPublisher::setIntegerArray);
|
||||
}
|
||||
|
||||
SuppliedValueWidget<boolean[]> addBooleanArray(String title, Supplier<boolean[]> valueSupplier) {
|
||||
precheck(title, valueSupplier);
|
||||
precheck(title, valueSupplier, "addBooleanArray");
|
||||
return addSupplied(title, "boolean[]", valueSupplier, GenericPublisher::setBooleanArray);
|
||||
}
|
||||
|
||||
@@ -151,13 +153,13 @@ final class ContainerHelper {
|
||||
|
||||
SuppliedValueWidget<byte[]> addRaw(
|
||||
String title, String typeString, Supplier<byte[]> valueSupplier) {
|
||||
precheck(title, valueSupplier);
|
||||
precheck(title, valueSupplier, "addRaw");
|
||||
return addSupplied(title, typeString, valueSupplier, GenericPublisher::setRaw);
|
||||
}
|
||||
|
||||
private void precheck(String title, Object valueSupplier) {
|
||||
Objects.requireNonNull(title, "Title cannot be null");
|
||||
Objects.requireNonNull(valueSupplier, "Value supplier cannot be null");
|
||||
private void precheck(String title, Object valueSupplier, String methodName) {
|
||||
requireNonNullParam(title, "title", methodName);
|
||||
requireNonNullParam(valueSupplier, "valueSupplier", methodName);
|
||||
checkTitle(title);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
package edu.wpi.first.wpilibj.shuffleboard;
|
||||
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.cscore.VideoSource;
|
||||
import edu.wpi.first.networktables.NetworkTable;
|
||||
import edu.wpi.first.networktables.NetworkTableInstance;
|
||||
@@ -112,8 +114,8 @@ public final class SendableCameraWrapper implements Sendable, AutoCloseable {
|
||||
return m_wrappers.get(cameraName);
|
||||
}
|
||||
|
||||
Objects.requireNonNull(cameraName, "cameraName");
|
||||
Objects.requireNonNull(cameraUrls, "cameraUrls");
|
||||
requireNonNullParam(cameraName, "cameraName", "wrap");
|
||||
requireNonNullParam(cameraUrls, "cameraUrls", "wrap");
|
||||
if (cameraName.isEmpty()) {
|
||||
throw new IllegalArgumentException("Camera name not specified");
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj.shuffleboard;
|
||||
|
||||
import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam;
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.networktables.NetworkTable;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj.shuffleboard;
|
||||
|
||||
import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam;
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj.shuffleboard;
|
||||
|
||||
import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam;
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.networktables.NetworkTable;
|
||||
import edu.wpi.first.util.function.FloatSupplier;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj.smartdashboard;
|
||||
|
||||
import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam;
|
||||
import static edu.wpi.first.util.ErrorMessages.requireNonNullParam;
|
||||
|
||||
import edu.wpi.first.networktables.IntegerPublisher;
|
||||
import edu.wpi.first.networktables.IntegerTopic;
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.util;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
/** Utility class for common WPILib error messages. */
|
||||
public final class ErrorMessages {
|
||||
/** Utility class, so constructor is private. */
|
||||
private ErrorMessages() {
|
||||
throw new UnsupportedOperationException("This is a utility class!");
|
||||
}
|
||||
|
||||
/**
|
||||
* Requires that a parameter of a method not be null; prints an error message with helpful
|
||||
* debugging instructions if the parameter is null.
|
||||
*
|
||||
* @param <T> Type of object.
|
||||
* @param obj The parameter that must not be null.
|
||||
* @param paramName The name of the parameter.
|
||||
* @param methodName The name of the method.
|
||||
* @return The object parameter confirmed not to be null.
|
||||
*/
|
||||
public static <T> T requireNonNullParam(T obj, String paramName, String methodName) {
|
||||
return requireNonNull(
|
||||
obj,
|
||||
"Parameter "
|
||||
+ paramName
|
||||
+ " in method "
|
||||
+ methodName
|
||||
+ " was null when it"
|
||||
+ " should not have been! Check the stacktrace to find the responsible line of code - "
|
||||
+ "usually, it is the first line of user-written code indicated in the stacktrace. "
|
||||
+ "Make sure all objects passed to the method in question were properly initialized -"
|
||||
+ " note that this may not be obvious if it is being called under "
|
||||
+ "dynamically-changing conditions! Please do not seek additional technical assistance"
|
||||
+ " without doing this first!");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user