[checkstyle] Tighten JavadocMethod checkstyle rule

This commit is contained in:
Florian Schmaus 2020-05-23 22:35:27 +02:00
parent 5bfe789e08
commit ebe5c49e92
12 changed files with 45 additions and 34 deletions

View File

@ -105,10 +105,6 @@
<module name="JavadocMethod">
<!-- TODO stricten those checks -->
<property name="scope" value="public"/>
<property name="allowUndeclaredRTE" value="true"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingThrowsTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="allowMissingJavadoc" value="true"/>
<property name="suppressLoadErrors" value="true"/>
</module>

View File

@ -29,6 +29,7 @@ public class ProviderManagerTest {
/**
* This test should be run in a clean (e.g. forked) VM
* @throws Exception if exception.
*/
@Test
public void shouldInitializeSmackTest() throws Exception {

View File

@ -150,6 +150,7 @@ public class DummyConnection extends AbstractXMPPConnection {
* Returns the first stanza that's sent through {@link #sendStanza(Stanza)}
* and that has not been returned by earlier calls to this method.
*
* @param <P> the top level stream element class.
* @return a sent packet.
*/
public <P extends TopLevelStreamElement> P getSentPacket() {
@ -162,6 +163,8 @@ public class DummyConnection extends AbstractXMPPConnection {
* method will block for up to the specified number of seconds if no packets
* have been sent yet.
*
* @param wait how long to wait in seconds.
* @param <P> the top level stream element class.
* @return a sent packet.
*/
@SuppressWarnings("unchecked")

View File

@ -324,8 +324,7 @@ public final class HttpFileUploadManager extends Manager {
* supported by the service.
* @throws InterruptedException if the calling thread was interrupted.
* @throws XMPPException.XMPPErrorException if there was an XMPP error returned.
* @throws SmackException.NotConnectedException if the XMPP connection is not connected.
* @throws SmackException.NoResponseException if there was no response from the remote entity.
* @throws SmackException if smack exception.
*/
public Slot requestSlot(String filename, long fileSize) throws InterruptedException,
XMPPException.XMPPErrorException, SmackException {
@ -348,7 +347,7 @@ public final class HttpFileUploadManager extends Manager {
* @throws SmackException.NotConnectedException if the XMPP connection is not connected.
* @throws InterruptedException if the calling thread was interrupted.
* @throws XMPPException.XMPPErrorException if there was an XMPP error returned.
* @throws SmackException.NoResponseException if there was no response from the remote entity.
* @throws SmackException if smack exception.
*/
public Slot requestSlot(String filename, long fileSize, String contentType) throws SmackException,
InterruptedException, XMPPException.XMPPErrorException {

View File

@ -186,8 +186,8 @@ public final class UserTuneElement implements ExtensionElement {
/**
* Artist is an optional element in UserTuneElement.
* @param artist.
* @return builder.
* @param artist the artist.
* @return a reference to this builder.
*/
public Builder setArtist(String artist) {
this.artist = artist;
@ -196,8 +196,8 @@ public final class UserTuneElement implements ExtensionElement {
/**
* Length is an optional element in UserTuneElement.
* @param length.
* @return builder.
* @param length the length.
* @return a reference to this builder.
*/
public Builder setLength(int length) {
return setLength(UInt16.from(length));
@ -205,8 +205,8 @@ public final class UserTuneElement implements ExtensionElement {
/**
* Length is an optional element in UserTuneElement.
* @param length.
* @return builder.
* @param length the length.
* @return a reference to this builder.
*/
public Builder setLength(UInt16 length) {
this.length = length;
@ -215,8 +215,8 @@ public final class UserTuneElement implements ExtensionElement {
/**
* Rating is an optional element in UserTuneElement.
* @param rating.
* @return builder.
* @param rating the rating.
* @return a reference to this builder.
*/
public Builder setRating(int rating) {
this.rating = rating;
@ -225,8 +225,8 @@ public final class UserTuneElement implements ExtensionElement {
/**
* Source is an optional element in UserTuneElement.
* @param source.
* @return builder.
* @param source the source.
* @return a reference to this builder.
*/
public Builder setSource(String source) {
this.source = source;
@ -235,8 +235,8 @@ public final class UserTuneElement implements ExtensionElement {
/**
* Title is an optional element in UserTuneElement.
* @param title.
* @return builder.
* @param title the title.
* @return a reference to this builder.
*/
public Builder setTitle(String title) {
this.title = title;
@ -245,8 +245,8 @@ public final class UserTuneElement implements ExtensionElement {
/**
* Track is an optional element in UserTuneElement.
* @param track.
* @return builder.
* @param track the track.
* @return a reference to this builder.
*/
public Builder setTrack(String track) {
this.track = track;
@ -255,8 +255,8 @@ public final class UserTuneElement implements ExtensionElement {
/**
* URI is an optional element in UserTuneElement.
* @param uri.
* @return builder.
* @param uri the URI.
* @return a reference to this builder.
*/
public Builder setUri(URI uri) {
this.uri = uri;

View File

@ -86,7 +86,7 @@ public class Socks5ProxyTest {
* When inserting new network addresses to the proxy the order should remain in the order they
* were inserted.
*
* @throws UnknownHostException
* @throws UnknownHostException if unknown host.
*/
@Test
public void shouldPreserveAddressOrderOnInsertions() throws UnknownHostException {
@ -114,7 +114,7 @@ public class Socks5ProxyTest {
* When replacing network addresses of the proxy the order should remain in the order if the
* given list.
*
* @throws UnknownHostException
* @throws UnknownHostException if unknown host.
*/
@Test
public void shouldPreserveAddressOrderOnReplace() throws UnknownHostException {

View File

@ -95,6 +95,8 @@ public class RosterTest extends InitSmackIm {
* Test a simple roster initialization according to the example in
* <a href="http://xmpp.org/rfcs/rfc3921.html#roster-login"
* >RFC3921: Retrieving One's Roster on Login</a>.
*
* @throws Exception in case of an exception.
*/
@Test
public void testSimpleRosterInitialization() throws Exception {
@ -131,6 +133,8 @@ public class RosterTest extends InitSmackIm {
* Test adding a roster item according to the example in
* <a href="http://xmpp.org/rfcs/rfc3921.html#roster-add"
* >RFC3921: Adding a Roster Item</a>.
*
* @throws Throwable in case a throwable is thrown.
*/
@Test
public void testAddRosterItem() throws Throwable {
@ -203,6 +207,8 @@ public class RosterTest extends InitSmackIm {
* Test updating a roster item according to the example in
* <a href="http://xmpp.org/rfcs/rfc3921.html#roster-update"
* >RFC3921: Updating a Roster Item</a>.
*
* @throws Throwable in case a throwable is thrown.
*/
@Test
public void testUpdateRosterItem() throws Throwable {
@ -279,6 +285,7 @@ public class RosterTest extends InitSmackIm {
* Test deleting a roster item according to the example in
* <a href="http://xmpp.org/rfcs/rfc3921.html#roster-delete"
* >RFC3921: Deleting a Roster Item</a>.
* @throws Throwable if throwable is thrown.
*/
@Test
public void testDeleteRosterItem() throws Throwable {
@ -327,6 +334,7 @@ public class RosterTest extends InitSmackIm {
* Test a simple roster push according to the example in
* <a href="http://xmpp.org/internet-drafts/draft-ietf-xmpp-3921bis-03.html#roster-syntax-actions-push"
* >RFC3921bis-03: Roster Push</a>.
* @throws Throwable in case a throwable is thrown.
*/
@Test
public void testSimpleRosterPush() throws Throwable {
@ -398,6 +406,7 @@ public class RosterTest extends InitSmackIm {
* Test if adding an user with an empty group is equivalent with providing
* no group.
*
* @throws Throwable in case a throwable is thrown.
* @see <a href="http://www.igniterealtime.org/issues/browse/SMACK-294">SMACK-294</a>
*/
@Test(timeout = 5000)
@ -466,6 +475,7 @@ public class RosterTest extends InitSmackIm {
* Test processing a roster push with an empty group is equivalent with providing
* no group.
*
* @throws Throwable in case a throwable is thrown.
* @see <a href="http://www.igniterealtime.org/issues/browse/SMACK-294">SMACK-294</a>
*/
@Test

View File

@ -97,6 +97,8 @@ public class RosterVersioningTest {
* by all entries of the roster store.
* @throws SmackException if Smack detected an exceptional situation.
* @throws XMPPException if an XMPP protocol error was received.
* @throws InterruptedException if interrupted.
* @throws IOException if IO exception.
*/
@Test(timeout = 300000)
public void testEqualVersionStored() throws InterruptedException, IOException, XMPPException, SmackException {
@ -172,6 +174,7 @@ public class RosterVersioningTest {
/**
* Test roster versioning with roster pushes.
* @throws Throwable in case a throwable is thrown.
*/
@SuppressWarnings("UndefinedEquals")
@Test(timeout = 5000)

View File

@ -57,6 +57,7 @@ public class DirectoryRosterStoreTest {
/**
* Tests that opening an uninitialized directory fails.
* @throws IOException if IO exception.
*/
@Test
public void testStoreUninitialized() throws IOException {
@ -66,6 +67,7 @@ public class DirectoryRosterStoreTest {
/**
* Tests that an initialized directory is empty.
* @throws IOException if IO exception.
*/
@Test
public void testStoreInitializedEmpty() throws IOException {
@ -80,6 +82,7 @@ public class DirectoryRosterStoreTest {
/**
* Tests adding and removing entries.
* @throws IOException if IO exception.
*/
@Test
public void testStoreAddRemove() throws IOException {

View File

@ -125,11 +125,7 @@ public class EntityCapsTest extends AbstractSmackIntegrationTest {
/**
* Test if entity caps actually prevent a disco info request and reply.
*
* @throws XMPPException if an XMPP protocol error was received.
* @throws InterruptedException if the calling thread was interrupted.
* @throws NotConnectedException if the XMPP connection is not connected.
* @throws NoResponseException if there was no response from the remote entity.
*
* @throws Exception if exception.
*/
@SmackIntegrationTest
public void testPreventDiscoInfo() throws Exception {

View File

@ -60,7 +60,7 @@ public class SignalOmemoStoreTest extends OmemoStoreTest<IdentityKeyPair, Identi
/**
* We are running this Test with multiple available OmemoStore implementations.
* @return
* @return the test parameters.
* @throws IOException if an I/O error occurred.
*/
@Parameterized.Parameters

View File

@ -52,12 +52,12 @@ public class PacketWriterTest {
* interrupt.
*
* @throws InterruptedException if the calling thread was interrupted.
* @throws BrokenBarrierException
* @throws BrokenBarrierException in case of a broken barrier.
* @throws NotConnectedException if the XMPP connection is not connected.
* @throws XmppStringprepException if the provided string is invalid.
* @throws SecurityException if there was a security violation.
* @throws NoSuchFieldException
* @throws IllegalAccessException
* @throws NoSuchFieldException if there is no such field.
* @throws IllegalAccessException if there was an illegal access.
* @throws IllegalArgumentException if an illegal argument was given.
*/
@Test