1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-09 18:29:45 +02:00

Add "whitespace after comma" checkstyle rule

This commit is contained in:
Florian Schmaus 2019-05-17 21:56:46 +02:00
parent db5f6f648c
commit f7762c5db7
37 changed files with 59 additions and 58 deletions

View file

@ -2055,10 +2055,10 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
ByteArrayInputStream config = new ByteArrayInputStream(pkcs11Config.getBytes(StandardCharsets.UTF_8));
Provider p = (Provider) c.newInstance(config);
Security.addProvider(p);
ks = KeyStore.getInstance("PKCS11",p);
pcb = new PasswordCallback("PKCS11 Password: ",false);
ks = KeyStore.getInstance("PKCS11", p);
pcb = new PasswordCallback("PKCS11 Password: ", false);
callbackHandler.handle(new Callback[] {pcb});
ks.load(null,pcb.getPassword());
ks.load(null, pcb.getPassword());
}
catch (Exception e) {
LOGGER.log(Level.WARNING, "Exception", e);
@ -2066,8 +2066,8 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
}
}
else if ("Apple".equals(keyStoreType)) {
ks = KeyStore.getInstance("KeychainStore","Apple");
ks.load(null,null);
ks = KeyStore.getInstance("KeychainStore", "Apple");
ks.load(null, null);
// pcb = new PasswordCallback("Apple Keychain",false);
// pcb.setPassword(null);
}

View file

@ -156,7 +156,7 @@ public abstract class ConnectionConfiguration {
private final boolean compressionEnabled;
protected ConnectionConfiguration(Builder<?,?> builder) {
protected ConnectionConfiguration(Builder<?, ?> builder) {
authzid = builder.authzid;
username = builder.username;
password = builder.password;

View file

@ -52,7 +52,7 @@ public class DefaultExtensionElement implements ExtensionElement {
private String elementName;
private String namespace;
private Map<String,String> map;
private Map<String, String> map;
/**
* Creates a new generic stanza extension.
@ -107,7 +107,7 @@ public class DefaultExtensionElement implements ExtensionElement {
if (map == null) {
return Collections.emptySet();
}
return Collections.unmodifiableSet(new HashMap<String,String>(map).keySet());
return Collections.unmodifiableSet(new HashMap<String, String>(map).keySet());
}
/**
@ -131,7 +131,7 @@ public class DefaultExtensionElement implements ExtensionElement {
*/
public synchronized void setValue(String name, String value) {
if (map == null) {
map = new HashMap<String,String>();
map = new HashMap<String, String>();
}
map.put(name, value);
}

View file

@ -150,7 +150,7 @@ public interface Packet extends TopLevelStreamElement {
/**
* Returns the first extension of this stanza that has the given namespace.
* <p>
* When possible, use {@link #getExtension(String,String)} instead.
* When possible, use {@link #getExtension(String, String)} instead.
* </p>
*
* @param namespace the namespace of the extension that is desired.

View file

@ -333,7 +333,7 @@ public abstract class Stanza implements TopLevelStreamElement {
/**
* Returns the first extension of this stanza that has the given namespace.
* <p>
* When possible, use {@link #getExtension(String,String)} instead.
* When possible, use {@link #getExtension(String, String)} instead.
* </p>
*
* @param namespace the namespace of the extension that is desired.

View file

@ -31,13 +31,13 @@ public class SASLErrorException extends XMPPException {
private final SASLFailure saslFailure;
private final String mechanism;
private final Map<String,String> texts;
private final Map<String, String> texts;
public SASLErrorException(String mechanism, SASLFailure saslFailure) {
this(mechanism, saslFailure, new HashMap<String, String>());
}
public SASLErrorException(String mechanism, SASLFailure saslFailure, Map<String,String> texts) {
public SASLErrorException(String mechanism, SASLFailure saslFailure, Map<String, String> texts) {
super("SASLError using " + mechanism + ": " + saslFailure.getSASLErrorString());
this.mechanism = mechanism;
this.saslFailure = saslFailure;
@ -52,7 +52,7 @@ public class SASLErrorException extends XMPPException {
return mechanism;
}
public Map<String,String> getTexts() {
public Map<String, String> getTexts() {
return texts;
}
}

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smack.util;
public interface CallbackRecipient<V,E> {
public interface CallbackRecipient<V, E> {
CallbackRecipient<V, E> onSuccess(SuccessCallback<V> successCallback);

View file

@ -34,7 +34,7 @@ import java.util.concurrent.ConcurrentHashMap;
*/
public class EventManger<K, R, E extends Exception> {
private final Map<K,Reference<R>> events = new ConcurrentHashMap<>();
private final Map<K, Reference<R>> events = new ConcurrentHashMap<>();
/**
* Perform an action and wait for an event.

View file

@ -33,7 +33,7 @@ import java.util.Set;
* @param <K> the type of the keys the map uses.
* @param <V> the type of the values the map uses.
*/
public class MultiMap<K,V> {
public class MultiMap<K, V> {
/**
* The constant value {@value}.

View file

@ -64,7 +64,7 @@ public class TLSUtils {
*
* @return the given builder
*/
public static <B extends ConnectionConfiguration.Builder<B,?>> B setTLSOnly(B builder) {
public static <B extends ConnectionConfiguration.Builder<B, ?>> B setTLSOnly(B builder) {
builder.setEnabledSSLProtocols(new String[] { PROTO_TLSV1_2, PROTO_TLSV1_1, PROTO_TLSV1 });
return builder;
}
@ -84,7 +84,7 @@ public class TLSUtils {
*
* @return the given builder
*/
public static <B extends ConnectionConfiguration.Builder<B,?>> B setSSLv3AndTLSOnly(B builder) {
public static <B extends ConnectionConfiguration.Builder<B, ?>> B setSSLv3AndTLSOnly(B builder) {
builder.setEnabledSSLProtocols(new String[] { PROTO_TLSV1_2, PROTO_TLSV1_1, PROTO_TLSV1, PROTO_SSL3 });
return builder;
}
@ -103,7 +103,7 @@ public class TLSUtils {
* @throws KeyManagementException
* @return the given builder.
*/
public static <B extends ConnectionConfiguration.Builder<B,?>> B acceptAllCertificates(B builder) throws NoSuchAlgorithmException, KeyManagementException {
public static <B extends ConnectionConfiguration.Builder<B, ?>> B acceptAllCertificates(B builder) throws NoSuchAlgorithmException, KeyManagementException {
SSLContext context = SSLContext.getInstance(TLS);
context.init(null, new TrustManager[] { new AcceptAllTrustManager() }, new SecureRandom());
builder.setCustomSSLContext(context);
@ -130,7 +130,7 @@ public class TLSUtils {
* @param <B> Type of the ConnectionConfiguration builder.
* @return the given builder.
*/
public static <B extends ConnectionConfiguration.Builder<B,?>> B disableHostnameVerificationForTlsCertificates(B builder) {
public static <B extends ConnectionConfiguration.Builder<B, ?>> B disableHostnameVerificationForTlsCertificates(B builder) {
builder.setHostnameVerifier(DOES_NOT_VERIFY_VERIFIER);
return builder;
}