Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wd1105040417
retrofit
提交
223d9e75
R
retrofit
项目概览
wd1105040417
/
retrofit
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
retrofit
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
223d9e75
编写于
12月 05, 2016
作者:
J
Jake Wharton
提交者:
GitHub
12月 05, 2016
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2109 from square/jw/checkstyle
Update checkstyle to the latest version.
上级
58022a4f
a9eb2696
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
20 addition
and
13 deletion
+20
-13
checkstyle.xml
checkstyle.xml
+1
-1
pom.xml
pom.xml
+8
-1
retrofit/src/main/java/retrofit2/ServiceMethod.java
retrofit/src/main/java/retrofit2/ServiceMethod.java
+1
-1
retrofit/src/main/java/retrofit2/Utils.java
retrofit/src/main/java/retrofit2/Utils.java
+3
-3
samples/src/main/java/com/example/retrofit/Crawler.java
samples/src/main/java/com/example/retrofit/Crawler.java
+3
-3
samples/src/main/java/com/example/retrofit/JsonQueryParameters.java
...c/main/java/com/example/retrofit/JsonQueryParameters.java
+2
-2
samples/src/main/java/com/example/retrofit/SimpleMockService.java
...src/main/java/com/example/retrofit/SimpleMockService.java
+2
-2
未找到文件。
checkstyle.xml
浏览文件 @
223d9e75
...
...
@@ -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>
pom.xml
浏览文件 @
223d9e75
...
...
@@ -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>
...
...
retrofit/src/main/java/retrofit2/ServiceMethod.java
浏览文件 @
223d9e75
...
...
@@ -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
();
...
...
retrofit/src/main/java/retrofit2/Utils.java
浏览文件 @
223d9e75
...
...
@@ -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
();
...
...
samples/src/main/java/com/example/retrofit/Crawler.java
浏览文件 @
223d9e75
...
...
@@ -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
;
}
...
...
samples/src/main/java/com/example/retrofit/JsonQueryParameters.java
浏览文件 @
223d9e75
...
...
@@ -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
;
}
}
...
...
samples/src/main/java/com/example/retrofit/SimpleMockService.java
浏览文件 @
223d9e75
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录