1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-12-16 18:11:08 +01:00

Fix minor codestyle issues

This commit is contained in:
Paul Schaub 2017-12-13 23:10:11 +01:00 committed by Florian Schmaus
parent 200f90ffdc
commit cb18056613
422 changed files with 1404 additions and 1444 deletions

View file

@ -419,7 +419,7 @@ public abstract class AdHocCommand {
complete,
/**
* The action is unknow. This is used when a recieved message has an
* The action is unknown. This is used when a received message has an
* unknown action. It must not be used to send an execution request.
*/
unknown

View file

@ -24,8 +24,8 @@ package org.jivesoftware.smackx.commands;
*/
public class AdHocCommandNote {
private Type type;
private String value;
private final Type type;
private final String value;
/**
* Creates a new adhoc command note with the specified type and value.

View file

@ -42,9 +42,9 @@ import org.jxmpp.jid.Jid;
public abstract class LocalCommand extends AdHocCommand {
/**
* The time stamp of first invokation of the command. Used to implement the session timeout.
* The time stamp of first invocation of the command. Used to implement the session timeout.
*/
private long creationDate;
private final long creationDate;
/**
* The unique ID of the execution of the command.
@ -59,12 +59,12 @@ public abstract class LocalCommand extends AdHocCommand {
/**
* The number of the current stage.
*/
private int currenStage;
private int currentStage;
public LocalCommand() {
super();
this.creationDate = System.currentTimeMillis();
currenStage = -1;
currentStage = -1;
}
/**
@ -139,7 +139,7 @@ public abstract class LocalCommand extends AdHocCommand {
* @return the current stage number.
*/
public int getCurrentStage() {
return currenStage;
return currentStage;
}
@Override
@ -154,7 +154,7 @@ public abstract class LocalCommand extends AdHocCommand {
*
*/
void incrementStage() {
currenStage++;
currentStage++;
}
/**
@ -163,6 +163,6 @@ public abstract class LocalCommand extends AdHocCommand {
*
*/
void decrementStage() {
currenStage--;
currentStage--;
}
}

View file

@ -46,12 +46,12 @@ public class RemoteCommand extends AdHocCommand {
/**
* The connection that is used to execute this command
*/
private XMPPConnection connection;
private final XMPPConnection connection;
/**
* The full JID of the command host
*/
private Jid jid;
private final Jid jid;
/**
* The session ID of this execution.
@ -132,8 +132,8 @@ public class RemoteCommand extends AdHocCommand {
*/
private void executeAction(Action action, Form form) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
// TODO: Check that all the required fields of the form were filled, if
// TODO: not throw the corresponding exeption. This will make a faster response,
// TODO: since the request is stoped before it's sent.
// TODO: not throw the corresponding exception. This will make a faster response,
// TODO: since the request is stopped before it's sent.
AdHocCommandData data = new AdHocCommandData();
data.setType(IQ.Type.set);
data.setTo(getOwnerJID());

View file

@ -53,7 +53,7 @@ public class AdHocCommandData extends IQ {
/* Unique ID of the execution */
private String sessionID;
private List<AdHocCommandNote> notes = new ArrayList<AdHocCommandNote>();
private final List<AdHocCommandNote> notes = new ArrayList<>();
private DataForm form;
@ -63,7 +63,7 @@ public class AdHocCommandData extends IQ {
/* Current execution status */
private AdHocCommand.Status status;
private ArrayList<AdHocCommand.Action> actions = new ArrayList<AdHocCommand.Action>();
private final ArrayList<AdHocCommand.Action> actions = new ArrayList<>();
private AdHocCommand.Action executeAction;
@ -164,7 +164,7 @@ public class AdHocCommandData extends IQ {
this.notes.add(note);
}
public void remveNote(AdHocCommandNote note) {
public void removeNote(AdHocCommandNote note) {
this.notes.remove(note);
}