From b1eadee1d0cbf790ef98577e1e3502c85c6869e8 Mon Sep 17 00:00:00 2001 From: Preben Ingvaldsen Date: Tue, 7 Apr 2015 16:36:26 -0700 Subject: [PATCH] Cleanup ConfigParser comments Remove/reword comments on ConfigParser so that they reflect what the Parser is actually doing. --- .../src/main/java/com/typesafe/config/impl/ConfigParser.java | 5 +---- config/src/main/java/com/typesafe/config/impl/Parseable.java | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/config/src/main/java/com/typesafe/config/impl/ConfigParser.java b/config/src/main/java/com/typesafe/config/impl/ConfigParser.java index f883675a..8376a605 100644 --- a/config/src/main/java/com/typesafe/config/impl/ConfigParser.java +++ b/config/src/main/java/com/typesafe/config/impl/ConfigParser.java @@ -59,7 +59,6 @@ final class ConfigParser { if (flavor == ConfigSyntax.JSON) throw new ConfigException.BugOrBroken("Found a concatenation node in JSON"); - // create only if we have value tokens List values = new ArrayList(); for (AbstractConfigNode node : n.children()) { @@ -213,7 +212,6 @@ final class ConfigParser { } private AbstractConfigObject parseObject(ConfigNodeObject n) { - // invoked just after the OPEN_CURLY (or START, if !hadOpenCurly) Map values = new HashMap(); SimpleConfigOrigin objectOrigin = lineOrigin(); boolean lastWasNewline = false; @@ -348,7 +346,6 @@ final class ConfigParser { } private SimpleConfigList parseArray(ConfigNodeArray n) { - // invoked just after the OPEN_SQUARE arrayCount += 1; SimpleConfigOrigin arrayOrigin = lineOrigin(); @@ -358,7 +355,7 @@ final class ConfigParser { List comments = new ArrayList(); AbstractConfigValue v = null; - // now remaining elements + for (AbstractConfigNode node : n.children()) { if (node instanceof ConfigNodeComment) { comments.add(((ConfigNodeComment) node).commentText()); diff --git a/config/src/main/java/com/typesafe/config/impl/Parseable.java b/config/src/main/java/com/typesafe/config/impl/Parseable.java index 04c398a2..9f66af19 100644 --- a/config/src/main/java/com/typesafe/config/impl/Parseable.java +++ b/config/src/main/java/com/typesafe/config/impl/Parseable.java @@ -262,7 +262,7 @@ public abstract class Parseable implements ConfigParseable { } } - // this is parseValue without post-processing the IOException or handling + // this is parseDocument without post-processing the IOException or handling // options.getAllowMissing() protected ConfigDocument rawParseDocument(ConfigOrigin origin, ConfigParseOptions finalOptions) throws IOException {