Add ParenPad and NoWhitespaceAfter checkstyle rules

This commit is contained in:
Florian Schmaus 2016-11-29 12:01:41 +01:00
parent 9d0d8088f4
commit 9165e818d9
17 changed files with 76 additions and 60 deletions

View File

@ -104,5 +104,18 @@
<property name="checkEmptyJavadoc" value="true"/>
<property name="checkHtml" value="false"/>
</module>
<module name="ParenPad">
</module>
<module name="NoWhitespaceAfter">
<property name="tokens" value="INC
, DEC
, UNARY_MINUS
, UNARY_PLUS
, BNOT, LNOT
, DOT
, ARRAY_DECLARATOR
, INDEX_OP
"/>
</module>
</module>
</module>

View File

@ -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
);
/**

View File

@ -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

View File

@ -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