mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 09:09:38 +02:00
Add more checkstyle tests
- Lines containing tab(s) after space - Usage of printStackTrace - Usage of println - Add SupressionCommentFilter module SuppressionCommentFilter can be enabled with // CHECKSTYLE:OFF and disabled with // CHECKSTYLE:ON
This commit is contained in:
parent
4f64bb1036
commit
b2221d5483
59 changed files with 382 additions and 202 deletions
|
@ -113,6 +113,7 @@ public class MacroGroup {
|
|||
}
|
||||
|
||||
public String toXML() {
|
||||
// CHECKSTYLE:OFF
|
||||
StringBuilder buf = new StringBuilder();
|
||||
buf.append("<macrogroup>");
|
||||
buf.append("<title>" + getTitle() + "</title>");
|
||||
|
@ -136,6 +137,7 @@ public class MacroGroup {
|
|||
buf.append("</macroGroups>");
|
||||
}
|
||||
buf.append("</macrogroup>");
|
||||
return buf.toString();
|
||||
return buf.toString();
|
||||
// CHECKSTYLE:ON
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,10 +82,12 @@ public class Macros extends IQ {
|
|||
if (isPersonal()) {
|
||||
buf.append("<personal>true</personal>");
|
||||
}
|
||||
if (getPersonalMacroGroup() != null) {
|
||||
if (getPersonalMacroGroup() != null) {
|
||||
// CHECKSTYLE:OFF
|
||||
buf.append("<personalMacro>");
|
||||
buf.append(StringUtils.escapeForXML(getPersonalMacroGroup().toXML()));
|
||||
buf.append("</personalMacro>");
|
||||
// CHECKSTYLE:ON
|
||||
}
|
||||
|
||||
return buf;
|
||||
|
@ -123,6 +125,7 @@ public class Macros extends IQ {
|
|||
}
|
||||
|
||||
public Macro parseMacro(XmlPullParser parser) throws XmlPullParserException, IOException {
|
||||
// CHECKSTYLE:OFF
|
||||
Macro macro = new Macro();
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
|
@ -149,9 +152,11 @@ public class Macros extends IQ {
|
|||
}
|
||||
}
|
||||
return macro;
|
||||
// CHECKSTYLE:ON
|
||||
}
|
||||
|
||||
public MacroGroup parseMacroGroup(XmlPullParser parser) throws XmlPullParserException, IOException {
|
||||
// CHECKSTYLE:OFF
|
||||
MacroGroup group = new MacroGroup();
|
||||
|
||||
boolean done = false;
|
||||
|
@ -175,10 +180,11 @@ public class Macros extends IQ {
|
|||
}
|
||||
}
|
||||
return group;
|
||||
// CHECKSTYLE:ON
|
||||
}
|
||||
|
||||
public MacroGroup parseMacroGroups(String macros) throws XmlPullParserException, IOException {
|
||||
|
||||
// CHECKSTYLE:OFF
|
||||
MacroGroup group = null;
|
||||
XmlPullParser parser = XmlPullParserFactory.newInstance().newPullParser();
|
||||
parser.setInput(new StringReader(macros));
|
||||
|
@ -192,6 +198,7 @@ public class Macros extends IQ {
|
|||
}
|
||||
}
|
||||
return group;
|
||||
// CHECKSTYLE:ON
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -469,13 +469,17 @@ public class Workgroup {
|
|||
|
||||
private void fireInvitationEvent(WorkgroupInvitation invitation) {
|
||||
for (WorkgroupInvitationListener listener : invitationListeners ){
|
||||
// CHECKSTYLE:OFF
|
||||
listener.invitationReceived(invitation);
|
||||
// CHECKSTYLE:ON
|
||||
}
|
||||
}
|
||||
|
||||
private void fireQueueJoinedEvent() {
|
||||
for (QueueListener listener : queueListeners){
|
||||
// CHECKSTYLE:OFF
|
||||
listener.joinedQueue();
|
||||
// CHECKSTYLE:ON
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ public class RosterExchangeProvider extends ExtensionElementProvider<RosterExcha
|
|||
@Override
|
||||
public RosterExchange parse(XmlPullParser parser, int initialDepth)
|
||||
throws XmlPullParserException, IOException {
|
||||
|
||||
// CHECKSTYLE:OFF
|
||||
RosterExchange rosterExchange = new RosterExchange();
|
||||
boolean done = false;
|
||||
RemoteRosterEntry remoteRosterEntry = null;
|
||||
|
@ -78,7 +78,7 @@ public class RosterExchangeProvider extends ExtensionElementProvider<RosterExcha
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// CHECKSTYLE:ON
|
||||
return rosterExchange;
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue