Changes applied
package io.fabric8.maven.docker.config.handler.compose;
import java.io.File;
-import java.util.*;
-
-import io.fabric8.maven.docker.config.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import io.fabric8.maven.docker.config.Arguments;
+import io.fabric8.maven.docker.config.ImageConfiguration;
+import io.fabric8.maven.docker.config.LogConfiguration;
+import io.fabric8.maven.docker.config.NetworkConfig;
+import io.fabric8.maven.docker.config.RestartPolicy;
+import io.fabric8.maven.docker.config.RunVolumeConfiguration;
+import io.fabric8.maven.docker.config.UlimitConfig;
import io.fabric8.maven.docker.util.VolumeBindingUtil;
@@ -186,18 +197,18 @@ class DockerComposeServiceWrapper {
for (String alias : (List<String>) aliases) {
ret.addAlias(alias);
}
- } else if (aliases instanceof LinkedHashMap) {
- LinkedHashMap<String, ArrayList<String>> map = (LinkedHashMap<String, ArrayList<String>>) aliases;
+ } else if (aliases instanceof Map) {
+ Map<String, List<String>> map = (Map<String, List<String>>) aliases;
if (map.containsKey("aliases")) {
for (String alias : map.get("aliases")) {
ret.addAlias(alias);
}
} else {
throwIllegalArgumentException(
- "'networks:' Aliases must be given as a linked has map of strings. 'aliases' key not founded");
+ "'networks:' Aliases must be given as a map of strings. 'aliases' key not founded");
}
} else {
- throwIllegalArgumentException("'networks:' Aliases must be given as a list of string ");
+ throwIllegalArgumentException("'networks:' No aliases entry found in network config map");
}
}
return ret;
