public class ExposedPortsParser extends Object
| Modifier and Type | Method and Description |
|---|---|
static com.google.common.collect.ImmutableList<String> |
parse(List<String> ports,
BuildLogger buildLogger)
TODO: Return list of
PortsWithProtocols instead of strings |
public static com.google.common.collect.ImmutableList<String> parse(List<String> ports, BuildLogger buildLogger) throws NumberFormatException
PortsWithProtocols instead of strings
Converts/validates a list of ports with ranges to an expanded form without ranges.
Example: ["1000/tcp", "2000-2002/tcp"] -> ["1000/tcp", "2000/tcp", "2001/tcp",
"2002/tcp"]
ports - the list of port numbers/rangesbuildLogger - used to log warning messagesNumberFormatException - if any of the ports are in an invalid format or out of rangeCopyright © 2018. All rights reserved.