Skip to content

Commit 32d0f93

Browse files
committed
Restore backward compatibility
1 parent 18a0feb commit 32d0f93

2 files changed

Lines changed: 12 additions & 27 deletions

File tree

src/main/java/com/github/dockerjava/api/command/BuildImageCmd.java

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,12 @@ public interface BuildImageCmd extends AsyncDockerCmd<BuildImageCmd, BuildRespon
4040
/**
4141
* "nocache" in API
4242
*/
43-
@CheckForNull
44-
public Boolean hasNoCacheEnabled();
43+
public boolean hasNoCacheEnabled();
4544

4645
/**
4746
* "rm" in API
4847
*/
49-
@CheckForNull
50-
public Boolean hasRemoveEnabled();
48+
public boolean hasRemoveEnabled();
5149

5250
/**
5351
* "forcerm" in API
@@ -62,14 +60,10 @@ public interface BuildImageCmd extends AsyncDockerCmd<BuildImageCmd, BuildRespon
6260
*/
6361
public boolean isQuiet();
6462

65-
@CheckForNull
66-
public Boolean getQuiet();
67-
6863
/**
6964
* "pull" in API
7065
*/
71-
@CheckForNull
72-
public Boolean hasPullEnabled();
66+
public boolean hasPullEnabled();
7367

7468
@CheckForNull
7569
public String getPathToDockerfile();
@@ -106,7 +100,7 @@ public interface BuildImageCmd extends AsyncDockerCmd<BuildImageCmd, BuildRespon
106100

107101
public BuildImageCmd withForcerm();
108102

109-
public BuildImageCmd withForcerm(boolean forcerm);
103+
public BuildImageCmd withForcerm(Boolean forcerm);
110104

111105
public BuildImageCmd withQuiet();
112106

src/main/java/com/github/dockerjava/core/command/BuildImageCmdImpl.java

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,13 @@ public class BuildImageCmdImpl extends AbstrAsyncDockerCmd<BuildImageCmd, BuildR
3030
@CheckForNull
3131
private String tag;
3232

33-
@CheckForNull
34-
private Boolean noCache;
33+
private boolean noCache;
3534

36-
@CheckForNull
37-
private Boolean remove = true;
35+
private boolean remove = true;
3836

39-
@CheckForNull
40-
private Boolean quiet;
37+
private boolean quiet;
4138

42-
@CheckForNull
43-
private Boolean pull;
39+
private boolean pull;
4440

4541
@CheckForNull
4642
private AuthConfigurations buildAuthConfigs;
@@ -104,12 +100,12 @@ public URI getRemote() {
104100
}
105101

106102
@Override
107-
public Boolean hasNoCacheEnabled() {
103+
public boolean hasNoCacheEnabled() {
108104
return noCache;
109105
}
110106

111107
@Override
112-
public Boolean hasRemoveEnabled() {
108+
public boolean hasRemoveEnabled() {
113109
return remove;
114110
}
115111

@@ -125,16 +121,11 @@ public Boolean getForcerm() {
125121

126122
@Override
127123
public boolean isQuiet() {
128-
return quiet != null && quiet;
129-
}
130-
131-
@Override
132-
public Boolean getQuiet() {
133124
return quiet;
134125
}
135126

136127
@Override
137-
public Boolean hasPullEnabled() {
128+
public boolean hasPullEnabled() {
138129
return pull;
139130
}
140131

@@ -222,7 +213,7 @@ public BuildImageCmd withForcerm() {
222213
}
223214

224215
@Override
225-
public BuildImageCmd withForcerm(boolean forcerm) {
216+
public BuildImageCmd withForcerm(Boolean forcerm) {
226217
this.forcerm = forcerm;
227218
return this;
228219
}

0 commit comments

Comments
 (0)