Fixed maven checkstyle config; fixed format violations
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1495818 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9056303b5c
commit
47f900a03f
|
@ -27,13 +27,11 @@
|
|||
|
||||
package org.apache.http.client.protocol;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Queue;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.http.Header;
|
||||
import org.apache.http.HttpException;
|
||||
import org.apache.http.HttpRequest;
|
||||
import org.apache.http.HttpRequestInterceptor;
|
||||
import org.apache.http.auth.AuthOption;
|
||||
|
|
|
@ -28,10 +28,8 @@ package org.apache.http.conn.ssl;
|
|||
|
||||
import org.apache.http.util.Args;
|
||||
|
||||
import java.net.Socket;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Private key details.
|
||||
|
|
|
@ -27,10 +27,7 @@
|
|||
package org.apache.http.conn.ssl;
|
||||
|
||||
import java.net.Socket;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* A strategy allowing for a choice of an alias during SSL authentication.
|
||||
|
|
|
@ -217,7 +217,7 @@ public class SSLContextBuilder {
|
|||
final String[] keyTypes, final Principal[] issuers, final Socket socket) {
|
||||
final Map<String, PrivateKeyDetails> validAliases = new HashMap<String, PrivateKeyDetails>();
|
||||
for (String keyType: keyTypes) {
|
||||
String[] aliases = this.keyManager.getClientAliases(keyType, issuers);
|
||||
final String[] aliases = this.keyManager.getClientAliases(keyType, issuers);
|
||||
if (aliases != null) {
|
||||
for (String alias: aliases) {
|
||||
validAliases.put(alias,
|
||||
|
@ -236,7 +236,7 @@ public class SSLContextBuilder {
|
|||
public String chooseServerAlias(
|
||||
final String keyType, final Principal[] issuers, final Socket socket) {
|
||||
final Map<String, PrivateKeyDetails> validAliases = new HashMap<String, PrivateKeyDetails>();
|
||||
String[] aliases = this.keyManager.getServerAliases(keyType, issuers);
|
||||
final String[] aliases = this.keyManager.getServerAliases(keyType, issuers);
|
||||
if (aliases != null) {
|
||||
for (String alias: aliases) {
|
||||
validAliases.put(alias,
|
||||
|
|
|
@ -32,24 +32,16 @@ import org.apache.http.Header;
|
|||
import org.apache.http.HttpRequest;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.config.MessageConstraints;
|
||||
import org.apache.http.conn.ManagedHttpClientConnection;
|
||||
import org.apache.http.entity.ContentLengthStrategy;
|
||||
import org.apache.http.impl.DefaultBHttpClientConnection;
|
||||
import org.apache.http.io.HttpMessageParserFactory;
|
||||
import org.apache.http.io.HttpMessageWriterFactory;
|
||||
import org.apache.http.protocol.HttpContext;
|
||||
|
||||
import javax.net.ssl.SSLSession;
|
||||
import javax.net.ssl.SSLSocket;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InterruptedIOException;
|
||||
import java.io.OutputStream;
|
||||
import java.net.Socket;
|
||||
import java.nio.charset.CharsetDecoder;
|
||||
import java.nio.charset.CharsetEncoder;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
class LoggingManagedHttpClientConnection extends DefaultManagedHttpClientConnection {
|
||||
|
||||
|
|
|
@ -68,5 +68,5 @@ class HttpRFC6532Multipart extends AbstractMultipartForm {
|
|||
writeField(field, MIME.UTF8_CHARSET, out);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -68,5 +68,5 @@ class HttpStrictMultipart extends AbstractMultipartForm {
|
|||
writeField(field, out);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ public final class MIME {
|
|||
|
||||
/** The default character set to be used, i.e. "US-ASCII" */
|
||||
public static final Charset DEFAULT_CHARSET = Consts.ASCII;
|
||||
|
||||
|
||||
/** UTF-8 is used for RFC6532 */
|
||||
public static final Charset UTF8_CHARSET = Consts.UTF_8;
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ public class MultipartEntity implements HttpEntity {
|
|||
.setBoundary(boundary);
|
||||
this.entity = null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates an instance using the specified {@link HttpMultipartMode} mode.
|
||||
* Boundary and charset are set to {@code null}.
|
||||
|
|
14
pom.xml
14
pom.xml
|
@ -388,6 +388,20 @@
|
|||
<failsOnError>true</failsOnError>
|
||||
<linkXRef>false</linkXRef>
|
||||
<sourceDirectory>${basedir}/src/main</sourceDirectory>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>checkstyle</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>validate-test</id>
|
||||
<phase>validate</phase>
|
||||
<configuration>
|
||||
<configLocation>hc-stylecheck/default.xml</configLocation>
|
||||
<headerLocation>hc-stylecheck/asl2.header</headerLocation>
|
||||
<consoleOutput>true</consoleOutput>
|
||||
<failsOnError>true</failsOnError>
|
||||
<linkXRef>false</linkXRef>
|
||||
<sourceDirectory>${basedir}/src/test</sourceDirectory>
|
||||
</configuration>
|
||||
<goals>
|
||||
|
|
Loading…
Reference in New Issue