diff --git a/docs/build.gradle b/docs/build.gradle index 546f23604d..8225c2fbfe 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -218,7 +218,6 @@ task generateJavaDocs(type: Javadoc) { options.addBooleanOption("Xdoclint/package:" + // TODO: v Document these, then remove them from the list "-edu.wpi.first.hal," + - "-edu.wpi.first.hal.can," + "-edu.wpi.first.hal.simulation," + // TODO: ^ Document these, then remove them from the list "-edu.wpi.first.math.proto," + diff --git a/hal/src/main/java/edu/wpi/first/hal/can/CANInvalidBufferException.java b/hal/src/main/java/edu/wpi/first/hal/can/CANInvalidBufferException.java index ef2fa0d3fa..a73372e4ed 100644 --- a/hal/src/main/java/edu/wpi/first/hal/can/CANInvalidBufferException.java +++ b/hal/src/main/java/edu/wpi/first/hal/can/CANInvalidBufferException.java @@ -11,10 +11,16 @@ package edu.wpi.first.hal.can; public class CANInvalidBufferException extends RuntimeException { private static final long serialVersionUID = -7993785672956997939L; + /** Constructs a new CANInvalidBufferException with no message. */ public CANInvalidBufferException() { super(); } + /** + * Constructs a new CANInvalidBufferException with {@code msg} as its detail message. + * + * @param msg the message + */ public CANInvalidBufferException(String msg) { super(msg); } diff --git a/hal/src/main/java/edu/wpi/first/hal/can/CANMessageNotAllowedException.java b/hal/src/main/java/edu/wpi/first/hal/can/CANMessageNotAllowedException.java index de7a70a859..138116a5dc 100644 --- a/hal/src/main/java/edu/wpi/first/hal/can/CANMessageNotAllowedException.java +++ b/hal/src/main/java/edu/wpi/first/hal/can/CANMessageNotAllowedException.java @@ -11,6 +11,11 @@ package edu.wpi.first.hal.can; public class CANMessageNotAllowedException extends RuntimeException { private static final long serialVersionUID = -638450112427013494L; + /** + * Constructs a new CANMessageNotAllowedException with {@code msg} as its detail message. + * + * @param msg the message + */ public CANMessageNotAllowedException(String msg) { super(msg); } diff --git a/hal/src/main/java/edu/wpi/first/hal/can/CANMessageNotFoundException.java b/hal/src/main/java/edu/wpi/first/hal/can/CANMessageNotFoundException.java index 39eab14a86..4c0215dfe9 100644 --- a/hal/src/main/java/edu/wpi/first/hal/can/CANMessageNotFoundException.java +++ b/hal/src/main/java/edu/wpi/first/hal/can/CANMessageNotFoundException.java @@ -11,10 +11,16 @@ package edu.wpi.first.hal.can; public class CANMessageNotFoundException extends RuntimeException { private static final long serialVersionUID = 8249780881928189975L; + /** Constructs a new CANMessageNotFoundException with no message. */ public CANMessageNotFoundException() { super(); } + /** + * Constructs a new CANMessageNotFoundException with {@code msg} as its detail message. + * + * @param msg the message + */ public CANMessageNotFoundException(String msg) { super(msg); } diff --git a/hal/src/main/java/edu/wpi/first/hal/can/CANNotInitializedException.java b/hal/src/main/java/edu/wpi/first/hal/can/CANNotInitializedException.java index 30f139d084..e2d478e0b9 100644 --- a/hal/src/main/java/edu/wpi/first/hal/can/CANNotInitializedException.java +++ b/hal/src/main/java/edu/wpi/first/hal/can/CANNotInitializedException.java @@ -11,10 +11,16 @@ package edu.wpi.first.hal.can; public class CANNotInitializedException extends RuntimeException { private static final long serialVersionUID = -5982895147092686594L; + /** Constructs a new CANNotInitializedException with no message. */ public CANNotInitializedException() { super(); } + /** + * Constructs a new CANNotInitializedException with {@code msg} as its detail message. + * + * @param msg the message + */ public CANNotInitializedException(String msg) { super(msg); } diff --git a/hal/src/main/java/edu/wpi/first/hal/can/CANStreamOverflowException.java b/hal/src/main/java/edu/wpi/first/hal/can/CANStreamOverflowException.java index f5e2f21358..39e3ef46e7 100644 --- a/hal/src/main/java/edu/wpi/first/hal/can/CANStreamOverflowException.java +++ b/hal/src/main/java/edu/wpi/first/hal/can/CANStreamOverflowException.java @@ -7,6 +7,11 @@ package edu.wpi.first.hal.can; import edu.wpi.first.hal.CANStreamMessage; import java.io.IOException; +/** + * Exception indicating that a CAN stream overflowed at some point between reads, therefore some + * messages were lost. This exception contains any messages that were successfully read during the + * operation that threw the exception. + */ public class CANStreamOverflowException extends IOException { /** The messages. */ private final CANStreamMessage[] m_messages; @@ -17,8 +22,8 @@ public class CANStreamOverflowException extends IOException { /** * Constructs a new CANStreamOverflowException. * - * @param messages The messages - * @param messagesRead The length of messages read + * @param messages The messages that were read successfully. + * @param messagesRead The length of messages read successfully. */ @SuppressWarnings("PMD.ArrayIsStoredDirectly") public CANStreamOverflowException(CANStreamMessage[] messages, int messagesRead) { @@ -27,11 +32,22 @@ public class CANStreamOverflowException extends IOException { this.m_messagesRead = messagesRead; } + /** + * Gets the messages that were successfully read. Use {@link #getMessagesRead()} to determine how + * many messages in the returned array are valid. + * + * @return the messages + */ @SuppressWarnings("PMD.MethodReturnsInternalArray") public CANStreamMessage[] getMessages() { return m_messages; } + /** + * Gets the count of messages that were successfully read. + * + * @return count of messages + */ public int getMessagesRead() { return m_messagesRead; }