| | |
| | | String line; |
| | | try { |
| | | while (null != (line = reader.readLine())) { |
| | | try { |
| | | Build build = parseBuildLine(line); |
| | | builds.add(build); |
| | | } catch (IllegalArgumentException iae) { |
| | | StringBuffer msg = new StringBuffer() |
| | | .append("Error parsing line '") |
| | | .append(line) |
| | | .append("': ") |
| | | .append(iae.getMessage()); |
| | | LOG.log(Level.INFO, msg.toString()); |
| | | if (!isComment(line)) { |
| | | try { |
| | | Build build = parseBuildLine(line); |
| | | builds.add(build); |
| | | } catch (IllegalArgumentException iae) { |
| | | StringBuffer msg = new StringBuffer() |
| | | .append("Error parsing line '") |
| | | .append(line) |
| | | .append("': ") |
| | | .append(iae.getMessage()); |
| | | LOG.log(Level.INFO, msg.toString()); |
| | | } |
| | | } |
| | | } |
| | | } catch (IOException e) { |
| | |
| | | return builds; |
| | | } |
| | | |
| | | static private boolean isComment(String line) { |
| | | return line != null && line.startsWith("#"); |
| | | } |
| | | |
| | | static private Build parseBuildLine(String line) |
| | | throws IllegalArgumentException { |
| | | String displayName = null; |