From 2b17083baf110a1f93cb1bb6cf29f2396ea7c66b Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Thu, 03 May 2007 20:01:30 +0000
Subject: [PATCH] Updated the upgrade build page parser to accept comment lines begining with a '#' character. I've tested that the parser works with the following:
---
opends/src/quicksetup/org/opends/quicksetup/upgrader/RemoteBuildManager.java | 26 ++++++++++++++++----------
1 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/upgrader/RemoteBuildManager.java b/opends/src/quicksetup/org/opends/quicksetup/upgrader/RemoteBuildManager.java
index 195305b..b3d7dfa 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/upgrader/RemoteBuildManager.java
+++ b/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;
--
Gitblit v1.10.0