From 9165e818d98564189a9ba897a5b9fe97ea526efa Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Tue, 29 Nov 2016 12:01:41 +0100 Subject: [PATCH] Add ParenPad and NoWhitespaceAfter checkstyle rules --- config/checkstyle.xml | 13 +++++++++ .../smack/AbstractXMPPConnection.java | 2 ++ .../smack/SmackConfiguration.java | 2 +- .../jivesoftware/smack/proxy/ProxyInfo.java | 2 +- .../smack/util/PacketParserUtils.java | 2 +- .../jivesoftware/smack/util/StringUtils.java | 2 +- .../org/jivesoftware/smackx/iot/Thing.java | 2 +- .../ValidationConsistencyException.java | 2 +- .../smackx/xdata/packet/DataFormTest.java | 18 ++++++------ .../xdatalayout/packet/DataLayoutTest.java | 20 ++++++------- .../provider/DataValidationTest.java | 20 ++++++------- .../util/stringencoder/java7/Base64.java | 3 +- .../sshare/api/AbstractBufferedImageOp.java | 28 +++++++++---------- .../mediaimpl/sshare/api/QuantizeFilter.java | 2 +- .../sshare/api/WholeImageFilter.java | 12 ++++---- .../smackx/workgroup/packet/QueueDetails.java | 4 +-- .../smackx/workgroup/user/Workgroup.java | 2 +- 17 files changed, 76 insertions(+), 60 deletions(-) diff --git a/config/checkstyle.xml b/config/checkstyle.xml index b83128a03..08703c562 100644 --- a/config/checkstyle.xml +++ b/config/checkstyle.xml @@ -104,5 +104,18 @@ + + + + + diff --git a/smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java b/smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java index 3f93a7073..6f6237d12 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java @@ -248,11 +248,13 @@ public abstract class AbstractXMPPConnection implements XMPPConnection { */ private final ExecutorService cachedExecutorService = Executors.newCachedThreadPool( // @formatter:off + // CHECKSTYLE:OFF new SmackExecutorThreadFactory( // threadFactory this, "Cached Executor" ) // @formatter:on + // CHECKSTYLE:ON ); /** diff --git a/smack-core/src/main/java/org/jivesoftware/smack/SmackConfiguration.java b/smack-core/src/main/java/org/jivesoftware/smack/SmackConfiguration.java index 8d902c159..3d9d36d1e 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/SmackConfiguration.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/SmackConfiguration.java @@ -149,7 +149,7 @@ public final class SmackConfiguration { * @param mech the SASL mechanism to be added */ public static void addSaslMech(String mech) { - if(! defaultMechs.contains(mech) ) { + if(!defaultMechs.contains(mech)) { defaultMechs.add(mech); } } diff --git a/smack-core/src/main/java/org/jivesoftware/smack/proxy/ProxyInfo.java b/smack-core/src/main/java/org/jivesoftware/smack/proxy/ProxyInfo.java index 1807dbf05..c0e9c25af 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/proxy/ProxyInfo.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/proxy/ProxyInfo.java @@ -39,7 +39,7 @@ public class ProxyInfo private ProxyType proxyType; private final ProxySocketConnection proxySocketConnection; - public ProxyInfo( ProxyType pType, String pHost, int pPort, String pUser, + public ProxyInfo(ProxyType pType, String pHost, int pPort, String pUser, String pPass) { this.proxyType = pType; diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java b/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java index 53d0428eb..a2e69cd79 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java @@ -983,9 +983,9 @@ public class PacketParserUtils { private static String getLanguageAttribute(XmlPullParser parser) { // CHECKSTYLE:OFF for (int i = 0; i < parser.getAttributeCount(); i++) { - // CHECKSTYLE:ON String attributeName = parser.getAttributeName(i); if ( "xml:lang".equals(attributeName) || + // CHECKSTYLE:ON ("lang".equals(attributeName) && "xml".equals(parser.getAttributePrefix(i)))) { // CHECKSTYLE:OFF diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/StringUtils.java b/smack-core/src/main/java/org/jivesoftware/smack/util/StringUtils.java index d8d4bc4a0..e4b5ab593 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/StringUtils.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/StringUtils.java @@ -249,7 +249,7 @@ public class StringUtils { */ public static String encodeHex(byte[] bytes) { char[] hexChars = new char[bytes.length * 2]; - for ( int j = 0; j < bytes.length; j++ ) { + for (int j = 0; j < bytes.length; j++) { int v = bytes[j] & 0xFF; hexChars[j * 2] = HEX_CHARS[v >>> 4]; hexChars[j * 2 + 1] = HEX_CHARS[v & 0x0F]; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/Thing.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/Thing.java index f68a7ebd4..6c15fa692 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/Thing.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/Thing.java @@ -83,7 +83,7 @@ public final class Thing { public String toString() { if (toStringCache == null) { StringBuilder sb = new StringBuilder(); - sb.append( "Thing " + nodeInfo + " ["); + sb.append("Thing " + nodeInfo + " ["); Iterator it = metaTags.values().iterator(); while (it.hasNext()) { Tag tag = it.next(); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdatavalidation/ValidationConsistencyException.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdatavalidation/ValidationConsistencyException.java index 90398f75f..e321901c8 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdatavalidation/ValidationConsistencyException.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdatavalidation/ValidationConsistencyException.java @@ -36,6 +36,6 @@ public class ValidationConsistencyException extends IllegalArgumentException { * @param message */ public ValidationConsistencyException(String message) { - super( message); + super(message); } } diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/xdata/packet/DataFormTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/xdata/packet/DataFormTest.java index ef0003bb1..d5ecc15fd 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/xdata/packet/DataFormTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/xdata/packet/DataFormTest.java @@ -55,7 +55,7 @@ public class DataFormTest { FormField field = new FormField("testField1"); df.addField(field); - assertNotNull( df.toXML()); + assertNotNull(df.toXML()); String output = df.toXML().toString(); assertEquals(TEST_OUTPUT_1, output); @@ -65,10 +65,10 @@ public class DataFormTest { assertNotNull(df); assertNotNull(df.getFields()); - assertEquals(1 , df.getFields().size() ); + assertEquals(1 , df.getFields().size()); assertEquals(1 , df.getInstructions().size()); - assertNotNull( df.toXML()); + assertNotNull(df.toXML()); output = df.toXML().toString(); assertEquals(TEST_OUTPUT_1, output); } @@ -93,7 +93,7 @@ public class DataFormTest { df.addExtensionElement(layout); - assertNotNull( df.toXML()); + assertNotNull(df.toXML()); String output = df.toXML().toString(); assertEquals(TEST_OUTPUT_2, output); @@ -103,14 +103,14 @@ public class DataFormTest { assertNotNull(df); assertNotNull(df.getExtensionElements()); - assertEquals(1 , df.getExtensionElements().size() ); + assertEquals(1 , df.getExtensionElements().size()); Element element = df.getExtensionElements().get(0); assertNotNull(element); layout = (DataLayout) element; assertEquals(3 , layout.getPageLayout().size()); - assertNotNull( df.toXML()); + assertNotNull(df.toXML()); output = df.toXML().toString(); assertEquals(TEST_OUTPUT_2, output); } @@ -127,7 +127,7 @@ public class DataFormTest { ValidateElement dv = new RangeValidateElement("xs:integer","1111", "9999"); field.setValidateElement(dv); - assertNotNull( df.toXML()); + assertNotNull(df.toXML()); String output = df.toXML().toString(); assertEquals(TEST_OUTPUT_3, output); @@ -137,14 +137,14 @@ public class DataFormTest { assertNotNull(df); assertNotNull(df.getFields()); - assertEquals(1 , df.getFields().size() ); + assertEquals(1 , df.getFields().size()); Element element = df.getFields().get(0).getValidateElement(); assertNotNull(element); dv = (ValidateElement) element; assertEquals("xs:integer" , dv.getDatatype()); - assertNotNull( df.toXML()); + assertNotNull(df.toXML()); output = df.toXML().toString(); assertEquals(TEST_OUTPUT_3, output); } diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/xdatalayout/packet/DataLayoutTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/xdatalayout/packet/DataLayoutTest.java index 10787d66d..36959b1ec 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/xdatalayout/packet/DataLayoutTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/xdatalayout/packet/DataLayoutTest.java @@ -76,9 +76,9 @@ public class DataLayoutTest { Section section = new Section("section Label"); section.getSectionLayout().add(new Text("SectionText")); layout.getPageLayout().add(section); - layout.getPageLayout().add(new Text( "PageText")); + layout.getPageLayout().add(new Text("PageText")); - assertNotNull( layout.toXML()); + assertNotNull(layout.toXML()); String output = layout.toXML().toString(); assertEquals(TEST_OUTPUT_2, output); @@ -89,7 +89,7 @@ public class DataLayoutTest { assertEquals(3 , layout.getPageLayout().size()); assertEquals("Label", layout.getLabel()); - assertNotNull( layout.toXML()); + assertNotNull(layout.toXML()); output = layout.toXML().toString(); assertEquals(TEST_OUTPUT_2, output); } @@ -101,18 +101,18 @@ public class DataLayoutTest { Fieldref reffield = new Fieldref("testField1"); layout.getPageLayout().add(reffield); Section section = new Section("section Label - & \u00E9 \u00E1 "); - section.getSectionLayout().add(new Text( "SectionText - & \u00E9 \u00E1 ")); + section.getSectionLayout().add(new Text("SectionText - & \u00E9 \u00E1 ")); layout.getPageLayout().add(section); - layout.getPageLayout().add(new Text( "PageText - & \u00E9 \u00E1 ")); + layout.getPageLayout().add(new Text("PageText - & \u00E9 \u00E1 ")); section = new Section("Number of Persons by
Nationality and Status"); section.getSectionLayout().add(new Reportedref()); layout.getPageLayout().add(section); - layout.getPageLayout().add(new Text( "DO NOT DELAY
supply further information")); + layout.getPageLayout().add(new Text("DO NOT DELAY
supply further information")); - assertNotNull( layout.toXML()); + assertNotNull(layout.toXML()); String output = layout.toXML().toString(); assertEquals(TEST_OUTPUT_SPECIAL, output); @@ -132,7 +132,7 @@ public class DataLayoutTest { assertEquals("DO NOT DELAY
supply further information", text.getText()); - assertNotNull( layout.toXML()); + assertNotNull(layout.toXML()); output = layout.toXML().toString(); assertEquals(TEST_OUTPUT_SPECIAL, output); } @@ -146,7 +146,7 @@ public class DataLayoutTest { parser.next(); DataForm form = pr.parse(parser); - assertNotNull( form); + assertNotNull(form); assertEquals(1 , form.getExtensionElements().size()); DataLayout layout = (DataLayout) form.getExtensionElements().get(0); @@ -163,7 +163,7 @@ public class DataLayoutTest { assertEquals("DO NOT DELAY
supply further information", text.getText()); - assertNotNull( layout.toXML()); + assertNotNull(layout.toXML()); String output = layout.toXML().toString(); assertEquals(TEST_OUTPUT_SPECIAL, output); } diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/xdatavalidation/provider/DataValidationTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/xdatavalidation/provider/DataValidationTest.java index c9224c2da..915cbd650 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/xdatavalidation/provider/DataValidationTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/xdatavalidation/provider/DataValidationTest.java @@ -48,7 +48,7 @@ public class DataValidationTest { ValidateElement dv = new BasicValidateElement(null); - assertNotNull( dv.toXML()); + assertNotNull(dv.toXML()); String output = dv.toXML().toString(); assertEquals(TEST_OUTPUT_MIN, output); @@ -58,9 +58,9 @@ public class DataValidationTest { assertNotNull(dv); assertEquals("xs:string", dv.getDatatype()); - assertTrue( dv instanceof BasicValidateElement); + assertTrue(dv instanceof BasicValidateElement); - assertNotNull( dv.toXML()); + assertNotNull(dv.toXML()); output = dv.toXML().toString(); assertEquals(TEST_OUTPUT_MIN, output); } @@ -71,9 +71,9 @@ public class DataValidationTest { ValidateElement dv = new RangeValidateElement("xs:string", "min-val", "max-val"); ListRange listRange = new ListRange(111L, 999L); - dv.setListRange(listRange ); + dv.setListRange(listRange); - assertNotNull( dv.toXML()); + assertNotNull(dv.toXML()); String output = dv.toXML().toString(); assertEquals(TEST_OUTPUT_RANGE, output); @@ -83,7 +83,7 @@ public class DataValidationTest { assertNotNull(dv); assertEquals("xs:string", dv.getDatatype()); - assertTrue(dv instanceof RangeValidateElement ); + assertTrue(dv instanceof RangeValidateElement); RangeValidateElement rdv = (RangeValidateElement) dv; assertEquals("min-val", rdv.getMin()); assertEquals("max-val", rdv.getMax()); @@ -92,7 +92,7 @@ public class DataValidationTest { assertEquals(999, rdv.getListRange().getMax().intValue()); - assertNotNull( dv.toXML()); + assertNotNull(dv.toXML()); output = dv.toXML().toString(); assertEquals(TEST_OUTPUT_RANGE, output); } @@ -102,7 +102,7 @@ public class DataValidationTest { ValidateElement dv = new RangeValidateElement(null, null, null); - assertNotNull( dv.toXML()); + assertNotNull(dv.toXML()); String output = dv.toXML().toString(); assertEquals(TEST_OUTPUT_RANGE2, output); @@ -112,12 +112,12 @@ public class DataValidationTest { assertNotNull(dv); assertEquals("xs:string", dv.getDatatype()); - assertTrue(dv instanceof RangeValidateElement ); + assertTrue(dv instanceof RangeValidateElement); RangeValidateElement rdv = (RangeValidateElement) dv; assertEquals(null, rdv.getMin()); assertEquals(null, rdv.getMax()); - assertNotNull( rdv.toXML()); + assertNotNull(rdv.toXML()); output = rdv.toXML().toString(); assertEquals(TEST_OUTPUT_RANGE2, output); } diff --git a/smack-java7/src/main/java/org/jivesoftware/smack/util/stringencoder/java7/Base64.java b/smack-java7/src/main/java/org/jivesoftware/smack/util/stringencoder/java7/Base64.java index 28385b7e6..f0744bbd1 100644 --- a/smack-java7/src/main/java/org/jivesoftware/smack/util/stringencoder/java7/Base64.java +++ b/smack-java7/src/main/java/org/jivesoftware/smack/util/stringencoder/java7/Base64.java @@ -29,6 +29,7 @@ import java.util.logging.Logger; * @author rob@iharder.net * @version 2.2.1 */ +// CHECKSTYLE:OFF public final class Base64 { private static final Logger LOGGER = Logger.getLogger(Base64.class.getName()); @@ -1682,4 +1683,4 @@ public final class Base64 } // end class Base64 - +// CHECKSTYLE:ON diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/AbstractBufferedImageOp.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/AbstractBufferedImageOp.java index bff2c0c29..3c2165d36 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/AbstractBufferedImageOp.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/AbstractBufferedImageOp.java @@ -30,19 +30,19 @@ import java.awt.image.ColorModel; public abstract class AbstractBufferedImageOp implements BufferedImageOp, Cloneable { public BufferedImage createCompatibleDestImage(BufferedImage src, ColorModel dstCM) { - if ( dstCM == null ) + if (dstCM == null) dstCM = src.getColorModel(); return new BufferedImage(dstCM, dstCM.createCompatibleWritableRaster(src.getWidth(), src.getHeight()), dstCM.isAlphaPremultiplied(), null); } - public Rectangle2D getBounds2D( BufferedImage src ) { + public Rectangle2D getBounds2D(BufferedImage src) { return new Rectangle(0, 0, src.getWidth(), src.getHeight()); } - public Point2D getPoint2D( Point2D srcPt, Point2D dstPt ) { - if ( dstPt == null ) + public Point2D getPoint2D(Point2D srcPt, Point2D dstPt) { + if (dstPt == null) dstPt = new Point2D.Double(); - dstPt.setLocation( srcPt.getX(), srcPt.getY() ); + dstPt.setLocation(srcPt.getX(), srcPt.getY()); return dstPt; } @@ -62,11 +62,11 @@ public abstract class AbstractBufferedImageOp implements BufferedImageOp, Clonea * @return the pixels * @see #setRGB */ - public int[] getRGB( BufferedImage image, int x, int y, int width, int height, int[] pixels ) { + public int[] getRGB(BufferedImage image, int x, int y, int width, int height, int[] pixels) { int type = image.getType(); - if ( type == BufferedImage.TYPE_INT_ARGB || type == BufferedImage.TYPE_INT_RGB ) - return (int [])image.getRaster().getDataElements( x, y, width, height, pixels ); - return image.getRGB( x, y, width, height, pixels, 0, width ); + if (type == BufferedImage.TYPE_INT_ARGB || type == BufferedImage.TYPE_INT_RGB) + return (int [])image.getRaster().getDataElements(x, y, width, height, pixels); + return image.getRGB(x, y, width, height, pixels, 0, width); } /** @@ -80,19 +80,19 @@ public abstract class AbstractBufferedImageOp implements BufferedImageOp, Clonea * @param pixels the array of pixels to set * @see #getRGB */ - public void setRGB( BufferedImage image, int x, int y, int width, int height, int[] pixels ) { + public void setRGB(BufferedImage image, int x, int y, int width, int height, int[] pixels) { int type = image.getType(); - if ( type == BufferedImage.TYPE_INT_ARGB || type == BufferedImage.TYPE_INT_RGB ) - image.getRaster().setDataElements( x, y, width, height, pixels ); + if (type == BufferedImage.TYPE_INT_ARGB || type == BufferedImage.TYPE_INT_RGB) + image.getRaster().setDataElements(x, y, width, height, pixels); else - image.setRGB( x, y, width, height, pixels, 0, width ); + image.setRGB(x, y, width, height, pixels, 0, width); } public Object clone() { try { return super.clone(); } - catch ( CloneNotSupportedException e ) { + catch (CloneNotSupportedException e) { return null; } } diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/QuantizeFilter.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/QuantizeFilter.java index c1dbf0a38..c2e181eac 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/QuantizeFilter.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/QuantizeFilter.java @@ -163,7 +163,7 @@ public class QuantizeFilter extends WholeImageFilter { } } - protected int[] filterPixels( int width, int height, int[] inPixels, Rectangle transformedSpace ) { + protected int[] filterPixels(int width, int height, int[] inPixels, Rectangle transformedSpace) { int[] outPixels = new int[width*height]; quantize(inPixels, outPixels, width, height, numColors, dither, serpentine); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/WholeImageFilter.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/WholeImageFilter.java index a94674d50..eb90e676a 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/WholeImageFilter.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/WholeImageFilter.java @@ -43,7 +43,7 @@ public abstract class WholeImageFilter extends AbstractBufferedImageOp { public WholeImageFilter() { } - public BufferedImage filter( BufferedImage src, BufferedImage dst ) { + public BufferedImage filter(BufferedImage src, BufferedImage dst) { int width = src.getWidth(); int height = src.getHeight(); int type = src.getType(); @@ -53,15 +53,15 @@ public abstract class WholeImageFilter extends AbstractBufferedImageOp { transformedSpace = new Rectangle(0, 0, width, height); transformSpace(transformedSpace); - if ( dst == null ) { + if (dst == null) { ColorModel dstCM = src.getColorModel(); dst = new BufferedImage(dstCM, dstCM.createCompatibleWritableRaster(transformedSpace.width, transformedSpace.height), dstCM.isAlphaPremultiplied(), null); } WritableRaster dstRaster = dst.getRaster(); - int[] inPixels = getRGB( src, 0, 0, width, height, null ); - inPixels = filterPixels( width, height, inPixels, transformedSpace ); - setRGB( dst, 0, 0, transformedSpace.width, transformedSpace.height, inPixels ); + int[] inPixels = getRGB(src, 0, 0, width, height, null); + inPixels = filterPixels(width, height, inPixels, transformedSpace); + setRGB(dst, 0, 0, transformedSpace.width, transformedSpace.height, inPixels); return dst; } @@ -81,6 +81,6 @@ public abstract class WholeImageFilter extends AbstractBufferedImageOp { * @param transformedSpace the output bounds * @return the output pixels */ - protected abstract int[] filterPixels( int width, int height, int[] inPixels, Rectangle transformedSpace ); + protected abstract int[] filterPixels(int width, int height, int[] inPixels, Rectangle transformedSpace); } diff --git a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/packet/QueueDetails.java b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/packet/QueueDetails.java index 3c3edfc1c..9b5595e53 100644 --- a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/packet/QueueDetails.java +++ b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/packet/QueueDetails.java @@ -165,7 +165,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()); @@ -180,7 +180,7 @@ public final class QueueDetails implements ExtensionElement { throw new SmackException(e); } } - else if( parser.getName().equals( "waitTime" ) ) { + else if(parser.getName().equals("waitTime")) { Date wait; try { wait = dateFormat.parse(parser.nextText()); diff --git a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java index 857ba075b..68b0e7917 100644 --- a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java +++ b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java @@ -469,7 +469,7 @@ public class Workgroup { } private void fireInvitationEvent(WorkgroupInvitation invitation) { - for (WorkgroupInvitationListener listener : invitationListeners ){ + for (WorkgroupInvitationListener listener : invitationListeners) { // CHECKSTYLE:OFF listener.invitationReceived(invitation); // CHECKSTYLE:ON