Fix various Javadoc issues / Do not use argN parameter names

This commit is contained in:
Trustin Lee 2012-11-12 12:26:19 +09:00
parent ea4a0e3535
commit aedf8790c3
29 changed files with 45 additions and 226 deletions

View File

@ -336,7 +336,7 @@ public interface ByteBuf extends ChannelBuf, Comparable<ByteBuf> {
* buf.readerIndex(2);
* </pre>
*
* By contrast, {@link #setIndex(int, int)} guarantees that it never
* By contrast, this method guarantees that it never
* throws an {@link IndexOutOfBoundsException} as long as the specified
* indexes meet basic constraints, regardless what the current index
* values of the buffer are:

View File

@ -80,7 +80,7 @@ public interface HttpMessage extends HttpObject {
/**
* Returns the protocol version of this {@link HttpMessage}
*
* @returns The protocol version
* @return The protocol version
*/
HttpVersion getProtocolVersion();

View File

@ -69,9 +69,7 @@ public abstract class AbstractDiskHttpData extends AbstractHttpData {
protected abstract boolean deleteOnExit();
/**
*
* @return a new Temp File from getDiskFilename(), default prefix, postfix and baseDirectory
* @throws IOException
*/
private File tempFile() throws IOException {
String newpostfix = null;
@ -330,9 +328,7 @@ public abstract class AbstractDiskHttpData extends AbstractHttpData {
/**
* Utility function
* @param src
* @return the array of bytes
* @throws IOException
*/
private static byte[] readFrom(File src) throws IOException {
long srcsize = src.length();

View File

@ -28,7 +28,6 @@ public interface Attribute extends HttpData {
/**
* Sets the value of this HttpData.
* @param value
*/
void setValue(String value) throws IOException;
}

View File

@ -60,7 +60,6 @@ public class DefaultHttpDataFactory implements HttpDataFactory {
/**
* HttpData will be always on Disk if useDisk is True, else always in Memory if False
* @param useDisk
*/
public DefaultHttpDataFactory(boolean useDisk) {
this.useDisk = useDisk;
@ -70,7 +69,6 @@ public class DefaultHttpDataFactory implements HttpDataFactory {
/**
* HttpData will be on Disk if the size of the file is greater than minSize, else it
* will be in memory. The type will be Mixed.
* @param minSize
*/
public DefaultHttpDataFactory(long minSize) {
useDisk = false;
@ -79,8 +77,6 @@ public class DefaultHttpDataFactory implements HttpDataFactory {
}
/**
*
* @param request
* @return the associated list of Files for the request
*/
private List<HttpData> getList(HttpRequest request) {

View File

@ -36,19 +36,11 @@ public class DiskAttribute extends AbstractDiskHttpData implements Attribute {
/**
* Constructor used for huge Attribute
* @param name
*/
public DiskAttribute(String name) {
super(name, HttpConstants.DEFAULT_CHARSET, 0);
}
/**
*
* @param name
* @param value
* @throws NullPointerException
* @throws IllegalArgumentException
* @throws IOException
*/
public DiskAttribute(String name, String value) throws IOException {
super(name, HttpConstants.DEFAULT_CHARSET, 0); // Attribute have no default size
setValue(value);

View File

@ -30,7 +30,6 @@ public interface FileUpload extends HttpData {
/**
* Set the original filename
* @param filename
*/
void setFilename(String filename);
@ -48,7 +47,6 @@ public interface FileUpload extends HttpData {
/**
* Set the Content-Transfer-Encoding type from String as 7bit, 8bit or binary
* @param contentTransferEncoding
*/
void setContentTransferEncoding(String contentTransferEncoding);

View File

@ -105,10 +105,8 @@ public interface HttpData extends InterfaceHttpData {
* read. Once it arrives at the end, it returns an EMPTY_BUFFER and it
* resets the current position to 0.
*
* @param length
* @return a ChannelBuffer for the content from the current position or an
* EMPTY_BUFFER if there is no more data to return
* @throws IOException
*/
ByteBuf getChunk(int length) throws IOException;

View File

@ -15,10 +15,10 @@
*/
package io.netty.handler.codec.http.multipart;
import java.nio.charset.Charset;
import io.netty.handler.codec.http.HttpRequest;
import java.nio.charset.Charset;
/**
* Interface to enable creation of InterfaceHttpData objects
*/
@ -26,31 +26,18 @@ public interface HttpDataFactory {
/**
*
* @param request associated request
* @param name
* @return a new Attribute with no value
* @throws NullPointerException
* @throws IllegalArgumentException
*/
Attribute createAttribute(HttpRequest request, String name);
/**
*
* @param request associated request
* @param name
* @param value
* @return a new Attribute
* @throws NullPointerException
* @throws IllegalArgumentException
*/
Attribute createAttribute(HttpRequest request, String name, String value);
/**
*
* @param request associated request
* @param name
* @param filename
* @param contentType
* @param charset
* @param size the size of the Uploaded file
* @return a new FileUpload
*/
@ -62,7 +49,6 @@ public interface HttpDataFactory {
* Remove the given InterfaceHttpData from clean list (will not delete the file, except if the file
* is still a temporary one as setup at construction)
* @param request associated request
* @param data
*/
void removeHttpDataFromClean(HttpRequest request, InterfaceHttpData data);

View File

@ -140,9 +140,6 @@ final class HttpPostBodyUtil {
int limit;
ByteBuf buffer;
/**
* @param buffer
*/
SeekAheadOptimize(ByteBuf buffer) throws SeekAheadNoBackArrayException {
if (!buffer.hasArray()) {
throw new SeekAheadNoBackArrayException();
@ -185,8 +182,6 @@ final class HttpPostBodyUtil {
/**
* Find the first non whitespace
* @param sb
* @param offset
* @return the rank of the first non whitespace
*/
static int findNonWhitespace(String sb, int offset) {
@ -201,8 +196,6 @@ final class HttpPostBodyUtil {
/**
* Find the first whitespace
* @param sb
* @param offset
* @return the rank of the first whitespace
*/
static int findWhitespace(String sb, int offset) {
@ -217,7 +210,6 @@ final class HttpPostBodyUtil {
/**
* Find the end of String
* @param sb
* @return the rank of the end of string
*/
static int findEndOfString(String sb) {

View File

@ -247,9 +247,6 @@ public class HttpPostRequestDecoder {
/**
* Check from the request ContentType if this request is a Multipart
* request.
*
* @param contentType
* @throws ErrorDataDecoderException
*/
private void checkMultipart(String contentType) throws ErrorDataDecoderException {
// Check if Post using "multipart/form-data; boundary=--89421926422648"
@ -301,7 +298,6 @@ public class HttpPostRequestDecoder {
* If chunked, all chunks must have been offered using offer() method. If
* not, NotEnoughDataDecoderException will be raised.
*
* @param name
* @return All Body HttpDatas with the given name (ignore case)
* @throws NotEnoughDataDecoderException
* need more chunks
@ -320,7 +316,6 @@ public class HttpPostRequestDecoder {
* If chunked, all chunks must have been offered using offer() method. If
* not, NotEnoughDataDecoderException will be raised.
*
* @param name
* @return The first Body InterfaceHttpData with the given name (ignore
* case)
* @throws NotEnoughDataDecoderException
@ -421,8 +416,6 @@ public class HttpPostRequestDecoder {
/**
* Utility function to add a new decoded data
*
* @param data
*/
private void addHttpData(InterfaceHttpData data) {
if (data == null) {
@ -692,10 +685,7 @@ public class HttpPostRequestDecoder {
/**
* Decode component
*
* @param s
* @param charset
* @return the decoded component
* @throws ErrorDataDecoderException
*/
private static String decodeAttribute(String s, Charset charset) throws ErrorDataDecoderException {
if (s == null) {
@ -744,7 +734,6 @@ public class HttpPostRequestDecoder {
*
* Inspired from HttpMessageDecoder
*
* @param state
* @return the next decoded InterfaceHttpData or null if none until now.
* @throws ErrorDataDecoderException
* if an error occurs
@ -1480,7 +1469,6 @@ public class HttpPostRequestDecoder {
* Read a FileUpload data as Byte (Binary) and add the bytes directly to the
* FileUpload. If the delimiter is found, the FileUpload is completed.
*
* @param delimiter
* @throws NotEnoughDataDecoderException
* Need more chunks but do not reset the readerInder since some
* values will be already added to the FileOutput
@ -1577,7 +1565,6 @@ public class HttpPostRequestDecoder {
* Read a FileUpload data as Byte (Binary) and add the bytes directly to the
* FileUpload. If the delimiter is found, the FileUpload is completed.
*
* @param delimiter
* @throws NotEnoughDataDecoderException
* Need more chunks but do not reset the readerInder since some
* values will be already added to the FileOutput
@ -1938,7 +1925,6 @@ public class HttpPostRequestDecoder {
/**
* Split the very first line (Content-Type value) in 2 Strings
*
* @param sb
* @return the array of 2 Strings
*/
private static String[] splitHeaderContentType(String sb) {
@ -1963,7 +1949,6 @@ public class HttpPostRequestDecoder {
/**
* Split one header in Multipart
*
* @param sb
* @return an array of String where rank 0 is the name of the header,
* follows by several values that were separated by ';' or ','
*/
@ -2012,35 +1997,21 @@ public class HttpPostRequestDecoder {
* enough data are available (need more chunks)
*/
public static class NotEnoughDataDecoderException extends Exception {
/**
*/
private static final long serialVersionUID = -7846841864603865638L;
/**
*/
public NotEnoughDataDecoderException() {
}
/**
* @param arg0
*/
public NotEnoughDataDecoderException(String arg0) {
super(arg0);
public NotEnoughDataDecoderException(String msg) {
super(msg);
}
/**
* @param arg0
*/
public NotEnoughDataDecoderException(Throwable arg0) {
super(arg0);
public NotEnoughDataDecoderException(Throwable cause) {
super(cause);
}
/**
* @param arg0
* @param arg1
*/
public NotEnoughDataDecoderException(String arg0, Throwable arg1) {
super(arg0, arg1);
public NotEnoughDataDecoderException(String msg, Throwable cause) {
super(msg, cause);
}
}
@ -2058,33 +2029,19 @@ public class HttpPostRequestDecoder {
* Exception when an error occurs while decoding
*/
public static class ErrorDataDecoderException extends Exception {
/**
*/
private static final long serialVersionUID = 5020247425493164465L;
/**
*/
public ErrorDataDecoderException() {
}
/**
* @param arg0
*/
public ErrorDataDecoderException(String arg0) {
super(arg0);
}
/**
* @param arg0
*/
public ErrorDataDecoderException(Throwable arg0) {
super(arg0);
}
/**
* @param arg0
* @param arg1
*/
public ErrorDataDecoderException(String arg0, Throwable arg1) {
super(arg0, arg1);
}
@ -2094,35 +2051,21 @@ public class HttpPostRequestDecoder {
* Exception when an unappropriated method was called on a request
*/
public static class IncompatibleDataDecoderException extends Exception {
/**
*/
private static final long serialVersionUID = -953268047926250267L;
/**
*/
public IncompatibleDataDecoderException() {
}
/**
* @param arg0
*/
public IncompatibleDataDecoderException(String arg0) {
super(arg0);
public IncompatibleDataDecoderException(String msg) {
super(msg);
}
/**
* @param arg0
*/
public IncompatibleDataDecoderException(Throwable arg0) {
super(arg0);
public IncompatibleDataDecoderException(Throwable cause) {
super(cause);
}
/**
* @param arg0
* @param arg1
*/
public IncompatibleDataDecoderException(String arg0, Throwable arg1) {
super(arg0, arg1);
public IncompatibleDataDecoderException(String msg, Throwable cause) {
super(msg, cause);
}
}
}

View File

@ -242,7 +242,6 @@ public class HttpPostRequestEncoder implements ChunkedMessageInput<HttpChunk> {
/**
* Set the Body HttpDatas list
*
* @param datas
* @throws NullPointerException
* for datas
* @throws ErrorDataEncoderException
@ -361,7 +360,6 @@ public class HttpPostRequestEncoder implements ChunkedMessageInput<HttpChunk> {
/**
* Add the InterfaceHttpData to the Body list
*
* @param data
* @throws NullPointerException
* for data
* @throws ErrorDataEncoderException
@ -685,8 +683,6 @@ public class HttpPostRequestEncoder implements ChunkedMessageInput<HttpChunk> {
/**
* Encode one attribute
*
* @param s
* @param charset
* @return the encoded attribute
* @throws ErrorDataEncoderException
* if the encoding is in error
@ -1000,26 +996,16 @@ public class HttpPostRequestEncoder implements ChunkedMessageInput<HttpChunk> {
public ErrorDataEncoderException() {
}
/**
* @param arg0
*/
public ErrorDataEncoderException(String arg0) {
super(arg0);
public ErrorDataEncoderException(String msg) {
super(msg);
}
/**
* @param arg0
*/
public ErrorDataEncoderException(Throwable arg0) {
super(arg0);
public ErrorDataEncoderException(Throwable cause) {
super(cause);
}
/**
* @param arg0
* @param arg1
*/
public ErrorDataEncoderException(String arg0, Throwable arg1) {
super(arg0, arg1);
public ErrorDataEncoderException(String msg, Throwable cause) {
super(msg, cause);
}
}
}

View File

@ -15,10 +15,11 @@
*/
package io.netty.handler.codec.http.multipart;
import java.io.IOException;
import io.netty.buffer.ByteBuf;
import io.netty.handler.codec.http.HttpConstants;
import java.io.IOException;
import static io.netty.buffer.Unpooled.*;
/**
@ -29,14 +30,7 @@ public class MemoryAttribute extends AbstractMemoryHttpData implements Attribute
public MemoryAttribute(String name) {
super(name, HttpConstants.DEFAULT_CHARSET, 0);
}
/**
*
* @param name
* @param value
* @throws NullPointerException
* @throws IllegalArgumentException
* @throws IOException
*/
public MemoryAttribute(String name, String value) throws IOException {
super(name, HttpConstants.DEFAULT_CHARSET, 0); // Attribute have no default size
setValue(value);
@ -89,12 +83,12 @@ public class MemoryAttribute extends AbstractMemoryHttpData implements Attribute
}
@Override
public int compareTo(InterfaceHttpData arg0) {
if (!(arg0 instanceof Attribute)) {
public int compareTo(InterfaceHttpData other) {
if (!(other instanceof Attribute)) {
throw new ClassCastException("Cannot compare " + getHttpDataType() +
" with " + arg0.getHttpDataType());
" with " + other.getHttpDataType());
}
return compareTo((Attribute) arg0);
return compareTo((Attribute) other);
}
public int compareTo(Attribute o) {

View File

@ -18,7 +18,7 @@ package io.netty.handler.codec;
/**
* An {@link Exception} which is thrown by a codec.
*
* @apiviz.hidden
* @apiviz.exclude
*/
public class CodecException extends RuntimeException {

View File

@ -19,7 +19,7 @@ package io.netty.handler.codec;
* An {@link Exception} which is thrown when the received frame data could not be decoded by
* an inbound handler.
*
* @apiviz.hidden
* @apiviz.exclude
*/
public class CorruptedFrameException extends DecoderException {

View File

@ -18,7 +18,7 @@ package io.netty.handler.codec;
/**
* An {@link Exception} which is thrown by an encoder.
*
* @apiviz.hidden
* @apiviz.exclude
*/
public class DecoderException extends CodecException {

View File

@ -18,7 +18,7 @@ package io.netty.handler.codec;
/**
* An {@link Exception} which is thrown by an encoder.
*
* @apiviz.hidden
* @apiviz.exclude
*/
public class EncoderException extends CodecException {

View File

@ -18,7 +18,8 @@ package io.netty.handler.codec;
/**
* An {@link Exception} which is thrown when the length of the frame
* decoded by {@link DelimiterBasedFrameDecoder} is greater than the maximum.
* @apiviz.hidden
*
* @apiviz.exclude
*/
public class TooLongFrameException extends DecoderException {

View File

@ -48,7 +48,6 @@ public interface EventRateMonitor {
/**
* Record {@code count} event occurrences.
* @param count
*/
void events(long count);
}

View File

@ -49,7 +49,6 @@ public interface ValueDistributionMonitor {
/**
* Record {@code value}.
* @param value
*/
void update(long value);
}

View File

@ -1,18 +1,18 @@
package io.netty.util;
import static org.junit.Assert.assertTrue;
import io.netty.monitor.CounterMonitor;
import io.netty.monitor.EventRateMonitor;
import io.netty.monitor.MonitorName;
import io.netty.monitor.MonitorRegistry;
import io.netty.monitor.ValueDistributionMonitor;
import io.netty.monitor.ValueMonitor;
import org.junit.Test;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import org.junit.Test;
import static org.junit.Assert.*;
public class HashedWheelTimerMonitorTest {
@ -51,10 +51,6 @@ public class HashedWheelTimerMonitorTest {
private final EventRateMonitor eventRateMonitor;
/**
* @param eventDistributionMonitor
* @param eventRateMonitor
*/
RecordingMonitorRegistry(final ValueDistributionMonitor eventDistributionMonitor,
final EventRateMonitor eventRateMonitor) {
this.eventDistributionMonitor = eventDistributionMonitor;

View File

@ -204,8 +204,6 @@ public class HttpUploadServerHandler extends ChannelInboundMessageHandlerAdapter
/**
* Example of reading all InterfaceHttpData from finished transfer
*
* @param channel
*/
private void readHttpDataAllReceive(Channel channel) {
List<InterfaceHttpData> datas = null;
@ -227,8 +225,6 @@ public class HttpUploadServerHandler extends ChannelInboundMessageHandlerAdapter
/**
* Example of reading request by chunk and getting values from chunk to chunk
*
* @param channel
*/
private void readHttpDataChunkByChunk(Channel channel) {
try {

View File

@ -28,9 +28,6 @@ class YammerCounterMonitor implements CounterMonitor {
private final Counter delegate;
/**
* @param delegate
*/
YammerCounterMonitor(final Counter delegate) {
if (delegate == null) {
throw new NullPointerException("delegate");
@ -38,49 +35,31 @@ class YammerCounterMonitor implements CounterMonitor {
this.delegate = delegate;
}
/**
* @see CounterMonitor#inc()
*/
@Override
public void inc() {
delegate.inc();
}
/**
* @see CounterMonitor#inc(long)
*/
@Override
public void inc(final long delta) {
delegate.inc(delta);
}
/**
* @see CounterMonitor#decr()
*/
@Override
public void decr() {
delegate.dec();
}
/**
* @see CounterMonitor#decr(long)
*/
@Override
public void decr(final long delta) {
delegate.dec(delta);
}
/**
* @see CounterMonitor#reset()
*/
@Override
public void reset() {
delegate.clear();
}
/**
* @see Object#toString()
*/
@Override
public String toString() {
return "YammerCounterMonitor(delegate=" + delegate + ')';

View File

@ -28,9 +28,6 @@ class YammerEventRateMonitor implements EventRateMonitor {
private final Meter delegate;
/**
* @param delegate
*/
YammerEventRateMonitor(final Meter delegate) {
if (delegate == null) {
throw new NullPointerException("delegate");
@ -39,7 +36,6 @@ class YammerEventRateMonitor implements EventRateMonitor {
}
/**
* @see EventRateMonitor#event()
* @see Meter#mark()
*/
@Override
@ -48,7 +44,6 @@ class YammerEventRateMonitor implements EventRateMonitor {
}
/**
* @see EventRateMonitor#events(long)
* @see Meter#mark(long)
*/
@Override
@ -56,9 +51,6 @@ class YammerEventRateMonitor implements EventRateMonitor {
delegate.mark(count);
}
/**
* @see Object#toString()
*/
@Override
public String toString() {
return "YammerEventRateMonitor(delegate=" + delegate + ')';

View File

@ -28,9 +28,6 @@ final class YammerValueDistributionMonitor implements ValueDistributionMonitor {
private final Histogram delegate;
/**
* @param delegate
*/
YammerValueDistributionMonitor(final Histogram delegate) {
if (delegate == null) {
throw new NullPointerException("delegate");
@ -38,25 +35,16 @@ final class YammerValueDistributionMonitor implements ValueDistributionMonitor {
this.delegate = delegate;
}
/**
* @see io.netty.monitor.EventDistributionMonitor#reset()
*/
@Override
public void reset() {
delegate.clear();
}
/**
* @see io.netty.monitor.EventDistributionMonitor#update(long)
*/
@Override
public void update(final long value) {
delegate.update(value);
}
/**
* @see Object#toString()
*/
@Override
public String toString() {
return "YammerEventDistributionMonitor(delegate=" + delegate + ')';

View File

@ -33,15 +33,10 @@ public class YammerMonitorRegistryFactory implements MonitorRegistryFactory {
private final MetricsRegistry metricsRegistry;
/**
*/
public YammerMonitorRegistryFactory() {
this(Metrics.defaultRegistry());
}
/**
* @param metricsRegistry
*/
public YammerMonitorRegistryFactory(final MetricsRegistry metricsRegistry) {
if (metricsRegistry == null) {
throw new NullPointerException("metricsRegistry");
@ -49,25 +44,16 @@ public class YammerMonitorRegistryFactory implements MonitorRegistryFactory {
this.metricsRegistry = metricsRegistry;
}
/**
* @see MonitorRegistryFactory#provider()
*/
@Override
public MonitorProvider provider() {
return YammerProvider.PROVIDER;
}
/**
* @see MonitorRegistryFactory#newMonitorRegistry()
*/
@Override
public MonitorRegistry newMonitorRegistry() {
return new YammerMonitorRegistry(metricsRegistry);
}
/**
* @see Object#toString()
*/
@Override
public String toString() {
return "YammerMonitorRegistryFactory(metricsRegistry=" + metricsRegistry + ')';

View File

@ -17,7 +17,8 @@ package io.netty.channel;
/**
* A {@link RuntimeException} which is thrown when an I/O operation fails.
* @apiviz.hidden
*
* @apiviz.exclude
*/
public class ChannelException extends RuntimeException {

View File

@ -19,7 +19,8 @@ package io.netty.channel;
* A {@link RuntimeException} which is thrown when a
* {@link LifeCycleAwareChannelHandler} throws an {@link Exception}
* in its handler methods.
* @apiviz.hidden
*
* @apiviz.exclude
*/
public class ChannelHandlerLifeCycleException extends RuntimeException {

View File

@ -19,7 +19,8 @@ package io.netty.channel;
* A {@link ChannelException} which is thrown when a {@link ChannelPipeline}
* failed to process a {@link ChannelEvent} or when a {@link ChannelPipelineFactory}
* failed to initialize a {@link ChannelPipeline}.
* @apiviz.hidden
*
* @apiviz.exclude
*/
public class ChannelPipelineException extends ChannelException {