}
if (argsMap.containsKey("name") && Strings.isEmpty(namePart)) {
throw new IllegalArgumentException("Invalid location '"+spec+"'; if name supplied then value must be non-empty");
}
Map<String, Object> filteredProperties = new LocationPropertiesFromBrooklynProperties().getLocationProperties(DOCKER, namedLocation, properties);
MutableMap<String, Object> flags = MutableMap.<String, Object>builder().putAll(filteredProperties).putAll(locationFlags).build();
String infrastructureId = matcher.group(2);
if (Strings.isBlank(infrastructureId)) {
throw new IllegalArgumentException("Invalid location '"+spec+"'; infrastructure entity id must be non-empty");