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

Enable LeftCurly checkstyle check

This commit is contained in:
Florian Schmaus 2018-04-06 10:21:46 +02:00
parent 5a841ff0a8
commit 9b5dafe541
93 changed files with 549 additions and 1087 deletions

View file

@ -1015,8 +1015,7 @@ public class AgentSession {
* @throws NotConnectedException
* @throws InterruptedException
*/
public void sendRoomInvitation(RoomInvitation.Type type, String invitee, String sessionID, String reason) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException
{
public void sendRoomInvitation(RoomInvitation.Type type, String invitee, String sessionID, String reason) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
final RoomInvitation invitation = new RoomInvitation(type, invitee, sessionID, reason);
IQ iq = new RoomInvitation.RoomInvitationIQ(invitation);
iq.setType(IQ.Type.set);
@ -1053,8 +1052,7 @@ public class AgentSession {
* @throws NotConnectedException
* @throws InterruptedException
*/
public void sendRoomTransfer(RoomTransfer.Type type, String invitee, String sessionID, String reason) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException
{
public void sendRoomTransfer(RoomTransfer.Type type, String invitee, String sessionID, String reason) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
final RoomTransfer transfer = new RoomTransfer(type, invitee, sessionID, reason);
IQ iq = new RoomTransfer.RoomTransferIQ(transfer);
iq.setType(IQ.Type.set);

View file

@ -67,8 +67,7 @@ public class Offer {
*/
Offer(XMPPConnection conn, AgentSession agentSession, Jid userID,
Jid userJID, Jid workgroupName, Date expiresDate,
String sessionID, Map<String, List<String>> metaData, OfferContent content)
{
String sessionID, Map<String, List<String>> metaData, OfferContent content) {
this.connection = conn;
this.session = agentSession;
this.userID = userID;

View file

@ -129,8 +129,7 @@ public class AgentStatusRequest extends IQ {
statusRequest.agents.add(parseAgent(parser));
}
else if (eventType == XmlPullParser.END_TAG &&
"agent-status-request".equals(parser.getName()))
{
"agent-status-request".equals(parser.getName())) {
done = true;
}
}
@ -149,8 +148,7 @@ public class AgentStatusRequest extends IQ {
name = parser.nextText();
}
else if (eventType == XmlPullParser.END_TAG &&
"agent".equals(parser.getName()))
{
"agent".equals(parser.getName())) {
done = true;
}
}

View file

@ -124,8 +124,7 @@ public class OfferRequestProvider extends IQProvider<IQ> {
private final OfferContent content;
public OfferRequestPacket(Jid userJID, Jid userID, int timeout, Map<String, List<String>> metaData,
String sessionID, OfferContent content)
{
String sessionID, OfferContent content) {
super(ELEMENT, NAMESPACE);
this.userJID = userJID;
this.userID = userID;

View file

@ -59,8 +59,7 @@ public class OfferRevokeProvider extends IQProvider<IQ> {
userID = ParserUtils.getJidAttribute(parser, "id");
}
else if ((eventType == XmlPullParser.END_TAG) && parser.getName().equals(
"offer-revoke"))
{
"offer-revoke")) {
done = true;
}
}

View file

@ -153,8 +153,7 @@ public final class QueueDetails implements ExtensionElement {
int eventType = parser.getEventType();
while (eventType != XmlPullParser.END_TAG &&
"notify-queue-details".equals(parser.getName()))
{
"notify-queue-details".equals(parser.getName())) {
eventType = parser.next();
while ((eventType == XmlPullParser.START_TAG) && "user".equals(parser.getName())) {
String uid;
@ -170,8 +169,7 @@ public final class QueueDetails implements ExtensionElement {
eventType = parser.next();
while ((eventType != XmlPullParser.END_TAG)
|| (!"user".equals(parser.getName())))
{
|| (!"user".equals(parser.getName()))) {
if ("position".equals(parser.getName())) {
position = Integer.parseInt(parser.nextText());
}

View file

@ -134,8 +134,7 @@ public class QueueOverview implements ExtensionElement {
eventType = parser.next();
while ((eventType != XmlPullParser.END_TAG)
|| (!ELEMENT_NAME.equals(parser.getName())))
{
|| (!ELEMENT_NAME.equals(parser.getName()))) {
if ("count".equals(parser.getName())) {
queueOverview.setUserCount(Integer.parseInt(parser.nextText()));
}

View file

@ -68,8 +68,7 @@ public class ListenerEventDispatcher implements Runnable {
* @param methodArguments the arguments supplied to the notification method
*/
public void addListenerTriplet(Object listenerInstance, Method listenerMethod,
Object[] methodArguments)
{
Object[] methodArguments) {
if (!this.isRunning) {
this.triplets.add(new TripletContainer(listenerInstance, listenerMethod,
methodArguments));

View file

@ -34,27 +34,23 @@ public class DefaultMessageEventRequestListener implements MessageEventRequestLi
@Override
public void deliveredNotificationRequested(Jid from, String packetID,
MessageEventManager messageEventManager) throws NotConnectedException, InterruptedException
{
MessageEventManager messageEventManager) throws NotConnectedException, InterruptedException {
// Send to the message's sender that the message has been delivered
messageEventManager.sendDeliveredNotification(from, packetID);
}
@Override
public void displayedNotificationRequested(Jid from, String packetID,
MessageEventManager messageEventManager)
{
MessageEventManager messageEventManager) {
}
@Override
public void composingNotificationRequested(Jid from, String packetID,
MessageEventManager messageEventManager)
{
MessageEventManager messageEventManager) {
}
@Override
public void offlineNotificationRequested(Jid from, String packetID,
MessageEventManager messageEventManager)
{
MessageEventManager messageEventManager) {
}
}

View file

@ -113,8 +113,7 @@ public final class MessageEventManager extends Manager {
* @param composing specifies if the composing event is requested.
*/
public static void addNotificationsRequests(Message message, boolean offline,
boolean delivered, boolean displayed, boolean composing)
{
boolean delivered, boolean displayed, boolean composing) {
// Create a MessageEvent Package and add it to the message
MessageEvent messageEvent = new MessageEvent();
messageEvent.setOffline(offline);