mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

kenneth_suter
03.01.2007 2b17083baf110a1f93cb1bb6cf29f2396ea7c66b
Updated the upgrade build page parser to accept comment lines begining with a '#' character.  I've tested that the parser works with the following:

#Here's a comment
OpenDS .08 https://opends.dev.java.net/files/xxx Release Build
OpenDS 0.1 Build 037 https://opends.dev.java.net/files/documents/4926/56870/OpenDS-0.1-build037.zip Weekly Build
OpenDS 0.1 Build 036 https://opends.dev.java.net/files/documents/4926/56015/OpenDS-0.1-build036.zip Weekly Build
OpenDS 0.1 Build 035 https://opends.dev.java.net/files/documents/4926/55351/OpenDS-0.1-build035.zip Weekly Build
Latest Daily Build http://www.opends.org/daily-builds/latest/OpenDS/build/package/OpenDS-0.1.zip Daily Buildconfiguration during install
1 files modified
26 ■■■■■ changed files
opends/src/quicksetup/org/opends/quicksetup/upgrader/RemoteBuildManager.java 26 ●●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/upgrader/RemoteBuildManager.java
@@ -319,16 +319,18 @@
        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) {
@@ -340,6 +342,10 @@
      return builds;
    }
    static private boolean isComment(String line) {
      return line != null && line.startsWith("#");
    }
    static private Build parseBuildLine(String line)
            throws IllegalArgumentException {
      String displayName = null;