Skip to content

Commit 56990e8

Browse files
Adrian ColeAdrian Cole
authored andcommitted
Bumps dependency versions for integrations
* OkHttp/MockWebServer 2.4.0 * Gson 2.3.1 * Jackson 2.6.0 * Ribbon 2.1.0 * SLF4J 1.7.12
1 parent 9985d91 commit 56990e8

24 files changed

Lines changed: 91 additions & 66 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
### Version 8.7
2+
* Bumps dependency versions for integrations
3+
* OkHttp/MockWebServer 2.4.0
4+
* Gson 2.3.1
5+
* Jackson 2.6.0
6+
* Ribbon 2.1.0
7+
* SLF4J 1.7.12
8+
19
### Version 8.6
210
* Adds base api support via single-inheritance interfaces
311

benchmark/pom.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<name>Feign Benchmark (JMH)</name>
1717

1818
<properties>
19-
<jmh.version>1.8</jmh.version>
19+
<jmh.version>1.10.3</jmh.version>
2020
</properties>
2121

2222
<dependencies>
@@ -33,7 +33,7 @@
3333
<dependency>
3434
<groupId>com.squareup.okhttp</groupId>
3535
<artifactId>mockwebserver</artifactId>
36-
<version>2.3.0</version>
36+
<version>2.4.0</version>
3737
<exclusions>
3838
<exclusion>
3939
<groupId>org.bouncycastle</groupId>
@@ -44,17 +44,17 @@
4444
<dependency>
4545
<groupId>io.reactivex</groupId>
4646
<artifactId>rxnetty</artifactId>
47-
<version>0.4.8</version>
47+
<version>0.4.11</version>
4848
</dependency>
4949
<dependency>
5050
<groupId>io.reactivex</groupId>
5151
<artifactId>rxjava</artifactId>
52-
<version>1.0.9</version>
52+
<version>1.0.13</version>
5353
</dependency>
5454
<dependency>
5555
<groupId>io.netty</groupId>
5656
<artifactId>netty-codec-http</artifactId>
57-
<version>4.0.26.Final</version>
57+
<version>4.0.30.Final</version>
5858
</dependency>
5959
<dependency>
6060
<groupId>org.openjdk.jmh</groupId>
@@ -75,7 +75,7 @@
7575
<plugin>
7676
<groupId>org.apache.maven.plugins</groupId>
7777
<artifactId>maven-shade-plugin</artifactId>
78-
<version>2.3</version>
78+
<version>2.4.1</version>
7979
<executions>
8080
<execution>
8181
<phase>package</phase>
@@ -96,7 +96,7 @@
9696
<plugin>
9797
<groupId>org.skife.maven</groupId>
9898
<artifactId>really-executable-jar-maven-plugin</artifactId>
99-
<version>1.4.0</version>
99+
<version>1.4.1</version>
100100
<configuration>
101101
<programFile>benchmark</programFile>
102102
</configuration>

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
}
77

88
plugins {
9-
id 'nebula.netflixoss' version '2.2.9'
9+
id 'nebula.netflixoss' version '2.2.10'
1010
}
1111

