Apply checkstyle to javadoc

This commit is contained in:
md_5 2020-01-05 11:25:56 +11:00
parent 6c8a0ccecb
commit d20e622b7b
8 changed files with 27 additions and 4 deletions

View File

@ -116,9 +116,9 @@ public final class ComponentBuilder
* *
* @param pos the cursor position synonymous to an element position for a * @param pos the cursor position synonymous to an element position for a
* list * list
* @return this ComponentBuilder for chaining
* @throws IndexOutOfBoundsException if the index is out of range * @throws IndexOutOfBoundsException if the index is out of range
* ({@code index < 0 || index >= size()}) * ({@code index < 0 || index >= size()})
* @return this ComponentBuilder for chaining
*/ */
public ComponentBuilder setCursor(int pos) throws IndexOutOfBoundsException public ComponentBuilder setCursor(int pos) throws IndexOutOfBoundsException
{ {

View File

@ -55,12 +55,12 @@ public final class TranslatableComponent extends BaseComponent
/** /**
* Creates a translatable component with the passed substitutions * Creates a translatable component with the passed substitutions
* *
* @see #translate
* @see #setWith(java.util.List)
* @param translate the translation key * @param translate the translation key
* @param with the {@link java.lang.String}s and * @param with the {@link java.lang.String}s and
* {@link net.md_5.bungee.api.chat.BaseComponent}s to use into the * {@link net.md_5.bungee.api.chat.BaseComponent}s to use into the
* translation * translation
* @see #translate
* @see #setWith(java.util.List)
*/ */
public TranslatableComponent(String translate, Object... with) public TranslatableComponent(String translate, Object... with)
{ {

View File

@ -21,6 +21,16 @@
</module> </module>
<module name="TreeWalker"> <module name="TreeWalker">
<!-- See https://checkstyle.org/config_javadoc.html -->
<module name="AtclauseOrder"/>
<module name="InvalidJavadocPosition"/>
<module name="JavadocBlockTagLocation"/>
<module name="JavadocContentLocationCheck"/>
<module name="JavadocMethod"/>
<module name="JavadocType"/>
<module name="MissingJavadocPackage"/>
<module name="NonEmptyAtclauseDescription"/>
<!-- See http://checkstyle.sourceforge.net/config_filters.html --> <!-- See http://checkstyle.sourceforge.net/config_filters.html -->
<module name="SuppressionCommentFilter"/> <module name="SuppressionCommentFilter"/>

View File

@ -166,6 +166,8 @@ public class EventBus
* Shouldn't be called without first locking the writeLock; intended for use * Shouldn't be called without first locking the writeLock; intended for use
* only inside {@link #register(java.lang.Object) register(Object)} or * only inside {@link #register(java.lang.Object) register(Object)} or
* {@link #unregister(java.lang.Object) unregister(Object)}. * {@link #unregister(java.lang.Object) unregister(Object)}.
*
* @param eventClass event class
*/ */
private void bakeHandlers(Class<?> eventClass) private void bakeHandlers(Class<?> eventClass)
{ {

View File

@ -80,6 +80,9 @@ public class NativeCipherTest
/** /**
* Hackish test which can test both native and fallback ciphers using direct * Hackish test which can test both native and fallback ciphers using direct
* buffers. * buffers.
*
* @param cipher cipher to test
* @throws java.lang.Exception any exceptions encountered
*/ */
public void testACipher(BungeeCipher cipher) throws Exception public void testACipher(BungeeCipher cipher) throws Exception
{ {

View File

@ -52,7 +52,10 @@ public class Metrics extends TimerTask
} }
/** /**
* Generic method that posts a plugin to the metrics website * Generic method that posts a plugin to the metrics website.
*
* @param isPing first post or not
* @throws IOException any errors encountered
*/ */
private void postPlugin(boolean isPing) throws IOException private void postPlugin(boolean isPing) throws IOException
{ {
@ -110,6 +113,7 @@ public class Metrics extends TimerTask
* @param buffer the StringBuilder to append the data pair onto * @param buffer the StringBuilder to append the data pair onto
* @param key the key value * @param key the key value
* @param value the value * @param value the value
* @throws UnsupportedEncodingException if UTF-8 encoding not supported
*/ */
private static void encodeDataPair(final StringBuilder buffer, final String key, final String value) throws UnsupportedEncodingException private static void encodeDataPair(final StringBuilder buffer, final String key, final String value) throws UnsupportedEncodingException
{ {
@ -121,6 +125,7 @@ public class Metrics extends TimerTask
* *
* @param text the text to encode * @param text the text to encode
* @return the encoded text, as UTF-8 * @return the encoded text, as UTF-8
* @throws UnsupportedEncodingException if UTF-8 encoding not supported
*/ */
private static String encode(final String text) throws UnsupportedEncodingException private static String encode(final String text) throws UnsupportedEncodingException
{ {

View File

@ -49,6 +49,7 @@ public class ForgeClientHandler
* Handles the Forge packet. * Handles the Forge packet.
* *
* @param message The Forge Handshake packet to handle. * @param message The Forge Handshake packet to handle.
* @throws IllegalArgumentException if invalid packet received
*/ */
public void handle(PluginMessage message) throws IllegalArgumentException public void handle(PluginMessage message) throws IllegalArgumentException
{ {
@ -79,6 +80,7 @@ public class ForgeClientHandler
* Receives a {@link PluginMessage} from ForgeServer to pass to Client. * Receives a {@link PluginMessage} from ForgeServer to pass to Client.
* *
* @param message The message to being received. * @param message The message to being received.
* @throws IllegalArgumentException if invalid packet received
*/ */
public void receive(PluginMessage message) throws IllegalArgumentException public void receive(PluginMessage message) throws IllegalArgumentException
{ {

View File

@ -67,6 +67,7 @@ public class ForgeServerHandler
* Receives a {@link PluginMessage} from ForgeClientData to pass to Server. * Receives a {@link PluginMessage} from ForgeClientData to pass to Server.
* *
* @param message The message to being received. * @param message The message to being received.
* @throws IllegalArgumentException if invalid packet received
*/ */
public void receive(PluginMessage message) throws IllegalArgumentException public void receive(PluginMessage message) throws IllegalArgumentException
{ {