Skip to content

Commit

Permalink
Fix a number of minor javadoc warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
celskeggs committed Mar 4, 2016
1 parent 6b1e8ab commit feb2c5b
Show file tree
Hide file tree
Showing 19 changed files with 54 additions and 32 deletions.
6 changes: 3 additions & 3 deletions CCRE_Igneous_cRIO/src/ccre/upgrade/Upgrade.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 Cel Skeggs
* Copyright 2015-2016 Cel Skeggs
*
* This file is part of the CCRE, the Common Chicken Runtime Engine.
*
Expand Down Expand Up @@ -39,8 +39,8 @@ public class Upgrade {
/**
* The main method of the Upgrade Java code.
*
* @param args
* @throws IOException
* @param args the arguments, as passed by the ant build file
* @throws IOException if the upgrade cannot be completed for invocation reasons.
*/
public static void main(String[] args) throws IOException {
System.out.println("If you have any issues, please ask about them on the forum thread on Chief Delphi at http://www.chiefdelphi.com/forums/showthread.php?t=130813");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2015 Cel Skeggs
* Copyright 2013-2016 Cel Skeggs
*
* This file is part of the CCRE, the Common Chicken Runtime Engine.
*
Expand Down Expand Up @@ -61,6 +61,12 @@ public CluckSubscriber(CluckNode node) {
* automatically sorts messages into direct messages (to null), broadcast
* messages (to *), and side-channel messages (to a subpath.)
*
* @param dest the destination address, usually expected to be null or the
* broadcast address.
* @param source the source address.
* @param data the data.
* @return always true - never detach.
*
* @see #receive(String, byte[])
* @see #receiveBroadcast(String, byte[])
* @see #receiveSideChannel(String, String, byte[])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ protected CluckLink doStart(DataInputStream din, DataOutputStream dout, ClientSo
* @param socket the socket for the connection, to be able to set timeouts.
* @param deny the established CluckLink returned by
* {@link #doStart(DataInputStream, DataOutputStream, ClientSocket)}.
* @throws IOException
* @throws IOException if the connection is malformed or fails.
*/
protected void doMain(DataInputStream din, DataOutputStream dout, ClientSocket socket, CluckLink deny) throws IOException {
CluckProtocol.handleRecv(din, linkName, node, deny);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* A utility class that lets users define derived dataflow channels based on
* other channels.
*
* <code>DiscreteInput<E> input = new DerivedDiscreteInput<E>(... some other inputs to watch ...) {<br>&nbsp;&nbsp;&nbsp;&nbsp;protected E apply() {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return // some value<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}</code>
* <code>DiscreteInput&lt;E&gt; input = new DerivedDiscreteInput&lt;E&gt;(... some other inputs to watch ...) {<br>&nbsp;&nbsp;&nbsp;&nbsp;protected E apply() {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return // some value<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}</code>
*
* Any other inputs may be specified in the constructor, which should be the
* inputs that, when updated, might cause this to also update. When one of these
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public default DiscreteInput<E> asInput() {
* Compose a BooleanInput and a BooleanOutput into a single BooleanIO, which
* dispatches to the two implementations.
*
* @param <E> the type of the discrete element.
* @param input the input to dispatch to.
* @param output the output to dispatch to.
* @return the composed BooleanIO.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public default void safeSet(E value) {
/**
* Provides a discrete output for <code>type</code> that does nothing.
*
* @param <E> the discrete element type
* @param type the discrete type
* @return the discrete output
*/
Expand Down
11 changes: 7 additions & 4 deletions CommonChickenRuntimeEngine/src/ccre/recording/Recorder.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,16 @@ public static enum RawType {
* thread.
*
* @param stream the output stream.
* @throws IOException
* @throws IOException if the output stream fails.
*/
public Recorder(OutputStream stream) throws IOException {
this.rec = new ChanneledRecorder(stream);
}

/**
* Closes and shuts down this recorder.
* Closes and shuts down this recorder, and waits for the operation to complete.
*
* @throws InterruptedException
* @throws InterruptedException if the thread is interrupted while waiting for the recorder to close.
*/
public void close() throws InterruptedException {
if (closed.compareAndSet(false, true)) {
Expand Down Expand Up @@ -174,6 +174,7 @@ public void recordBooleanInput(BooleanInput input, String name) {
/**
* Creates a discrete output logging to this recorder.
*
* @param <E> the discrete element type.
* @param name the channel name.
* @param type the discrete output's type.
* @return the new discrete output.
Expand All @@ -197,6 +198,7 @@ public void set(E e) {
/**
* Records a discrete input.
*
* @param <E> the discrete element type.
* @param input the input to record.
* @param name the channel name.
*/
Expand Down Expand Up @@ -276,6 +278,7 @@ public void flush() throws IOException {
/**
* Records a Faultable.
*
* @param <F> the faultable fault type.
* @param faults the faults to record.
* @param name the channel name.
*/
Expand Down Expand Up @@ -459,7 +462,7 @@ static OutputStream openStream(boolean compressed, int maximum_records) throws I
* @param compressed if the recording should be compressed
* @param maximum_recordings the maximum number of recordings
* @return the opened recorder
* @throws IOException
* @throws IOException if the recording cannot be set up.
*/
public static Recorder open(boolean compressed, int maximum_recordings) throws IOException {
OutputStream out = openStream(compressed, maximum_recordings);
Expand Down
2 changes: 1 addition & 1 deletion DeploymentEngine/src/ccre/deployment/DepJava.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class DepJava {
* @param classpath the folders containing the classes that can be linked to
* from the compiled code.
* @return the generated Artifact of the compiled classes.
* @throws IOException
* @throws IOException if something around finding source files or storing created files fails.
*/
public static Artifact build(File folder, File... classpath) throws IOException {
JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
Expand Down
2 changes: 1 addition & 1 deletion DeploymentEngine/src/ccre/deployment/Jar.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class Jar extends Artifact {
* Wraps the Jar in the specified file.
*
* @param jar the file to wrap.
* @throws IOException
* @throws IOException if the jar cannot be opened or is malformed.
*/
public Jar(File jar) throws IOException {
this.jarfile = new JarFile(jar);
Expand Down
15 changes: 8 additions & 7 deletions DeploymentEngine/src/ccre/deployment/JarBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public class JarBuilder {
* manifest is specified.
*
* @param preserve if the generated Jar should be preserved.
* @throws IOException
* @throws IOException if the new temporary Jar cannot be created.
* @see Jar for an explanation of preservation.
*/
public JarBuilder(boolean preserve) throws IOException {
Expand All @@ -86,7 +86,7 @@ public JarBuilder(boolean preserve) throws IOException {
*
* @param mf the manifest to include in the Jar.
* @param preserve if the generated Jar should be preserved.
* @throws IOException
* @throws IOException if the new temporary Jar cannot be created.
* @see Jar for an explanation of preservation.
*/
public JarBuilder(Manifest mf, boolean preserve) throws IOException {
Expand All @@ -109,7 +109,7 @@ public JarBuilder(Manifest mf, boolean preserve) throws IOException {
* @param elem the dot-format name of the class, such as
* <code>java.lang.Object</code>.
* @param is the InputStream that carries the class data for this class.
* @throws IOException
* @throws IOException if the InputStream fails, or if the Jar output fails.
*/
public void addClass(String elem, InputStream is) throws IOException {
addResource(elem.replace('.', '/') + ".class", is);
Expand All @@ -122,7 +122,7 @@ public void addClass(String elem, InputStream is) throws IOException {
* @param name the path of the resource.
* @param is the InputStream that carries the resource data for this
* resource.
* @throws IOException
* @throws IOException if the InputStream fails, or if the Jar output fails.
*/
public void addResource(String name, InputStream is) throws IOException {
if (is == null) {
Expand All @@ -146,7 +146,8 @@ public void addResource(String name, InputStream is) throws IOException {
*
* @param name the path of the resource.
* @param file the File that carries the resource data for this resource.
* @throws IOException
* @throws IOException if the file reading fails, or if the Jar output
* fails.
*/
public void addResource(String name, File file) throws IOException {
try (FileInputStream is = new FileInputStream(file)) {
Expand All @@ -160,7 +161,7 @@ public void addResource(String name, File file) throws IOException {
*
* @param artifact the artifact to read data from.
* @param andManifest if the manifest should be taken from this artifact.
* @throws IOException
* @throws IOException if the reading fails, or if the Jar output fails.
*/
public void addAll(Artifact artifact, boolean andManifest) throws IOException {
for (String cn : artifact.listClassNames()) {
Expand All @@ -178,7 +179,7 @@ public void addAll(Artifact artifact, boolean andManifest) throws IOException {
* Finalizes this Jar and converts it to a {@link Jar}.
*
* @return the built Jar.
* @throws IOException
* @throws IOException if the Jar cannot be converted properly.
*/
public Jar build() throws IOException {
jout.close();
Expand Down
6 changes: 3 additions & 3 deletions DeploymentEngine/src/ccre/deployment/RebuildBuilders.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class RebuildBuilders {
* Rebuilds the {@link DepTask} tasks for the current project, unless it is
* TemplateRobot.
*
* @throws IOException
* @throws IOException if the builders cannot be rebuilt.
*/
public static void rebuild() throws IOException {
if ("TemplateRobot".equals(DepProject.name())) {
Expand Down Expand Up @@ -76,7 +76,7 @@ public static void rebuild() throws IOException {
*
* @param deployment the deployment class that includes the deployment
* tasks.
* @throws IOException
* @throws IOException if the builders cannot be rebuilt.
*/
public static void rebuild(Class<?> deployment) throws IOException {
for (Method m : deployment.getMethods()) {
Expand Down Expand Up @@ -117,7 +117,7 @@ public static void rebuild(Class<?> deployment) throws IOException {
* @param methodName the method to invoke on the deployment class.
* @param fork if a new JVM should be forked to run the deployment task when
* it is launched.
* @throws IOException
* @throws IOException if the builders cannot be rebuilt.
*/
public static void rebuild(Class<?> deployment, String displayName, String methodName, boolean fork) throws IOException {
InputStream resource = RebuildBuilders.class.getResourceAsStream("/ccre/deployment/invocation-template.xml");
Expand Down
10 changes: 5 additions & 5 deletions DeploymentEngine/src/ccre/deployment/Shell.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public int exec(String command) throws IOException {
*
* @param sourcePath the path on the remote end to receive a file from.
* @return the InputStream reading from that file.
* @throws IOException
* @throws IOException if the file cannot be received.
*/
public InputStream receiveFile(String sourcePath) throws IOException {
SCPFileTransfer transfer = client.newSCPFileTransfer();
Expand All @@ -127,7 +127,7 @@ public InputStream receiveFile(String sourcePath) throws IOException {
*
* @param localFile the local file to upload.
* @param remotePath the file or directory to upload the file to.
* @throws IOException
* @throws IOException if the file cannot be sent.
*/
public void sendFileTo(File localFile, String remotePath) throws IOException {
SCPFileTransfer transfer = client.newSCPFileTransfer();
Expand All @@ -143,7 +143,7 @@ public void sendFileTo(File localFile, String remotePath) throws IOException {
* @param remotePath the file or directory to upload the file to.
* @param permissions the permissions for the file to have on the remote
* end.
* @throws IOException
* @throws IOException if the file cannot be sent.
*/
public void sendFileTo(InputStream stream, String name, String remotePath, int permissions) throws IOException {
if (stream == null) {
Expand Down Expand Up @@ -187,7 +187,7 @@ public int getPermissions() throws IOException {
* @param resource the resource name.
* @param remotePath the remote path to upload the file to.
* @param permissions the permissions for the file to have.
* @throws IOException
* @throws IOException if the file cannot be sent.
*/
public void sendBinResourceTo(Class<?> clazz, String resource, String remotePath, int permissions) throws IOException {
try (InputStream resin = clazz.getResourceAsStream(resource)) {
Expand All @@ -207,7 +207,7 @@ public void sendBinResourceTo(Class<?> clazz, String resource, String remotePath
* @param resource the resource name.
* @param remotePath the remote path to upload the file to.
* @param permissions the permissions for the file to have.
* @throws IOException
* @throws IOException if the file cannot be sent.
*/
public void sendTextResourceTo(Class<?> clazz, String resource, String remotePath, int permissions) throws IOException {
try (InputStream resin = clazz.getResourceAsStream(resource)) {
Expand Down
2 changes: 1 addition & 1 deletion DeploymentEngine/src/ccre/deployment/eggs/EggHatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public class EggHatcher {
* action that was specified when the egg was created.
*
* @param args the program arguments, which are ignored.
* @throws Exception
* @throws Exception if the egg cannot be hatched.
*/
public static void main(String[] args) throws Exception {
System.out.println(banner);
Expand Down
1 change: 1 addition & 0 deletions Emulator/src/ccre/frc/DeviceGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class DeviceGroup extends Device implements Iterable<Device> {
/**
* Add a device to this group.
*
* @param <D> the type of the added device.
* @param device the device to add.
* @return the device that was just added, for method chaining.
*/
Expand Down
2 changes: 1 addition & 1 deletion Emulator/src/ccre/frc/DeviceListMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class DeviceListMain {
*
* @param jarFile the program Jar.
* @param storageDir the storage directory for logs, etc.
* @throws Exception
* @throws Exception if the emulator cannot be started
*/
public static void startEmulator(File jarFile, File storageDir) throws Exception {
if (!jarFile.isFile()) {
Expand Down
1 change: 1 addition & 0 deletions Emulator/src/ccre/frc/DeviceListPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public void setErrorDisplay(Throwable thr) {
/**
* Add the specified device to this panel.
*
* @param <E> the type of the added device.
* @param comp The device to add.
* @return the added device.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ public boolean containsAny(Class<? extends SuperCanvasComponent> componentType)
/**
* Get the first of any components of the specified component type.
*
* @param <T> the type of the expected component.
* @param componentType the type of component to find.
* @return the component, if found, otherwise null.
*/
Expand Down
6 changes: 3 additions & 3 deletions TemplateRobot/src/deployment/Deployment.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class Deployment {
* A deployment task that downloads your robot code to a roboRIO found based
* on your team number.
*
* @throws Exception
* @throws Exception if the deployment cannot be completed
*/
@DepTask
public static void deploy() throws Exception {
Expand All @@ -49,7 +49,7 @@ public static void deploy() throws Exception {
/**
* A deployment task that runs your robot code in the CCRE's emulator.
*
* @throws Exception
* @throws Exception if the emulation cannot occur
*/
@DepTask(fork = true)
public static void emulate() throws Exception {
Expand All @@ -62,7 +62,7 @@ public static void emulate() throws Exception {
* be deployed to the robot by anyone, even if they don't have the CCRE set
* up.
*
* @throws Exception
* @throws Exception if the egg cannot be laid
*/
@DepTask
public static void layEgg() throws Exception {
Expand Down
7 changes: 7 additions & 0 deletions header-dates-ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,10 @@ dcabfa57ef977538cf97eab647a506f439b98f5cc197c00dc73a1c0b50413173 ./DeploymentEn
821750e371a80041623db4f62994275a9243d174de6735807330f74406eb0176 ./roboRIO/src/edu/wpi/first/wpilibj/can/CANExceptionFactory.java
ef4f2a87aead1a0fcba77e4a2306ddf785b29f7c372d3ac0ed2412e7a075746f ./CommonChickenRuntimeEngine/src/ccre/drivers/chrobotics/InternalUM7LT.java
8428dfcda9bb4e4359db1f60bd0d0799ff79081c033e0a79eeb1247182c7f93c ./CommonChickenRuntimeEngine/src/ccre/drivers/chrobotics/UM7LT.java
d00c243d97e655cd272c0dc5da6f9b70d8ae5e88d84ecfafb97c6cee3bdd2ab0 ./CommonChickenRuntimeEngine/src/ccre/cluck/tcp/CluckTCPClient.java
52dacca70f836ba930ec74bf5f3ed9ed1b43c59a92e4763a84e948d42a84d3b9 ./DeploymentEngine/src/ccre/deployment/eggs/EggHatcher.java
8038db7ea954fdc818f13809b50147c8886ea3f6dc2069c0d27dd9cbbb512429 ./DeploymentEngine/src/ccre/deployment/Shell.java
2aa4ab15ae58fb0f55de5d697d548dd1e13e7a59767ff4c516642a775797e58d ./DeploymentEngine/src/ccre/deployment/DepJava.java
53ecce87c6352b3f2d21e4fede41a57471a2ed93c03457277b1dc95c93bb2459 ./Emulator/src/ccre/frc/DeviceGroup.java
ddab31ff1a34e2b1f1c0170a95ce7c745224e8be19fbbcf47b4982a1e55f3b38 ./Emulator/src/ccre/frc/DeviceListMain.java
906ab38b984aafdb2d9c704d61a208531562a04bad2d4d62153e3d638aa6db74 ./Emulator/src/ccre/frc/DeviceListPanel.java

0 comments on commit feb2c5b

Please sign in to comment.