1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-09 18:29:45 +02:00

Enable MissingJavadocPackage and UnnecessaryParentheses checkstyle checks

This commit is contained in:
Florian Schmaus 2019-07-24 09:18:39 +02:00
parent 2ac452fe1e
commit 4ca2c7cc69
76 changed files with 120 additions and 131 deletions

View file

@ -138,7 +138,7 @@ public final class CarbonManager extends Manager {
// also reset here.
enabled_state = false;
boolean removed = connection().removeSyncStanzaListener(carbonsListener);
assert (removed);
assert removed;
}
@Override
public void authenticated(XMPPConnection connection, boolean resumed) {

View file

@ -62,7 +62,7 @@ public final class EligibleForChatMarkerFilter extends StanzaExtensionFilter {
ChatState state;
try {
state = ChatState.valueOf(chatStateElementName);
return (state == ChatState.active);
return state == ChatState.active;
}
catch (Exception ex) {
return false;

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2017 Florian Schmaus
* Copyright 2017-2019 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -22,6 +22,5 @@ public enum MessageProcessingHintType {
no_store,
no_copy,
store,
;
}

View file

@ -134,7 +134,7 @@ public final class HttpFileUploadManager extends Manager {
}
private static UploadService uploadServiceFrom(DiscoverInfo discoverInfo) {
assert (containsHttpFileUploadNamespace(discoverInfo));
assert containsHttpFileUploadNamespace(discoverInfo);
UploadService.Version version;
if (discoverInfo.containsFeature(NAMESPACE)) {

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2016 Florian Schmaus
* Copyright 2016-2019 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -316,7 +316,7 @@ public final class IoTProvisioningManager extends Manager {
return null;
}
Jid jid = discoverInfos.get(0).getFrom();
assert (jid.isDomainBareJid());
assert jid.isDomainBareJid();
return jid.asDomainBareJid();
}
@ -341,7 +341,7 @@ public final class IoTProvisioningManager extends Manager {
IoTIsFriend iotIsFriend = new IoTIsFriend(friendInQuestion);
iotIsFriend.setTo(provisioningServer);
IoTIsFriendResponse response = connection().createStanzaCollectorAndSend(iotIsFriend).nextResultOrThrow();
assert (response.getJid().equals(friendInQuestion));
assert response.getJid().equals(friendInQuestion);
boolean isFriend = response.getIsFriendResult();
if (!isFriend) {
// Cache the negative is friend response.

View file

@ -39,7 +39,6 @@ public class MamPrefsIQ extends IQ {
always,
never,
roster,
;
}
/**

View file

@ -48,7 +48,7 @@ public class MamResultFilter extends FlexibleStanzaTypeFilter<Message> {
}
String resultQueryId = mamResultExtension.getQueryId();
return ((queryId == null && resultQueryId == null) || (queryId != null && queryId.equals(resultQueryId)));
return (queryId == null && resultQueryId == null) || (queryId != null && queryId.equals(resultQueryId));
}
}

View file

@ -65,7 +65,7 @@ public class AbstractHttpOverXmppProviderTest {
IQ iq = provider.parse(parser);
assertTrue(iq instanceof HttpOverXmppResp);
HttpOverXmppResp body = ((HttpOverXmppResp) iq);
HttpOverXmppResp body = (HttpOverXmppResp) iq;
checkHeaders(body.getHeaders(), expectedHeaders);
}
@ -85,7 +85,7 @@ public class AbstractHttpOverXmppProviderTest {
IQ iq = provider.parse(parser);
assertTrue(iq instanceof HttpOverXmppReq);
HttpOverXmppReq body = ((HttpOverXmppReq) iq);
HttpOverXmppReq body = (HttpOverXmppReq) iq;
checkHeaders(body.getHeaders(), expectedHeaders);
}