1212
ext {

core/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sourceCompatibility = 1.6
44

55
dependencies {
66
testCompile 'junit:junit:4.12'
7-
testCompile 'org.assertj:assertj-core:1.7.1'
8-
testCompile 'com.squareup.okhttp:mockwebserver:2.2.0'
9-
testCompile 'com.google.code.gson:gson:2.2.4' // for example
7+
testCompile 'org.assertj:assertj-core:1.7.1' // last version supporting JDK 7
8+
testCompile 'com.squareup.okhttp:mockwebserver:2.4.0'
9+
testCompile 'com.google.code.gson:gson:2.3.1' // for example
1010
}

core/src/test/java/feign/FeignTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import com.squareup.okhttp.mockwebserver.SocketPolicy;
2323
import com.squareup.okhttp.mockwebserver.rule.MockWebServerRule;
2424

25+
import okio.Buffer;
2526
import org.junit.Rule;
2627
import org.junit.Test;
2728
import org.junit.rules.ExpectedException;
@@ -426,7 +427,7 @@ public void equalsHashCodeAndToStringWork() {
426427
@Test
427428
public void decodeLogicSupportsByteArray() throws Exception {
428429
byte[] expectedResponse = {12, 34, 56};
429-
server.enqueue(new MockResponse().setBody(expectedResponse));
430+
server.enqueue(new MockResponse().setBody(new Buffer().write(expectedResponse)));
430431

431432
OtherTestInterface
432433
api =

core/src/test/java/feign/assertj/RecordedRequestAssert.java

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,37 @@
1515
*/
1616
package feign.assertj;
1717

18+
import com.squareup.okhttp.Headers;
1819
import com.squareup.okhttp.mockwebserver.RecordedRequest;
1920

2021
import org.assertj.core.api.AbstractAssert;
22+
import org.assertj.core.data.MapEntry;
2123
import org.assertj.core.internal.ByteArrays;
2224
import org.assertj.core.internal.Failures;
23-
import org.assertj.core.internal.Iterables;
25+
import org.assertj.core.internal.Maps;
2426
import org.assertj.core.internal.Objects;
2527

2628
import java.io.ByteArrayInputStream;
2729
import java.io.IOException;
30+
import java.util.ArrayList;
2831
import java.util.LinkedHashSet;
32+
import java.util.List;
33+
import java.util.Map;
2934
import java.util.Set;
3035
import java.util.zip.GZIPInputStream;
3136
import java.util.zip.InflaterInputStream;
3237

3338
import feign.Util;
3439

40+
import static org.assertj.core.data.MapEntry.entry;
3541
import static org.assertj.core.error.ShouldNotContain.shouldNotContain;
3642

3743
public final class RecordedRequestAssert
3844
extends AbstractAssert<RecordedRequestAssert, RecordedRequest> {
3945

4046
ByteArrays arrays = ByteArrays.instance();
4147
Objects objects = Objects.instance();
42-
Iterables iterables = Iterables.instance();
48+
Maps maps = Maps.instance();
4349
Failures failures = Failures.instance();
4450

4551
public RecordedRequestAssert(RecordedRequest actual) {
@@ -60,13 +66,13 @@ public RecordedRequestAssert hasPath(String expected) {
6066

6167
public RecordedRequestAssert hasBody(String utf8Expected) {
6268
isNotNull();
63-
objects.assertEqual(info, actual.getUtf8Body(), utf8Expected);
69+
objects.assertEqual(info, actual.getBody().readUtf8(), utf8Expected);
6470
return this;
6571
}
6672

6773
public RecordedRequestAssert hasGzippedBody(byte[] expectedUncompressed) {
6874
isNotNull();
69-
byte[] compressedBody = actual.getBody();
75+
byte[] compressedBody = actual.getBody().readByteArray();
7076
byte[] uncompressedBody;
7177
try {
7278
uncompressedBody =
@@ -80,7 +86,7 @@ public RecordedRequestAssert hasGzippedBody(byte[] expectedUncompressed) {
8086

8187
public RecordedRequestAssert hasDeflatedBody(byte[] expectedUncompressed) {
8288
isNotNull();
83-
byte[] compressedBody = actual.getBody();
89+
byte[] compressedBody = actual.getBody().readByteArray();
8490
byte[] uncompressedBody;
8591
try {
8692
uncompressedBody =
@@ -94,20 +100,38 @@ public RecordedRequestAssert hasDeflatedBody(byte[] expectedUncompressed) {
94100

95101
public RecordedRequestAssert hasBody(byte[] expected) {
96102
isNotNull();
97-
arrays.assertContains(info, actual.getBody(), expected);
103+
arrays.assertContains(info, actual.getBody().readByteArray(), expected);
98104
return this;
99105
}
100106

101-
public RecordedRequestAssert hasHeaders(String... headers) {
107+
/**
108+
* @deprecated use {@link #hasHeaders(MapEntry...)}
109+
*/
110+
@Deprecated
111+
public RecordedRequestAssert hasHeaders(String... headerLines) {
102112
isNotNull();
103-
iterables.assertContainsSubsequence(info, actual.getHeaders(), headers);
113+
Headers.Builder builder = new Headers.Builder();
114+
for (String next : headerLines) {
115+
builder.add(next);
116+
}
117+
List<MapEntry> expected = new ArrayList<MapEntry>();
118+
for (Map.Entry<String, List<String>> next : builder.build().toMultimap().entrySet()) {
119+
expected.add(entry(next.getKey(), next.getValue()));
120+
}
121+
hasHeaders(expected.toArray(new MapEntry[expected.size()]));
122+
return this;
123+
}
124+
125+
public RecordedRequestAssert hasHeaders(MapEntry... expected) {
126+
isNotNull();
127+
maps.assertContains(info, actual.getHeaders().toMultimap(), expected);
104128
return this;
105129
}
106130

107131
public RecordedRequestAssert hasNoHeaderNamed(final String... names) {
108132
isNotNull();
109133
Set<String> found = new LinkedHashSet<String>();
110-
for (String header : actual.getHeaders()) {
134+
for (String header : actual.getHeaders().names()) {
111135
for (String name : names) {
112136
if (header.toLowerCase().startsWith(name.toLowerCase() + ":")) {
113137
found.add(header);

core/src/test/java/feign/client/DefaultClientTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ public class DefaultClientTest {
5050
@Rule
5151
public final MockWebServerRule server = new MockWebServerRule();
5252
Client trustSSLSockets = new Client.Default(TrustingSSLSocketFactory.get(), null);
53-
Client
54-
disableHostnameVerification =
53+
Client disableHostnameVerification =
5554
new Client.Default(TrustingSSLSocketFactory.get(), new HostnameVerifier() {
5655
@Override
5756
public boolean verify(String s, SSLSession sslSession) {

example-github/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ configurations {
1212
}
1313

1414
dependencies {
15-
compile 'com.netflix.feign:feign-core:8.1.0'
16-
compile 'com.netflix.feign:feign-gson:8.1.0'
15+
compile 'com.netflix.feign:feign-core:8.6.0'
16+
compile 'com.netflix.feign:feign-gson:8.6.0'
1717
}
1818

1919
// create a self-contained jar that is executable

example-github/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<groupId>com.netflix.feign</groupId>
1313
<artifactId>feign-example-github</artifactId>
1414
<packaging>jar</packaging>
15-
<version>8.1.0</version>
15+
<version>8.6.0</version>
1616
<name>GitHub Example</name>
1717

1818
<dependencies>
@@ -34,7 +34,7 @@
3434
<plugin>
3535
<groupId>org.apache.maven.plugins</groupId>
3636
<artifactId>maven-shade-plugin</artifactId>
37-
<version>2.3</version>
37+
<version>2.4.1</version>
3838
<executions>
3939
<execution>
4040
<phase>package</phase>
@@ -55,7 +55,7 @@
5555
<plugin>
5656
<groupId>org.skife.maven</groupId>
5757
<artifactId>really-executable-jar-maven-plugin</artifactId>
58-
<version>1.3.0</version>
58+
<version>1.4.1</version>
5959
<configuration>
6060
<programFile>github</programFile>
6161
</configuration>

example-wikipedia/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ configurations {
1212
}
1313

1414
dependencies {
15-
compile 'com.netflix.feign:feign-core:8.1.0'
16-
compile 'com.netflix.feign:feign-gson:8.1.0'
15+
compile 'com.netflix.feign:feign-core:8.6.0'
16+
compile 'com.netflix.feign:feign-gson:8.6.0'
1717
}
1818

1919
// create a self-contained jar that is executable

0 commit comments

Comments
 (0)