@Test(expected=IllegalArgumentException.class) public void testError2() { NameParser.parseParameters("1.O"); }
static List<Object> parseParameters(String string) { if (string == null || "".equals(string)) return Collections.emptyList(); if (!commaSeparatedDoubles.matcher(string).matches()) { throw new IllegalArgumentException("Arguments must be a comma separated list of double values (was " + string + ")"); } Matcher matcher = doubleParameter.matcher(string); List<Object> parameters = new ArrayList<Object>(); while (matcher.find()) { String parameter = matcher.group(); Double value = Double.parseDouble(parameter); parameters.add(value); } return parameters; }
NameParser { static List<Object> parseParameters(String string) { if (string == null || "".equals(string)) return Collections.emptyList(); if (!commaSeparatedDoubles.matcher(string).matches()) { throw new IllegalArgumentException("Arguments must be a comma separated list of double values (was " + string + ")"); } Matcher matcher = doubleParameter.matcher(string); List<Object> parameters = new ArrayList<Object>(); while (matcher.find()) { String parameter = matcher.group(); Double value = Double.parseDouble(parameter); parameters.add(value); } return parameters; } }
NameParser { static List<Object> parseParameters(String string) { if (string == null || "".equals(string)) return Collections.emptyList(); if (!commaSeparatedDoubles.matcher(string).matches()) { throw new IllegalArgumentException("Arguments must be a comma separated list of double values (was " + string + ")"); } Matcher matcher = doubleParameter.matcher(string); List<Object> parameters = new ArrayList<Object>(); while (matcher.find()) { String parameter = matcher.group(); Double value = Double.parseDouble(parameter); parameters.add(value); } return parameters; }  }
NameParser { static List<Object> parseParameters(String string) { if (string == null || "".equals(string)) return Collections.emptyList(); if (!commaSeparatedDoubles.matcher(string).matches()) { throw new IllegalArgumentException("Arguments must be a comma separated list of double values (was " + string + ")"); } Matcher matcher = doubleParameter.matcher(string); List<Object> parameters = new ArrayList<Object>(); while (matcher.find()) { String parameter = matcher.group(); Double value = Double.parseDouble(parameter); parameters.add(value); } return parameters; }   }
NameParser { static List<Object> parseParameters(String string) { if (string == null || "".equals(string)) return Collections.emptyList(); if (!commaSeparatedDoubles.matcher(string).matches()) { throw new IllegalArgumentException("Arguments must be a comma separated list of double values (was " + string + ")"); } Matcher matcher = doubleParameter.matcher(string); List<Object> parameters = new ArrayList<Object>(); while (matcher.find()) { String parameter = matcher.group(); Double value = Double.parseDouble(parameter); parameters.add(value); } return parameters; }    }