1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 09:09:38 +02:00

More checkstyle whitespace related checks

This commit is contained in:
Florian Schmaus 2017-05-23 16:45:04 +02:00
parent 847890b037
commit ce1cddc722
140 changed files with 583 additions and 512 deletions

View file

@ -1,6 +1,6 @@
/**
*
* Copyright © 2014 Florian Schmaus
* Copyright © 2014-2017 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -46,7 +46,7 @@ public class ParseStreamManagement {
String name;
XMPPError.Condition condition = null;
outerloop:
while(true) {
while (true) {
int event = parser.next();
switch (event) {
case XmlPullParser.START_TAG:

View file

@ -566,7 +566,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
int port = hostAddress.getPort();
if (proxyInfo == null) {
inetAddresses = hostAddress.getInetAddresses().iterator();
assert(inetAddresses.hasNext());
assert (inetAddresses.hasNext());
innerloop: while (inetAddresses.hasNext()) {
// Create a *new* Socket before every connection attempt, i.e. connect() call, since Sockets are not
@ -706,13 +706,13 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
if ("PKCS11".equals(keyStoreType)) {
try {
Constructor<?> c = Class.forName("sun.security.pkcs11.SunPKCS11").getConstructor(InputStream.class);
String pkcs11Config = "name = SmartCard\nlibrary = "+config.getPKCS11Library();
String pkcs11Config = "name = SmartCard\nlibrary = " + config.getPKCS11Library();
ByteArrayInputStream config = new ByteArrayInputStream(pkcs11Config.getBytes(StringUtils.UTF8));
Provider p = (Provider)c.newInstance(config);
Provider p = (Provider) c.newInstance(config);
Security.addProvider(p);
ks = KeyStore.getInstance("PKCS11",p);
pcb = new PasswordCallback("PKCS11 Password: ",false);
callbackHandler.handle(new Callback[]{pcb});
callbackHandler.handle(new Callback[] {pcb});
ks.load(null,pcb.getPassword());
}
catch (Exception e) {
@ -726,7 +726,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
//pcb = new PasswordCallback("Apple Keychain",false);
//pcb.setPassword(null);
}
else if (keyStoreType != null){
else if (keyStoreType != null) {
ks = KeyStore.getInstance(keyStoreType);
if (callbackHandler != null && StringUtils.isNotEmpty(keystorePath)) {
try {
@ -1033,7 +1033,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
if ("jabber:client".equals(parser.getNamespace(null))) {
streamId = parser.getAttributeValue("", "id");
String reportedServerDomain = parser.getAttributeValue("", "from");
assert(config.getXMPPServiceDomain().equals(reportedServerDomain));
assert (config.getXMPPServiceDomain().equals(reportedServerDomain));
}
break;
case "error":