Skip to content

Commit 05a9a74

Browse files
author
kannan-ca
committed
Used existing queryParamSet method
1 parent e5e674a commit 05a9a74

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/main/java/com/github/dockerjava/netty/exec/BuildImageCmdExec.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,8 @@ protected Void execute0(BuildImageCmd command, ResultCallback<BuildResponseItem>
5858
webTarget = webTarget.queryParam("t", command.getTag());
5959
}
6060

61-
if (command.getCacheFrom() != null) {
62-
for (String c: command.getCacheFrom()) {
63-
webTarget = webTarget.queryParam("cachefrom", c);
64-
}
61+
if (command.getCacheFrom() != null && !command.getCacheFrom().isEmpty()) {
62+
webTarget = webTarget.queryParamsSet("cachefrom", command.getCacheFrom());
6563
}
6664

6765
if (command.getRemote() != null) {

0 commit comments

Comments
 (0)