Updates Soyc dashboard settings processing to be more flexible with respect to symbol maps format. In particular, it now includes leading lines in symbol maps files that do not conform to the # { ... } format.
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@6098 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/soyc/Settings.java b/dev/core/src/com/google/gwt/soyc/Settings.java
index 8b9732d..7f5b9bb 100644
--- a/dev/core/src/com/google/gwt/soyc/Settings.java
+++ b/dev/core/src/com/google/gwt/soyc/Settings.java
@@ -230,16 +230,19 @@
while ((sc.hasNextLine()) && (lineCount < 2)) {
String curLine = sc.nextLine();
- curLine = curLine.replace("# {", "");
- curLine = curLine.replace("}", "");
curLine = curLine.trim();
- if (lineCount == 0) {
- permutationId = curLine;
- } else {
- permutationInfo = curLine;
+ if (curLine.startsWith("# {")) {
+ curLine = curLine.replace("# {", "");
+ curLine = curLine.replace("}", "");
+ curLine = curLine.trim();
+ if (lineCount == 0) {
+ permutationId = curLine;
+ } else {
+ permutationInfo = curLine;
+ }
+ lineCount++;
}
- lineCount++;
}
allPermsInfo.put(permutationId, permutationInfo);
}