Skip to content

Commit

Permalink
0002504 - File parsing router fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Hicks, Josh committed Mar 1, 2016
1 parent c84f2d0 commit 24ce65f
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -75,7 +75,7 @@ public Set<String> routeToNodes(SimpleRouterContext context, DataMetaData dataMe

try {
for (Map.Entry<String, Integer> entry : bookmarkMap.entrySet()) {
resource.getWriter().write(entry.getKey() + "=" + entry.getValue());
resource.getWriter().write("\n" + entry.getKey() + "=" + entry.getValue());
}
resource.getWriter().close();
resource.setState(State.DONE);
Expand Down Expand Up @@ -109,7 +109,9 @@ public Map<String, Integer> readStagingFile(IStagedResource resource) {
if (resource.exists()) {
while ((thisLine = resource.getReader().readLine()) != null) {
String[] split = thisLine.split("=");
bookmarkMap.put(split[0], new Integer(split[1]));
if (split.length == 2) {
bookmarkMap.put(split[0].trim(), new Integer(split[1].trim()));
}
}
}
}catch(Exception e){
Expand Down

0 comments on commit 24ce65f

Please sign in to comment.