Skip to content

Commit 629f805

Browse files
committed
docs: fixes warnings
1 parent 462c2a0 commit 629f805

File tree

9 files changed

+36
-33
lines changed

9 files changed

+36
-33
lines changed

msgpack-core/src/main/java/org/msgpack/core/MessagePacker.java

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ else if (v < (1 << 7)) {
447447
* <p>
448448
* This method writes an integer using the smallest format from the int format family.
449449
*
450-
* @param v the integer to be written
450+
* @param r the integer to be written
451451
* @return this
452452
* @throws IOException when underlaying output throws IOException
453453
*/
@@ -570,7 +570,7 @@ else if (bi.bitLength() == 64 && bi.signum() == 1) {
570570
* <p>
571571
* This method writes a float value using float format family.
572572
*
573-
* @param bi the integer to be written
573+
* @param v the value to be written
574574
* @return this
575575
* @throws IOException when underlaying output throws IOException
576576
*/
@@ -587,7 +587,7 @@ public MessagePacker packFloat(float v)
587587
* <p>
588588
* This method writes a float value using float format family.
589589
*
590-
* @param bi the integer to be written
590+
* @param v the value to be written
591591
* @return this
592592
* @throws IOException when underlaying output throws IOException
593593
*/
@@ -826,7 +826,8 @@ public MessagePacker packValue(Value v)
826826
* <p>
827827
* You will call {@link #writePayload(byte[])} or {@link #addPayload(byte[])} method to write body binary.
828828
*
829-
* @param len number of bytes of a payload binary to be written
829+
* @param extType the extension type tag to be written
830+
* @param payloadLen number of bytes of a payload binary to be written
830831
* @return this
831832
* @throws IOException when underlaying output throws IOException
832833
*/
@@ -972,9 +973,9 @@ public MessagePacker writePayload(byte[] src, int off, int len)
972973
/**
973974
* Writes a byte array to the output.
974975
* <p>
975-
* Unlike {@link #writePayload} method, this method doesn't copy the byte array even when given byte array
976-
* is shorter than {@link MessagePack.PackerConfig#withBufferFlushThreshold(int)}. This is faster than
977-
* {@link writePayload} method but caller must not modify the byte array after calling this method.
976+
* Unlike {@link #writePayload(byte[])} method, this method doesn't copy the byte array even when given byte
977+
* array is shorter than {@link MessagePack.PackerConfig#withBufferFlushThreshold(int)}. This is faster than
978+
* {@link #writePayload(byte[])} method but caller must not modify the byte array after calling this method.
978979
*
979980
* @param src the data to add
980981
* @return this
@@ -989,9 +990,10 @@ public MessagePacker addPayload(byte[] src)
989990
/**
990991
* Writes a byte array to the output.
991992
* <p>
992-
* Unlike {@link #writePayload} method, this method doesn't copy the byte array even when given byte array
993-
* is shorter than {@link MessagePack.PackerConfig#withBufferFlushThreshold(int)}. This is faster than
994-
* {@link writePayload} method but caller must not modify the byte array after calling this method.
993+
* Unlike {@link #writePayload(byte[], int, int)} method, this method doesn't copy the byte array even when
994+
* given byte array is shorter than {@link MessagePack.PackerConfig#withBufferFlushThreshold(int)}.
995+
* This is faster than {@link #writePayload(byte[], int, int)} method but caller must not modify the byte array
996+
* after calling this method.
995997
*
996998
* @param src the data to add
997999
* @param off the start offset in the data

msgpack-core/src/main/java/org/msgpack/core/MessageUnpacker.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
* <p>
4848
* One use case is to read objects as {@link Value} using {@link #unpackValue} method. A {@link Value} object
4949
* contains type of the deserialized value as well as the value itself so that you can inspect type of the
50-
* deserialized values later. You can repeat {@link #unpackValue} until {@link hasNext()} method returns false so
50+
* deserialized values later. You can repeat {@link #unpackValue} until {@link #hasNext()} method returns false so
5151
* that you can deserialize sequence of MessagePack values.
5252
* <p>
5353
* The other use case is to use {@link #getNextFormat()} and {@link MessageFormat#getValueType()} methods followed
@@ -142,7 +142,7 @@
142142
* you call unpacker methods for each element.
143143
*
144144
* <p>
145-
* To read a Map, first you call {@link #unpackMapHeader(int)} method to get number of pairs of the map. Then,
145+
* To read a Map, first you call {@link #unpackMapHeader()} method to get number of pairs of the map. Then,
146146
* for each pair, you call unpacker methods for key first, and then value. You will call unpacker methods twice
147147
* as many time as the returned count.
148148
*
@@ -228,7 +228,7 @@ protected MessageUnpacker(MessageBufferInput in, MessagePack.UnpackerConfig conf
228228
* <p>
229229
* This method doesn't close the old input.
230230
*
231-
* @param out new input
231+
* @param in new input
232232
* @return the old input
233233
* @throws IOException never happens unless a subclass overrides this method
234234
* @throws NullPointerException the given input is null
@@ -718,7 +718,6 @@ public Variable unpackValue(Variable var)
718718
/**
719719
* Reads a Nil byte.
720720
*
721-
* @return the read value
722721
* @throws MessageTypeException when value is not MessagePack Nil type
723722
* @throws IOException when underlaying input throws IOException
724723
*/

msgpack-core/src/main/java/org/msgpack/core/buffer/MessageBuffer.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* big-endian order.
3434
* <p>
3535
* Applications can allocate a new buffer using {@link #allocate(int)} method, or wrap an byte array or ByteBuffer
36-
* using {@link wrap(byte[], int, int)} methods. {@link wrap(ByteBuffer)} method supports both direct buffers and
36+
* using {@link #wrap(byte[], int, int)} methods. {@link #wrap(ByteBuffer)} method supports both direct buffers and
3737
* array-backed buffers.
3838
* <p>
3939
* MessageBuffer class itself is optimized for little-endian CPU archtectures so that JVM (HotSpot) can take advantage
@@ -213,7 +213,7 @@ public static MessageBuffer allocate(int size)
213213
* The new buffer's size will be array.length. hasArray() will return true.
214214
*
215215
* @param array the byte array that will gack this MessageBuffer
216-
* @return
216+
* @return the new MessageBuffer
217217
*
218218
*/
219219
public static MessageBuffer wrap(byte[] array)
@@ -231,7 +231,7 @@ public static MessageBuffer wrap(byte[] array)
231231
* @param array the byte array that will gack this MessageBuffer
232232
* @param offset The offset of the subarray to be used; must be non-negative and no larger than array.length
233233
* @param length The length of the subarray to be used; must be non-negative and no larger than array.length - offset
234-
* @return
234+
* @return the new MessageBuffer
235235
*
236236
*/
237237
public static MessageBuffer wrap(byte[] array, int offset, int length)
@@ -249,7 +249,7 @@ public static MessageBuffer wrap(byte[] array, int offset, int length)
249249
* @param bb the byte buffer that will gack this MessageBuffer
250250
* @throws IllegalArgumentException given byte buffer returns false both from hasArray() and isDirect()
251251
* @throws UnsupportedOperationException given byte buffer is a direct buffer and this platform doesn't support Unsafe API
252-
* @return
252+
* @return the new MessageBuffer
253253
*
254254
*/
255255
public static MessageBuffer wrap(ByteBuffer bb)
@@ -381,9 +381,12 @@ protected MessageBuffer(Object base, long address, int length)
381381
}
382382

383383
/**
384-
* byte size of the buffer
384+
* Gets size of the buffer.
385385
*
386-
* @return
386+
* MessageBuffer doesn't have limit unlike ByteBuffer. Instead, you can use {@link #slice(int, int)} to get a
387+
* part of the buffer.
388+
*
389+
* @return number of bytes
387390
*/
388391
public int size()
389392
{

msgpack-core/src/main/java/org/msgpack/core/buffer/MessageBufferInput.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ MessageBuffer next()
4343
/**
4444
* Closes the input.
4545
* <p>
46-
* When this method is called, the buffer previously returned from {@link next()} method is no longer used.
46+
* When this method is called, the buffer previously returned from {@link #next()} method is no longer used.
4747
* Thus implementation of this method can safely discard it.
4848
* <p>
4949
* If the input is already closed then invoking this method has no effect.

msgpack-core/src/main/java/org/msgpack/core/buffer/MessageBufferOutput.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public interface MessageBufferOutput
3434
* This method should return a MessageBuffer instance that has specified size of capacity at least.
3535
* <p>
3636
* When this method is called twice, the previously returned buffer is no longer used. This method may be called
37-
* twice without call of {@link writeBuffer(MessageBuffer)} in between. In this case, the buffer should be
37+
* twice without call of {@link #writeBuffer(int)} in between. In this case, the buffer should be
3838
* discarded without flushing it to the output.
3939
*
4040
* @param minimumSize the mimium required buffer size to allocate
@@ -47,11 +47,11 @@ MessageBuffer next(int minimumSize)
4747
/**
4848
* Writes the previously allocated buffer.
4949
* <p>
50-
* This method should write the buffer previously returned from {@link next(int)} method until specified number of
50+
* This method should write the buffer previously returned from {@link #next(int)} method until specified number of
5151
* bytes. Once the buffer is written, the buffer is no longer used.
5252
* <p>
53-
* This method is not always called for each {@link next(int)} call. In this case, the buffer should be discarded
54-
* without flushing it to the output when the next {@link next(int)} is called.
53+
* This method is not always called for each {@link #next(int)} call. In this case, the buffer should be discarded
54+
* without flushing it to the output when the next {@link #next(int)} is called.
5555
*
5656
* @param length the number of bytes to write
5757
* @throws IOException
@@ -66,7 +66,6 @@ void writeBuffer(int length)
6666
* @param buffer the data to write
6767
* @param offset the start offset in the data
6868
* @param length the number of bytes to write
69-
* @return
7069
* @throws IOException
7170
*/
7271
void write(byte[] buffer, int offset, int length)
@@ -82,7 +81,6 @@ void write(byte[] buffer, int offset, int length)
8281
* @param buffer the data to add
8382
* @param offset the start offset in the data
8483
* @param length the number of bytes to add
85-
* @return
8684
* @throws IOException
8785
*/
8886
void add(byte[] buffer, int offset, int length)

msgpack-core/src/main/java/org/msgpack/value/ImmutableNumberValue.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
/**
1919
* Immutable base interface of {@link ImmutableIntegerValue} and {@link ImmutableFloatValue} interfaces. To extract primitive type values, call toXXX methods, which may lose some information by rounding or truncation.
2020
*
21-
* @see org.msgpack.value.immutableIntegerValue
22-
* @see org.msgpack.value.immutableFloatValue
21+
* @see org.msgpack.value.ImmutableIntegerValue
22+
* @see org.msgpack.value.ImmutableFloatValue
2323
*/
2424
public interface ImmutableNumberValue
2525
extends NumberValue, ImmutableValue

msgpack-core/src/main/java/org/msgpack/value/IntegerValue.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ public interface IntegerValue
4949

5050
/**
5151
* Returns the most succinct MessageFormat type to represent this integer value.
52-
* @return
52+
*
53+
* @return the smallest integer type of MessageFormat that is big enough to store the value.
5354
*/
5455
MessageFormat mostSuccinctMessageFormat();
5556

msgpack-core/src/main/java/org/msgpack/value/RawValue.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public interface RawValue
3838
/**
3939
* Returns the value as {@code ByteBuffer}.
4040
*
41-
* Returned ByteBuffer is read-only. See {@code#asReadOnlyBuffer()}.
41+
* Returned ByteBuffer is read-only. See also {@link java.nio.ByteBuffer#asReadOnlyBuffer()}.
4242
* This method doesn't copy the byte array as much as possible.
4343
*/
4444
ByteBuffer asByteBuffer();

msgpack-core/src/main/java/org/msgpack/value/ValueType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
/**
1919
* Representation of MessagePack types.
2020
* <p>
21-
* MessagePack uses hierarchical type system. Integer and Float are subypte of Number, Thus {@link isNumberType()}
22-
* returns true if type is Integer or Float. String and Binary are subtype of Raw. Thus {@link isRawType()} returns
21+
* MessagePack uses hierarchical type system. Integer and Float are subypte of Number, Thus {@link #isNumberType()}
22+
* returns true if type is Integer or Float. String and Binary are subtype of Raw. Thus {@link #isRawType()} returns
2323
* true if type is String or Binary.
2424
*
2525
* @see org.msgpack.core.MessageFormat

0 commit comments

Comments
 (0)