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:
Oleg Kalnichevski 2013-06-23 14:07:22 +00:00
parent 9056303b5c
commit 47f900a03f
10 changed files with 20 additions and 21 deletions

View File

@ -27,13 +27,11 @@
package org.apache.http.client.protocol; package org.apache.http.client.protocol;
import java.io.IOException;
import java.util.Queue; import java.util.Queue;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.http.Header; import org.apache.http.Header;
import org.apache.http.HttpException;
import org.apache.http.HttpRequest; import org.apache.http.HttpRequest;
import org.apache.http.HttpRequestInterceptor; import org.apache.http.HttpRequestInterceptor;
import org.apache.http.auth.AuthOption; import org.apache.http.auth.AuthOption;

View File

@ -28,10 +28,8 @@ package org.apache.http.conn.ssl;
import org.apache.http.util.Args; import org.apache.http.util.Args;
import java.net.Socket;
import java.security.cert.X509Certificate; import java.security.cert.X509Certificate;
import java.util.Arrays; import java.util.Arrays;
import java.util.Map;
/** /**
* Private key details. * Private key details.

View File

@ -27,10 +27,7 @@
package org.apache.http.conn.ssl; package org.apache.http.conn.ssl;
import java.net.Socket; import java.net.Socket;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.Map; import java.util.Map;
import java.util.Set;
/** /**
* A strategy allowing for a choice of an alias during SSL authentication. * A strategy allowing for a choice of an alias during SSL authentication.

View File

@ -217,7 +217,7 @@ public class SSLContextBuilder {
final String[] keyTypes, final Principal[] issuers, final Socket socket) { final String[] keyTypes, final Principal[] issuers, final Socket socket) {
final Map<String, PrivateKeyDetails> validAliases = new HashMap<String, PrivateKeyDetails>(); final Map<String, PrivateKeyDetails> validAliases = new HashMap<String, PrivateKeyDetails>();
for (String keyType: keyTypes) { for (String keyType: keyTypes) {
String[] aliases = this.keyManager.getClientAliases(keyType, issuers); final String[] aliases = this.keyManager.getClientAliases(keyType, issuers);
if (aliases != null) { if (aliases != null) {
for (String alias: aliases) { for (String alias: aliases) {
validAliases.put(alias, validAliases.put(alias,
@ -236,7 +236,7 @@ public class SSLContextBuilder {
public String chooseServerAlias( public String chooseServerAlias(
final String keyType, final Principal[] issuers, final Socket socket) { final String keyType, final Principal[] issuers, final Socket socket) {
final Map<String, PrivateKeyDetails> validAliases = new HashMap<String, PrivateKeyDetails>(); 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) { if (aliases != null) {
for (String alias: aliases) { for (String alias: aliases) {
validAliases.put(alias, validAliases.put(alias,

View File

@ -32,24 +32,16 @@ import org.apache.http.Header;
import org.apache.http.HttpRequest; import org.apache.http.HttpRequest;
import org.apache.http.HttpResponse; import org.apache.http.HttpResponse;
import org.apache.http.config.MessageConstraints; import org.apache.http.config.MessageConstraints;
import org.apache.http.conn.ManagedHttpClientConnection;
import org.apache.http.entity.ContentLengthStrategy; import org.apache.http.entity.ContentLengthStrategy;
import org.apache.http.impl.DefaultBHttpClientConnection;
import org.apache.http.io.HttpMessageParserFactory; import org.apache.http.io.HttpMessageParserFactory;
import org.apache.http.io.HttpMessageWriterFactory; 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.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.InterruptedIOException;
import java.io.OutputStream; import java.io.OutputStream;
import java.net.Socket; import java.net.Socket;
import java.nio.charset.CharsetDecoder; import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder; import java.nio.charset.CharsetEncoder;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
class LoggingManagedHttpClientConnection extends DefaultManagedHttpClientConnection { class LoggingManagedHttpClientConnection extends DefaultManagedHttpClientConnection {

14
pom.xml
View File

@ -388,6 +388,20 @@
<failsOnError>true</failsOnError> <failsOnError>true</failsOnError>
<linkXRef>false</linkXRef> <linkXRef>false</linkXRef>
<sourceDirectory>${basedir}/src/main</sourceDirectory> <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> <sourceDirectory>${basedir}/src/test</sourceDirectory>
</configuration> </configuration>
<goals> <goals>