Fix InspectContainerResponse data types to be able to hold an int64 (… · docker-java/docker-java@a404bd1 · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Commit a404bd1

Browse files
eddumelendeztkrah
andauthored
Fix InspectContainerResponse data types to be able to hold an int64 (#2392)
* Fix data types to be able to hold an int64 * Add japicmp exclusions in docker-java-api Fixes #2321 --------- Co-authored-by: Torsten Krah <krah.tm@gmail.com>
1 parent 77766d0 commit a404bd1

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

docker-java-api/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,15 @@
8484
<plugin>
8585
<groupId>com.github.siom79.japicmp</groupId>
8686
<artifactId>japicmp-maven-plugin</artifactId>
87+
<configuration>
88+
<parameter>
89+
<excludes>
90+
<!-- Breaking change -->
91+
<exclude>com.github.dockerjava.api.command.InspectContainerResponse#getSizeRootFs()</exclude>
92+
<exclude>com.github.dockerjava.api.command.InspectContainerResponse#getSizeRw()</exclude>
93+
</excludes>
94+
</parameter>
95+
</configuration>
8796
</plugin>
8897
</plugins>
8998
</build>

docker-java-api/src/main/java/com/github/dockerjava/api/command/InspectContainerResponse.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ public class InspectContainerResponse extends DockerObject {
6161
private String id;
6262

6363
@JsonProperty("SizeRootFs")
64-
private Integer sizeRootFs;
64+
private Long sizeRootFs;
6565

6666
@JsonProperty("SizeRw")
67-
private Integer sizeRw;
67+
private Long sizeRw;
6868

6969
@JsonProperty("Image")
7070
private String imageId;
@@ -124,11 +124,11 @@ public String getId() {
124124
return id;
125125
}
126126

127-
public Integer getSizeRootFs() {
127+
public Long getSizeRootFs() {
128128
return sizeRootFs;
129129
}
130130

131-
public Integer getSizeRw() {
131+
public Long getSizeRw() {
132132
return sizeRw;
133133
}
134134

docker-java/src/test/java/com/github/dockerjava/cmd/InspectContainerCmdIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ public void inspectContainerWithSize() throws DockerException {
100100
// TODO check swarm
101101
if (isNotSwarm(dockerRule.getClient())) {
102102
assertNotNull(containerInfo.getSizeRootFs());
103-
assertTrue(containerInfo.getSizeRootFs().intValue() > 0);
103+
assertTrue(containerInfo.getSizeRootFs() > 0L);
104104
assertNotNull(containerInfo.getSizeRw());
105-
assertTrue(containerInfo.getSizeRw().intValue() == 0);
105+
assertEquals(0L, containerInfo.getSizeRw().longValue());
106106
}
107107
}
108108

0 commit comments

Comments
 (0)

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.