Skip to content

Commit

Permalink
Fix javadoc issues
Browse files Browse the repository at this point in the history
Motivation:

Invalid javadoc in project

Modifications:

Fix it

Result:

More correct javadoc
  • Loading branch information
fenik17 authored and normanmaurer committed Feb 22, 2017
1 parent 634a8af commit 0623c6c
Show file tree
Hide file tree
Showing 43 changed files with 114 additions and 118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public ByteBufInputStream(ByteBuf buffer, boolean releaseOnClose) {
* Creates a new stream which reads data from the specified {@code buffer}
* starting at the current {@code readerIndex} and ending at
* {@code readerIndex + length}.
* @param buffer The buffer which provides the content for this {@Link InputStream}.
* @param buffer The buffer which provides the content for this {@link InputStream}.
* @param length The length of the buffer to use for this {@link InputStream}.
* @param releaseOnClose {@code true} means that when {@link #close()} is called then {@link ByteBuf#release()} will
* be called on {@code buffer}.
Expand Down
5 changes: 3 additions & 2 deletions buffer/src/main/java/io/netty/buffer/PoolThreadCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@
/**
* Acts a Thread cache for allocations. This implementation is moduled after
* <a href="http://people.freebsd.org/~jasone/jemalloc/bsdcan2006/jemalloc.pdf">jemalloc</a> and the descripted
* technics of <a href="https://www.facebook.com/notes/facebook-engineering/scalable-memory-allocation-using-jemalloc/
* 480222803919">Scalable memory allocation using jemalloc</a>.
* technics of
* <a href="https://www.facebook.com/notes/facebook-engineering/scalable-memory-allocation-using-jemalloc/480222803919">
* Scalable memory allocation using jemalloc</a>.
*/
final class PoolThreadCache {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
package io.netty.handler.codec.http;

import io.netty.handler.codec.http.cookie.ClientCookieDecoder;

/**
* A <a href="http://tools.ietf.org/html/rfc6265">RFC6265</a> compliant cookie encoder to be used client side,
* so only name=value pairs are sent.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ public static String getHeader(HttpMessage message, CharSequence name) {
/**
* @deprecated Use {@link #get(CharSequence, String)} instead.
*
* @see {@link #getHeader(HttpMessage, CharSequence, String)}
* @see #getHeader(HttpMessage, CharSequence, String)
*/
@Deprecated
public static String getHeader(HttpMessage message, String name, String defaultValue) {
Expand All @@ -589,7 +589,7 @@ public static String getHeader(HttpMessage message, CharSequence name, String de
/**
* @deprecated Use {@link #set(CharSequence, Object)} instead.
*
* @see {@link #setHeader(HttpMessage, CharSequence, Object)}
* @see #setHeader(HttpMessage, CharSequence, Object)
*/
@Deprecated
public static void setHeader(HttpMessage message, String name, Object value) {
Expand All @@ -614,7 +614,7 @@ public static void setHeader(HttpMessage message, CharSequence name, Object valu
/**
* @deprecated Use {@link #set(CharSequence, Iterable)} instead.
*
* @see {@link #setHeader(HttpMessage, CharSequence, Iterable)}
* @see #setHeader(HttpMessage, CharSequence, Iterable)
*/
@Deprecated
public static void setHeader(HttpMessage message, String name, Iterable<?> values) {
Expand Down Expand Up @@ -645,7 +645,7 @@ public static void setHeader(HttpMessage message, CharSequence name, Iterable<?>
/**
* @deprecated Use {@link #add(CharSequence, Object)} instead.
*
* @see {@link #addHeader(HttpMessage, CharSequence, Object)}
* @see #addHeader(HttpMessage, CharSequence, Object)
*/
@Deprecated
public static void addHeader(HttpMessage message, String name, Object value) {
Expand All @@ -669,7 +669,7 @@ public static void addHeader(HttpMessage message, CharSequence name, Object valu
/**
* @deprecated Use {@link #remove(CharSequence)} instead.
*
* @see {@link #removeHeader(HttpMessage, CharSequence)}
* @see #removeHeader(HttpMessage, CharSequence)
*/
@Deprecated
public static void removeHeader(HttpMessage message, String name) {
Expand Down Expand Up @@ -699,7 +699,7 @@ public static void clearHeaders(HttpMessage message) {
/**
* @deprecated Use {@link #getInt(CharSequence)} instead.
*
* @see {@link #getIntHeader(HttpMessage, CharSequence)}
* @see #getIntHeader(HttpMessage, CharSequence)
*/
@Deprecated
public static int getIntHeader(HttpMessage message, String name) {
Expand Down Expand Up @@ -729,7 +729,7 @@ public static int getIntHeader(HttpMessage message, CharSequence name) {
/**
* @deprecated Use {@link #getInt(CharSequence, int)} instead.
*
* @see {@link #getIntHeader(HttpMessage, CharSequence, int)}
* @see #getIntHeader(HttpMessage, CharSequence, int)
*/
@Deprecated
public static int getIntHeader(HttpMessage message, String name, int defaultValue) {
Expand All @@ -754,7 +754,7 @@ public static int getIntHeader(HttpMessage message, CharSequence name, int defau
/**
* @deprecated Use {@link #setInt(CharSequence, int)} instead.
*
* @see {@link #setIntHeader(HttpMessage, CharSequence, int)}
* @see #setIntHeader(HttpMessage, CharSequence, int)
*/
@Deprecated
public static void setIntHeader(HttpMessage message, String name, int value) {
Expand All @@ -775,7 +775,7 @@ public static void setIntHeader(HttpMessage message, CharSequence name, int valu
/**
* @deprecated Use {@link #set(CharSequence, Iterable)} instead.
*
* @see {@link #setIntHeader(HttpMessage, CharSequence, Iterable)}
* @see #setIntHeader(HttpMessage, CharSequence, Iterable)
*/
@Deprecated
public static void setIntHeader(HttpMessage message, String name, Iterable<Integer> values) {
Expand All @@ -796,7 +796,7 @@ public static void setIntHeader(HttpMessage message, CharSequence name, Iterable
/**
* @deprecated Use {@link #add(CharSequence, Iterable)} instead.
*
* @see {@link #addIntHeader(HttpMessage, CharSequence, int)}
* @see #addIntHeader(HttpMessage, CharSequence, int)
*/
@Deprecated
public static void addIntHeader(HttpMessage message, String name, int value) {
Expand All @@ -816,7 +816,7 @@ public static void addIntHeader(HttpMessage message, CharSequence name, int valu
/**
* @deprecated Use {@link #getTimeMillis(CharSequence)} instead.
*
* @see {@link #getDateHeader(HttpMessage, CharSequence)}
* @see #getDateHeader(HttpMessage, CharSequence)
*/
@Deprecated
public static Date getDateHeader(HttpMessage message, String name) throws ParseException {
Expand Down Expand Up @@ -850,7 +850,7 @@ public static Date getDateHeader(HttpMessage message, CharSequence name) throws
/**
* @deprecated Use {@link #getTimeMillis(CharSequence, long)} instead.
*
* @see {@link #getDateHeader(HttpMessage, CharSequence, Date)}
* @see #getDateHeader(HttpMessage, CharSequence, Date)
*/
@Deprecated
public static Date getDateHeader(HttpMessage message, String name, Date defaultValue) {
Expand All @@ -877,7 +877,7 @@ public static Date getDateHeader(HttpMessage message, CharSequence name, Date de
/**
* @deprecated Use {@link #set(CharSequence, Object)} instead.
*
* @see {@link #setDateHeader(HttpMessage, CharSequence, Date)}
* @see #setDateHeader(HttpMessage, CharSequence, Date)
*/
@Deprecated
public static void setDateHeader(HttpMessage message, String name, Date value) {
Expand All @@ -904,7 +904,7 @@ public static void setDateHeader(HttpMessage message, CharSequence name, Date va
/**
* @deprecated Use {@link #set(CharSequence, Iterable)} instead.
*
* @see {@link #setDateHeader(HttpMessage, CharSequence, Iterable)}
* @see #setDateHeader(HttpMessage, CharSequence, Iterable)
*/
@Deprecated
public static void setDateHeader(HttpMessage message, String name, Iterable<Date> values) {
Expand All @@ -927,7 +927,7 @@ public static void setDateHeader(HttpMessage message, CharSequence name, Iterabl
/**
* @deprecated Use {@link #add(CharSequence, Object)} instead.
*
* @see {@link #addDateHeader(HttpMessage, CharSequence, Date)}
* @see #addDateHeader(HttpMessage, CharSequence, Date)
*/
@Deprecated
public static void addDateHeader(HttpMessage message, String name, Date value) {
Expand Down Expand Up @@ -1014,7 +1014,7 @@ public static String getHost(HttpMessage message, String defaultValue) {
/**
* @deprecated Use {@link #set(CharSequence, Object)} instead.
*
* @see {@link #setHost(HttpMessage, CharSequence)}
* @see #setHost(HttpMessage, CharSequence)
*/
@Deprecated
public static void setHost(HttpMessage message, String value) {
Expand Down Expand Up @@ -1298,7 +1298,7 @@ public List<String> getAll(CharSequence name) {
public abstract List<Map.Entry<String, String>> entries();

/**
* @see {@link #contains(CharSequence)}
* @see #contains(CharSequence)
*/
public abstract boolean contains(String name);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,10 +473,10 @@ private static final class HttpStatusLineProcessor implements ByteProcessor {
private final AsciiString string;
private int i;
/**
* 0 = New or havn't seen {@link ASCII_SPACE}.
* 1 = Last byte was {@link ASCII_SPACE}.
* 2 = Terminal State. Processed the byte after {@link ASCII_SPACE}, and parsed the status line.
* 3 = Terminal State. There was no byte after {@link ASCII_SPACE} but status has been parsed with what we saw.
* 0 = New or havn't seen {@link #ASCII_SPACE}.
* 1 = Last byte was {@link #ASCII_SPACE}.
* 2 = Terminal State. Processed the byte after {@link #ASCII_SPACE}, and parsed the status line.
* 3 = Terminal State. There was no byte after {@link #ASCII_SPACE} but status has been parsed with what we saw.
*/
private int state;
private HttpResponseStatus status;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
package io.netty.handler.codec.http;

import io.netty.handler.codec.http.cookie.ServerCookieDecoder;

import java.util.Collection;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public interface HttpData extends InterfaceHttpData, ByteBufHolder {
*
* @param buffer
* must be not null
* @exception IOException
* @throws IOException
*/
void setContent(ByteBuf buffer) throws IOException;

Expand All @@ -63,7 +63,7 @@ public interface HttpData extends InterfaceHttpData, ByteBufHolder {
* must be not null except if last is set to False
* @param last
* True of the buffer is the last one
* @exception IOException
* @throws IOException
*/
void addContent(ByteBuf buffer, boolean last) throws IOException;

Expand All @@ -72,7 +72,7 @@ public interface HttpData extends InterfaceHttpData, ByteBufHolder {
*
* @param file
* must be not null
* @exception IOException
* @throws IOException
*/
void setContent(File file) throws IOException;

Expand All @@ -81,7 +81,7 @@ public interface HttpData extends InterfaceHttpData, ByteBufHolder {
*
* @param inputStream
* must be not null
* @exception IOException
* @throws IOException
*/
void setContent(InputStream inputStream) throws IOException;

Expand Down Expand Up @@ -124,7 +124,7 @@ public interface HttpData extends InterfaceHttpData, ByteBufHolder {
* Returns the contents of the file item as an array of bytes.
*
* @return the contents of the file item as an array of bytes.
* @exception IOException
* @throws IOException
*/
byte[] get() throws IOException;

Expand Down Expand Up @@ -153,7 +153,7 @@ public interface HttpData extends InterfaceHttpData, ByteBufHolder {
*
* @return the contents of the file item as a String, using the default
* character encoding.
* @exception IOException
* @throws IOException
*/
String getString() throws IOException;

Expand All @@ -165,7 +165,7 @@ public interface HttpData extends InterfaceHttpData, ByteBufHolder {
* the charset to use
* @return the contents of the file item as a String, using the specified
* charset.
* @exception IOException
* @throws IOException
*/
String getString(Charset encoding) throws IOException;

Expand Down Expand Up @@ -193,7 +193,7 @@ public interface HttpData extends InterfaceHttpData, ByteBufHolder {
* @param dest
* destination file - must be not null
* @return True if the write is successful
* @exception IOException
* @throws IOException
*/
boolean renameTo(File dest) throws IOException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,12 @@ public void run() {
protected abstract void doWrite(Object msg) throws Exception;

/**
* Process end of batch of {@link #doWrite()}s. May be called from any thread.
* Process end of batch of {@link #doWrite(ChannelOutboundBuffer)}s. May be called from any thread.
*/
protected abstract void doWriteComplete();

/**
* The ideal thread for events like {@link #doWrite()} to be processed on. May be used for
* The ideal thread for events like {@link #doWrite(ChannelOutboundBuffer)} to be processed on. May be used for
* efficient batching, but not required.
*/
protected abstract EventExecutor preferredEventExecutor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public DefaultHttp2FrameReader() {
/**
* Create a new instance.
* @param validateHeaders {@code true} to validate headers. {@code false} to not validate headers.
* @see {@link DefaultHttp2HeadersDecoder(boolean)}
* @see DefaultHttp2HeadersDecoder(boolean)
*/
public DefaultHttp2FrameReader(boolean validateHeaders) {
this(new DefaultHttp2HeadersDecoder(validateHeaders));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,6 @@ protected void onStreamError(ChannelHandlerContext ctx, @SuppressWarnings("unuse
*
* @param ctx the channel context
* @param stream the Http2Stream on which the header was received
* @throws Http2Exception if an exception occurs while processing the decode error.
*/
protected void handleServerHeaderDecodeSizeError(ChannelHandlerContext ctx, Http2Stream stream) {
encoder().writeHeaders(ctx, stream.id(), HEADERS_TOO_LARGE_HEADERS, 0, true, ctx.newPromise());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public void onStreamRemoved(Http2Stream stream) {
*
* @param ctx The context to fire the event on
* @param msg The message to send
* @param release {@code true} to release if present in {@link #messageMap}. {@code false} otherwise.
* @param release {@code true} to call release on the value if it is present. {@code false} to not call release.
* @param stream the stream of the message which is being fired
*/
protected void fireChannelRead(ChannelHandlerContext ctx, FullHttpMessage msg, boolean release,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ interface StreamState {
* Get the amount of bytes this stream has pending to send. The actual amount written must not exceed
* {@link #windowSize()}!
* @return The amount of bytes this stream has pending to send.
* @see {@link io.netty.handler.codec.http2.Http2CodecUtil#streamableBytes(StreamState)}
* @see Http2CodecUtil#streamableBytes(StreamState)
*/
int pendingBytes();

Expand All @@ -54,7 +54,7 @@ interface StreamState {
* an stream has been given a chance to write an empty frame, and also enables optimizations like not writing
* empty frames in some situations (don't write headers until data can also be written).
* @return the size of the stream's flow control window.
* @see {@link io.netty.handler.codec.http2.Http2CodecUtil#streamableBytes(StreamState)}
* @see Http2CodecUtil#streamableBytes(StreamState)
*/
int windowSize();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@
* bytes.
* <p>
* Inspiration for this distributor was taken from Linux's
* <a href="https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/Documentation/scheduler
* /sched-design-CFS.txt">Completely Fair Scheduler</a>
* <a href="https://www.kernel.org/doc/Documentation/scheduler/sched-design-CFS.txt">Completely Fair Scheduler</a>
* to model the distribution of bytes to simulate an "ideal multi-tasking CPU", but in this case we are simulating
* an "ideal multi-tasking NIC".
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
import io.netty.util.internal.ObjectUtil;
import io.netty.util.internal.ThrowableUtil;

import java.io.IOException;

import static io.netty.handler.codec.http2.Http2Error.COMPRESSION_ERROR;
import static io.netty.handler.codec.http2.Http2Exception.connectionError;
import static io.netty.handler.codec.http2.internal.hpack.HpackUtil.HUFFMAN_CODES;
Expand All @@ -65,8 +63,7 @@ final class HuffmanDecoder {
*
* @param buf the string literal to be decoded
* @return the output stream for the compressed data
* @throws IOException if an I/O error occurs. In particular, an <code>IOException</code> may be
* thrown if the output stream has been closed.
* @throws Http2Exception EOS Decoded
*/
public AsciiString decode(ByteBuf buf, int length) throws Http2Exception {
processor.reset();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ private void encodeSlowPath(ByteBuf out, CharSequence data) {
* Returns the number of bytes required to Huffman encode the input string literal.
*
* @param data the string literal to be Huffman encoded
* @return the number of bytes required to Huffman encode <code>data</code>
* @return the number of bytes required to Huffman encode {@code data}
*/
int getEncodedLength(CharSequence data) {
if (data instanceof AsciiString) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ protected void decodeLast(ChannelHandlerContext ctx, ByteBuf in, List<Object> ou
};

/**
* @see {@link #ByteToMessageCodec(boolean)} with {@code true} as boolean parameter.
* see {@link #ByteToMessageCodec(boolean)} with {@code true} as boolean parameter.
*/
protected ByteToMessageCodec() {
this(true);
}

/**
* @see {@link #ByteToMessageCodec(Class, boolean)} with {@code true} as boolean value.
* see {@link #ByteToMessageCodec(Class, boolean)} with {@code true} as boolean value.
*/
protected ByteToMessageCodec(Class<? extends I> outboundMessageType) {
this(outboundMessageType, true);
Expand Down
Loading

0 comments on commit 0623c6c

Please sign in to comment.