X Tutup
Skip to content

Commit 9837534

Browse files
committed
Merge pull request #558 from ylorenza/master
docker java generate empty filter instead of no filter #557
2 parents a760dd5 + b8f87dc commit 9837534

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/com/github/dockerjava/jaxrs/ListContainersCmdExec.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ protected List<Container> execute(ListContainersCmd command) {
3737
webTarget = webTarget.queryParam("limit", String.valueOf(command.getLimit()));
3838
}
3939

40-
if (command.getFilters() != null) {
40+
if (command.getFilters() != null && !command.getFilters().isEmpty()) {
4141
webTarget = webTarget
4242
.queryParam("filters", urlPathSegmentEscaper().escape(FiltersEncoder.jsonEncode(command.getFilters())));
4343
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ protected List<Container> execute(ListContainersCmd command) {
3636
webTarget = webTarget.queryParam("limit", String.valueOf(command.getLimit()));
3737
}
3838

39-
if (command.getFilters() != null) {
39+
if (command.getFilters() != null && !command.getFilters().isEmpty()) {
4040
webTarget = webTarget
4141
.queryParam("filters", urlPathSegmentEscaper().escape(FiltersEncoder.jsonEncode(command.getFilters())));
4242
}

0 commit comments

Comments
 (0)
X Tutup