提交 223d9e75 编写于 作者: J Jake Wharton 提交者: GitHub

Merge pull request #2109 from square/jw/checkstyle

Update checkstyle to the latest version.
......@@ -102,7 +102,6 @@
<!--module name="InnerAssignment"/-->
<!--module name="MagicNumber"/-->
<module name="MissingSwitchDefault"/>
<module name="RedundantThrows"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
......@@ -123,6 +122,7 @@
<module name="UpperEll"/>
<module name="Indentation">
<property name="basicOffset" value="2"/>
<property name="caseIndent" value="2"/>
</module>
</module>
</module>
......@@ -218,7 +218,14 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.15</version>
<version>2.17</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>7.3</version>
</dependency>
</dependencies>
<configuration>
<failsOnError>true</failsOnError>
<configLocation>checkstyle.xml</configLocation>
......
......@@ -148,7 +148,7 @@ final class ServiceMethod<R, T> {
Converter<ResponseBody, T> responseConverter;
CallAdapter<T, R> callAdapter;
public Builder(Retrofit retrofit, Method method) {
Builder(Retrofit retrofit, Method method) {
this.retrofit = retrofit;
this.method = method;
this.methodAnnotations = method.getAnnotations();
......
......@@ -369,7 +369,7 @@ final class Utils {
private final Type rawType;
private final Type[] typeArguments;
public ParameterizedTypeImpl(Type ownerType, Type rawType, Type... typeArguments) {
ParameterizedTypeImpl(Type ownerType, Type rawType, Type... typeArguments) {
// Require an owner type if the raw type needs it.
if (rawType instanceof Class<?>
&& (ownerType == null) != (((Class<?>) rawType).getEnclosingClass() == null)) {
......@@ -421,7 +421,7 @@ final class Utils {
private static final class GenericArrayTypeImpl implements GenericArrayType {
private final Type componentType;
public GenericArrayTypeImpl(Type componentType) {
GenericArrayTypeImpl(Type componentType) {
this.componentType = componentType;
}
......@@ -452,7 +452,7 @@ final class Utils {
private final Type upperBound;
private final Type lowerBound;
public WildcardTypeImpl(Type[] upperBounds, Type[] lowerBounds) {
WildcardTypeImpl(Type[] upperBounds, Type[] lowerBounds) {
if (lowerBounds.length > 1) throw new IllegalArgumentException();
if (upperBounds.length != 1) throw new IllegalArgumentException();
......
......@@ -116,10 +116,10 @@ public final class Crawler {
}
static class Page {
public final String title;
public final List<String> links;
final String title;
final List<String> links;
public Page(String title, List<String> links) {
Page(String title, List<String> links) {
this.title = title;
this.links = links;
}
......
......@@ -78,9 +78,9 @@ public final class JsonQueryParameters {
}
static class Filter {
public final String userId;
final String userId;
public Filter(String userId) {
Filter(String userId) {
this.userId = userId;
}
}
......
......@@ -26,7 +26,7 @@ public final class SimpleMockService {
private final BehaviorDelegate<GitHub> delegate;
private final Map<String, Map<String, List<Contributor>>> ownerRepoContributors;
public MockGitHub(BehaviorDelegate<GitHub> delegate) {
MockGitHub(BehaviorDelegate<GitHub> delegate) {
this.delegate = delegate;
ownerRepoContributors = new LinkedHashMap<>();
......@@ -50,7 +50,7 @@ public final class SimpleMockService {
return delegate.returningResponse(response).contributors(owner, repo);
}
public void addContributor(String owner, String repo, String name, int contributions) {
void addContributor(String owner, String repo, String name, int contributions) {
Map<String, List<Contributor>> repoContributors = ownerRepoContributors.get(owner);
if (repoContributors == null) {
repoContributors = new LinkedHashMap<>();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册