diff --git a/zanata-client-commands/src/main/java/org/zanata/client/commands/push/RawPushCommand.java b/zanata-client-commands/src/main/java/org/zanata/client/commands/push/RawPushCommand.java index f95d0f13..8d2c3633 100644 --- a/zanata-client-commands/src/main/java/org/zanata/client/commands/push/RawPushCommand.java +++ b/zanata-client-commands/src/main/java/org/zanata/client/commands/push/RawPushCommand.java @@ -113,15 +113,18 @@ public void run() throws Exception ClientResponse response = fileResource.acceptedFileTypes(); StringSet serverAcceptedTypes = new StringSet(response.getEntity()); - for (String type : getOpts().getFileTypes()) + if (getOpts().getFileTypes() != null) { - if (serverAcceptedTypes.contains(type)) + for (String type : getOpts().getFileTypes()) { - types.add(type); - } - else - { - log.warn("Requested type '{}' is not supported by the target server and will be ignored.", type); + if (serverAcceptedTypes.contains(type)) + { + types.add(type); + } + else + { + log.warn("Requested type '{}' is not supported by the target server and will be ignored.", type); + } } }