Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c3d03d6

Browse filesBrowse files
authored
Update deps and mvn plugins. (docker-java#1344)
Cleanup some deprecated warns from test code
1 parent 466de94 commit c3d03d6
Copy full SHA for c3d03d6

50 files changed

+312-271Lines changed: 312 additions & 271 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎docker-java-api/pom.xml‎

Copy file name to clipboardExpand all lines: docker-java-api/pom.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<dependency>
3939
<groupId>org.projectlombok</groupId>
4040
<artifactId>lombok</artifactId>
41-
<version>1.18.10</version>
41+
<version>1.18.12</version>
4242
<scope>provided</scope>
4343
</dependency>
4444
</dependencies>
Collapse file

‎docker-java-api/src/main/java/com/github/dockerjava/api/model/ContainerNetwork.java‎

Copy file name to clipboardExpand all lines: docker-java-api/src/main/java/com/github/dockerjava/api/model/ContainerNetwork.java
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,8 @@ public ContainerNetwork withNetworkID(String networkID) {
283283
/**
284284
* Docker named it EndpointIPAMConfig
285285
*/
286-
public static class Ipam {
286+
public static class Ipam implements Serializable {
287+
private static final long serialVersionUID = 1L;
287288

288289
@JsonProperty("IPv4Address")
289290
private String ipv4Address;
Collapse file

‎docker-java-api/src/main/java/com/github/dockerjava/api/model/InfoRegistryConfig.java‎

Copy file name to clipboardExpand all lines: docker-java-api/src/main/java/com/github/dockerjava/api/model/InfoRegistryConfig.java
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ public InfoRegistryConfig withMirrors(Object mirrors) {
8282
*/
8383
@EqualsAndHashCode
8484
@ToString
85-
public static final class IndexConfig {
85+
public static final class IndexConfig implements Serializable {
86+
private static final long serialVersionUID = 1L;
87+
8688
@JsonProperty("Mirrors")
8789
private List<String> mirrors;
8890

Collapse file

‎docker-java-api/src/main/java/com/github/dockerjava/api/model/Network.java‎

Copy file name to clipboardExpand all lines: docker-java-api/src/main/java/com/github/dockerjava/api/model/Network.java
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ public Map<String, String> getLabels() {
9494

9595
@EqualsAndHashCode
9696
@ToString
97-
public static class ContainerNetworkConfig {
97+
public static class ContainerNetworkConfig implements Serializable {
98+
private static final long serialVersionUID = 1L;
9899

99100
@JsonProperty("EndpointID")
100101
private String endpointId;
@@ -127,7 +128,8 @@ public String getIpv6Address() {
127128

128129
@EqualsAndHashCode
129130
@ToString
130-
public static class Ipam {
131+
public static class Ipam implements Serializable {
132+
private static final long serialVersionUID = 1L;
131133

132134
@JsonProperty("Driver")
133135
private String driver;
@@ -165,7 +167,8 @@ public Ipam withDriver(String driver) {
165167
return this;
166168
}
167169

168-
public static class Config {
170+
public static class Config implements Serializable {
171+
private static final long serialVersionUID = 1L;
169172

170173
@JsonProperty("Subnet")
171174
private String subnet;
Collapse file

‎docker-java-api/src/main/java/com/github/dockerjava/api/model/Ports.java‎

Copy file name to clipboardExpand all lines: docker-java-api/src/main/java/com/github/dockerjava/api/model/Ports.java
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ public Map<ExposedPort, Binding[]> getBindings() {
107107
* @see ExposedPort
108108
*/
109109
@EqualsAndHashCode
110-
public static class Binding {
110+
public static class Binding implements Serializable {
111+
private static final long serialVersionUID = 1L;
111112

112113
/**
113114
* Creates a {@link Binding} for the given {@link #getHostPortSpec() port spec}, leaving the {@link #getHostIp() IP address}
Collapse file

‎docker-java-transport-jersey/pom.xml‎

Copy file name to clipboardExpand all lines: docker-java-transport-jersey/pom.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<dependency>
3636
<groupId>org.apache.httpcomponents</groupId>
3737
<artifactId>httpcore</artifactId>
38-
<version>4.4.10</version>
38+
<version>4.4.13</version>
3939
</dependency>
4040
<dependency>
4141
<groupId>org.apache.httpcomponents</groupId>
Collapse file

‎docker-java-transport-okhttp/pom.xml‎

Copy file name to clipboardExpand all lines: docker-java-transport-okhttp/pom.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<dependency>
3232
<groupId>net.java.dev.jna</groupId>
3333
<artifactId>jna-platform</artifactId>
34-
<version>5.4.0</version>
34+
<version>5.5.0</version>
3535
</dependency>
3636
</dependencies>
3737

Collapse file

‎docker-java/pom.xml‎

Copy file name to clipboardExpand all lines: docker-java/pom.xml
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
<dependency>
103103
<groupId>junit</groupId>
104104
<artifactId>junit</artifactId>
105-
<version>4.12</version>
105+
<version>4.13</version>
106106
<scope>test</scope>
107107
</dependency>
108108
</dependencies>
@@ -113,7 +113,6 @@
113113
<plugin>
114114
<groupId>org.apache.maven.plugins</groupId>
115115
<artifactId>maven-surefire-plugin</artifactId>
116-
<version>${maven-surefire-plugin.version}</version>
117116
<configuration>
118117
<trimStackTrace>false</trimStackTrace>
119118
<rerunFailingTestsCount>3</rerunFailingTestsCount>
Collapse file

‎docker-java/src/test/java/com/github/dockerjava/api/ModelsSerializableTest.java‎

Copy file name to clipboardExpand all lines: docker-java/src/test/java/com/github/dockerjava/api/ModelsSerializableTest.java
+12-5Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.github.dockerjava.api.model.ResponseItem;
88
import com.google.common.reflect.ClassPath.ClassInfo;
99
import org.apache.commons.lang.reflect.FieldUtils;
10+
import org.hamcrest.MatcherAssert;
1011
import org.junit.Test;
1112
import org.slf4j.Logger;
1213
import org.slf4j.LoggerFactory;
@@ -17,10 +18,10 @@
1718
import java.util.List;
1819

1920
import static com.google.common.reflect.ClassPath.from;
21+
import static org.hamcrest.MatcherAssert.assertThat;
2022
import static org.hamcrest.Matchers.instanceOf;
2123
import static org.hamcrest.Matchers.is;
2224
import static org.hamcrest.object.IsCompatibleType.typeCompatibleWith;
23-
import static org.junit.Assert.assertThat;
2425

2526
/**
2627
* @author Kanstantsin Shautsou
@@ -33,13 +34,19 @@ public class ModelsSerializableTest {
3334
BuildResponseItem.class.getName(),
3435
PullResponseItem.class.getName(),
3536
PushResponseItem.class.getName(),
36-
ResponseItem.class.getName()
37+
ResponseItem.class.getName(),
38+
ResponseItem.ErrorDetail.class.getName(),
39+
ResponseItem.ProgressDetail.class.getName()
3740
);
3841

3942
@Test
4043
public void allModelsSerializable() throws IOException, NoSuchFieldException, IllegalAccessException {
4144
final ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
42-
for (ClassInfo classInfo : from(contextClassLoader).getTopLevelClasses("com.github.dockerjava.api.model")) {
45+
for (ClassInfo classInfo : from(contextClassLoader).getAllClasses()) {
46+
if (!classInfo.getPackageName().equals("com.github.dockerjava.api.model")) {
47+
continue;
48+
}
49+
4350
if (classInfo.getName().endsWith("Test")) {
4451
continue;
4552
}
@@ -50,13 +57,13 @@ public void allModelsSerializable() throws IOException, NoSuchFieldException, Il
5057
continue;
5158
}
5259

53-
LOG.debug("aClass: {}", aClass);
60+
LOG.debug("Checking: {}", aClass);
5461
assertThat(aClass, typeCompatibleWith(Serializable.class));
5562

5663
final Object serialVersionUID = FieldUtils.readDeclaredStaticField(aClass, "serialVersionUID", true);
5764
if (!excludeClasses.contains(aClass.getName())) {
5865
assertThat(serialVersionUID, instanceOf(Long.class));
59-
assertThat("Follow devel docs", (Long) serialVersionUID, is(1L));
66+
assertThat("Follow devel docs for " + aClass, (Long) serialVersionUID, is(1L));
6067
}
6168
}
6269
}
Collapse file

‎docker-java/src/test/java/com/github/dockerjava/api/command/InspectContainerResponseTest.java‎

Copy file name to clipboardExpand all lines: docker-java/src/test/java/com/github/dockerjava/api/command/InspectContainerResponseTest.java
+24-24Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
import static com.github.dockerjava.test.serdes.JSONTestHelper.testRoundTrip;
3232
import static org.hamcrest.MatcherAssert.assertThat;
3333
import static org.hamcrest.Matchers.containsString;
34+
import static org.hamcrest.Matchers.emptyString;
3435
import static org.hamcrest.Matchers.equalTo;
3536
import static org.hamcrest.Matchers.is;
36-
import static org.hamcrest.Matchers.isEmptyString;
3737
import static org.hamcrest.Matchers.notNullValue;
3838
import static org.hamcrest.Matchers.nullValue;
3939
import static org.hamcrest.core.IsNot.not;
@@ -51,7 +51,7 @@ public class InspectContainerResponseTest {
5151
@Test
5252
public void roundTrip_full() throws IOException {
5353
InspectContainerResponse[] responses = testRoundTrip(CommandJSONSamples.inspectContainerResponse_full,
54-
InspectContainerResponse[].class);
54+
InspectContainerResponse[].class);
5555
assertEquals(1, responses.length);
5656
final InspectContainerResponse response = responses[0];
5757

@@ -72,10 +72,10 @@ public void roundTrip_full_healthcheck() throws IOException {
7272
final JavaType type = JSONTestHelper.getMapper().getTypeFactory().constructType(InspectContainerResponse.class);
7373

7474
final InspectContainerResponse response = testRoundTrip(RemoteApiVersion.VERSION_1_24,
75-
"/containers/inspect/1.json",
76-
type
75+
"/containers/inspect/1.json",
76+
type
7777
);
78-
78+
7979
assertEquals(response.getState().getHealth().getStatus(), "healthy");
8080
assertEquals(response.getState().getHealth().getFailingStreak(), new Integer(0));
8181
assertEquals(response.getState().getHealth().getLog().size(), 2);
@@ -86,7 +86,7 @@ public void roundTrip_full_healthcheck() throws IOException {
8686
@Test
8787
public void roundTrip_1_21_full() throws IOException {
8888
InspectContainerResponse[] responses = testRoundTrip(CommandJSONSamples.inspectContainerResponse_full_1_21,
89-
InspectContainerResponse[].class);
89+
InspectContainerResponse[].class);
9090
assertEquals(1, responses.length);
9191
final InspectContainerResponse response = responses[0];
9292
final InspectContainerResponse.ContainerState state = response.getState();
@@ -96,13 +96,13 @@ public void roundTrip_1_21_full() throws IOException {
9696
assertThat(state.getStatus(), containsString("running"));
9797
assertFalse(state.getRestarting());
9898
assertFalse(state.getOOMKilled());
99-
assertThat(state.getError(), isEmptyString());
99+
assertThat(state.getError(), is(emptyString()));
100100
}
101101

102102
@Test
103103
public void roundTrip_1_26a_full() throws IOException {
104104
InspectContainerResponse[] responses = testRoundTrip(CommandJSONSamples.inspectContainerResponse_full_1_26a,
105-
InspectContainerResponse[].class);
105+
InspectContainerResponse[].class);
106106

107107
assertEquals(1, responses.length);
108108
final InspectContainerResponse response = responses[0];
@@ -118,7 +118,7 @@ public void roundTrip_1_26a_full() throws IOException {
118118
@Test
119119
public void roundTrip_1_26b_full() throws IOException {
120120
InspectContainerResponse[] responses = testRoundTrip(CommandJSONSamples.inspectContainerResponse_full_1_26b,
121-
InspectContainerResponse[].class);
121+
InspectContainerResponse[].class);
122122

123123
assertEquals(1, responses.length);
124124
final InspectContainerResponse response = responses[0];
@@ -142,8 +142,8 @@ public void inspect_windows_container() throws IOException {
142142
final JavaType type = JSONTestHelper.getMapper().getTypeFactory().constructType(InspectContainerResponse.class);
143143

144144
final InspectContainerResponse response = testRoundTrip(RemoteApiVersion.VERSION_1_38,
145-
"/containers/inspect/lcow.json",
146-
type
145+
"/containers/inspect/lcow.json",
146+
type
147147
);
148148

149149
assertThat(response, notNullValue());
@@ -157,31 +157,31 @@ public void inspect_windows_container() throws IOException {
157157
assertThat(response.getGraphDriver(), notNullValue());
158158
assertThat(response.getGraphDriver().getName(), is("windowsfilter"));
159159
assertThat(response.getGraphDriver().getData(), is(new GraphData().withDir(
160-
"C:\\ProgramData\\Docker\\windowsfilter\\35da02ca897bd378ee52be3066c847fee396ba1a28a00b4be36f42c6686bf556"
160+
"C:\\ProgramData\\Docker\\windowsfilter\\35da02ca897bd378ee52be3066c847fee396ba1a28a00b4be36f42c6686bf556"
161161
)));
162162

163163
assertThat(response.getHostConfig(), notNullValue());
164164
assertThat(response.getHostConfig().getIsolation(), is(Isolation.HYPERV));
165165

166166
assertThat(response.getImageId(), is("sha256:1381511ec0122f197b6abff5bc0692bef19943ddafd6680eff41197afa3a6dda"));
167167
assertThat(response.getLogPath(), is(
168-
"C:\\ProgramData\\Docker\\containers\\35da02ca897bd378ee52be3066c847fee396ba1a28a00b4be36f42c6686bf556" +
169-
"\\35da02ca897bd378ee52be3066c847fee396ba1a28a00b4be36f42c6686bf556-json.log"
168+
"C:\\ProgramData\\Docker\\containers\\35da02ca897bd378ee52be3066c847fee396ba1a28a00b4be36f42c6686bf556" +
169+
"\\35da02ca897bd378ee52be3066c847fee396ba1a28a00b4be36f42c6686bf556-json.log"
170170
));
171171
assertThat(response.getName(), is("/cranky_clarke"));
172172

173173
assertThat(response.getNetworkSettings(), notNullValue());
174174
assertThat(response.getNetworkSettings().getNetworks(), is(Collections.singletonMap("nat",
175-
new ContainerNetwork()
176-
.withEndpointId("493b77d6fe7e3b92435b1eb01461fde669781330deb84a9cbada360db8997ebc")
177-
.withGateway("172.17.18.1")
178-
.withGlobalIPv6Address("")
179-
.withGlobalIPv6PrefixLen(0)
180-
.withIpv4Address("172.17.18.123")
181-
.withIpPrefixLen(16)
182-
.withIpV6Gateway("")
183-
.withMacAddress("00:aa:ff:cf:dd:09")
184-
.withNetworkID("398c0e206dd677ed4a6566f9de458311f5767d8c7a8b963275490ab64c5d10a7")
175+
new ContainerNetwork()
176+
.withEndpointId("493b77d6fe7e3b92435b1eb01461fde669781330deb84a9cbada360db8997ebc")
177+
.withGateway("172.17.18.1")
178+
.withGlobalIPv6Address("")
179+
.withGlobalIPv6PrefixLen(0)
180+
.withIpv4Address("172.17.18.123")
181+
.withIpPrefixLen(16)
182+
.withIpV6Gateway("")
183+
.withMacAddress("00:aa:ff:cf:dd:09")
184+
.withNetworkID("398c0e206dd677ed4a6566f9de458311f5767d8c7a8b963275490ab64c5d10a7")
185185
)));
186186

187187
assertThat(response.getPath(), is("cmd"));

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.