Skip to content

Commit 3440c63

Browse files
author
adriancole
committed
pmd and findbugs sweep + license headers
1 parent aead1b7 commit 3440c63

31 files changed

Lines changed: 518 additions & 97 deletions

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ Usage typically looks like this, an adaptation of the [canonical Retrofit sample
1515

1616
```java
1717
interface GitHub {
18-
@GET @Path("/repos/{owner}/{repo}/contributors") List<Contributor> contributors(@PathParam("owner") String owner, @PathParam("repo") String repo);
18+
@GET @Path("/repos/{owner}/{repo}/contributors")
19+
List<Contributor> contributors(@PathParam("owner") String owner, @PathParam("repo") String repo);
1920
}
2021

2122
static class Contributor {

feign-core/src/main/java/feign/Client.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2013 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package feign;
217

318
import com.google.common.collect.ImmutableListMultimap;

feign-core/src/main/java/feign/Contract.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2013 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package feign;
217

318
import com.google.common.base.Joiner;
@@ -117,4 +132,4 @@ public static MethodMetadata parseAndValidatateMetadata(Method method) {
117132
}
118133
return data;
119134
}
120-
}
135+
}

feign-core/src/main/java/feign/Feign.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2013 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package feign;
217

318
import com.google.common.base.Optional;
@@ -145,4 +160,4 @@ public static String configKey(Method method) {
145160
Feign() {
146161

147162
}
148-
}
163+
}

feign-core/src/main/java/feign/FeignException.java

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2013 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package feign;
217

318
import com.google.common.reflect.TypeToken;
@@ -28,8 +43,7 @@ public static FeignException errorStatus(String methodKey, Response response) {
2843
response = Response.create(response.status(), response.reason(), response.headers(), body.toString());
2944
message += "; content:\n" + body;
3045
}
31-
} catch (IOException ignored) {
32-
46+
} catch (IOException ignored) { // NOPMD
3347
}
3448
return new FeignException(message);
3549
}
@@ -48,4 +62,4 @@ protected FeignException(String message) {
4862
}
4963

5064
private static final long serialVersionUID = 0;
51-
}
65+
}

feign-core/src/main/java/feign/MethodHandler.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2013 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package feign;
217

318
import com.google.common.base.Function;
@@ -112,7 +127,7 @@ private void ensureBodyClosed(Response response) {
112127
if (response.body().isPresent()) {
113128
try {
114129
response.body().get().close();
115-
} catch (IOException ignored) {
130+
} catch (IOException ignored) { // NOPMD
116131
}
117132
}
118133
}

feign-core/src/main/java/feign/MethodMetadata.java

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2013 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package feign;
217

318
import com.google.common.collect.LinkedHashMultimap;
@@ -6,7 +21,6 @@
621
import com.google.common.reflect.TypeToken;
722

823
import java.io.Serializable;
9-
import java.lang.reflect.Method;
1024
import java.util.List;
1125

1226
public final class MethodMetadata implements Serializable {
@@ -22,7 +36,7 @@ public final class MethodMetadata implements Serializable {
2236
private SetMultimap<Integer, String> indexToName = LinkedHashMultimap.create();
2337

2438
/**
25-
* @see Feign#configKey(Method)
39+
* @see Feign#configKey(java.lang.reflect.Method)
2640
*/
2741
public String configKey() {
2842
return configKey;
@@ -73,4 +87,4 @@ public SetMultimap<Integer, String> indexToName() {
7387
}
7488

7589
private static final long serialVersionUID = 1L;
76-
}
90+
}

feign-core/src/main/java/feign/ReflectiveFeign.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2013 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package feign;
217

318
import com.google.common.base.Function;

feign-core/src/main/java/feign/Request.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2013 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package feign;
217

318
import com.google.common.base.Objects;

feign-core/src/main/java/feign/RequestTemplate.java

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2013 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package feign;
217

318
import com.google.common.base.Objects;
@@ -13,7 +28,6 @@
1328
import com.google.common.collect.Maps;
1429
import com.google.common.collect.Multimap;
1530
import com.google.common.collect.Multimaps;
16-
import com.google.common.net.HttpHeaders;
1731

1832
import java.io.Serializable;
1933
import java.io.UnsupportedEncodingException;
@@ -25,9 +39,6 @@
2539
import java.util.Map;
2640
import java.util.Map.Entry;
2741

28-
import feign.codec.BodyEncoder;
29-
import feign.codec.FormEncoder;
30-
3142
import static com.google.common.base.Charsets.UTF_8;
3243
import static com.google.common.base.Objects.equal;
3344
import static com.google.common.base.Preconditions.checkNotNull;
@@ -165,8 +176,7 @@ private static String urlEncode(Object arg) {
165176
}
166177

167178
/**
168-
* Expands a {@code template}, such as {@code <username> username}
169-
* </username>}, using the {@code variables} supplied. Any unresolved
179+
* Expands a {@code template}, such as {@code username}, using the {@code variables} supplied. Any unresolved
170180
* parameters will remain.
171181
* <p/>
172182
* Note that if you'd like curly braces literally in the {@code template},
@@ -400,9 +410,9 @@ public ListMultimap<String, String> headers() {
400410
}
401411

402412
/**
403-
* replaces the {@link HttpHeaders#CONTENT_LENGTH} header.
413+
* replaces the {@link com.google.common.net.HttpHeaders#CONTENT_LENGTH} header.
404414
* <p/>
405-
* Usually populated by {@link BodyEncoder} or {@link FormEncoder}
415+
* Usually populated by {@link feign.codec.BodyEncoder} or {@link feign.codec.FormEncoder}
406416
*
407417
* @see Request#body()
408418
*/
@@ -530,4 +540,4 @@ public String queryLine() {
530540
}
531541

532542
private static final long serialVersionUID = 1L;
533-
}
543+
}

0 commit comments

Comments
 (0)