Skip to content

Commit 658c213

Browse files
committed
Adjust tests
1 parent 2dd6c35 commit 658c213

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/io/simplelocalize/cli/client/SimpleLocalizeUriFactory.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import java.net.URI;
88
import java.nio.file.Path;
99
import java.util.List;
10+
import java.util.Objects;
1011

1112
public class SimpleLocalizeUriFactory
1213
{
@@ -33,7 +34,7 @@ URI buildDownloadUri(ExportRequest exportRequest)
3334
endpointUrl += "&downloadOptions=" + String.join(",", downloadOptions);
3435
}
3536

36-
List<String> tags = exportRequest.tags();
37+
List<String> tags = Objects.requireNonNullElse(exportRequest.tags(), List.of());
3738
if (!tags.isEmpty())
3839
{
3940
endpointUrl += "&tags=" + String.join(",", tags);
@@ -82,7 +83,7 @@ URI buildUploadUri(UploadRequest uploadRequest, boolean isPreviewMode)
8283
endpointUrl += "&uploadOptions=" + String.join(",", uploadOptions);
8384
}
8485

85-
List<String> tags = uploadRequest.tags();
86+
List<String> tags = Objects.requireNonNullElse(uploadRequest.tags(), List.of());
8687
if (!tags.isEmpty())
8788
{
8889
endpointUrl += "&tags=" + String.join(",", tags);

0 commit comments

Comments
 (0)