mirror of
https://github.com/lightbend/config.git
synced 2025-03-22 15:20:26 +08:00
Merge pull request #305 from fpringvaldsen/task/configparser-cleanup
Cleanup ConfigParser comments
This commit is contained in:
commit
357de0deac
@ -59,7 +59,6 @@ final class ConfigParser {
|
|||||||
if (flavor == ConfigSyntax.JSON)
|
if (flavor == ConfigSyntax.JSON)
|
||||||
throw new ConfigException.BugOrBroken("Found a concatenation node in JSON");
|
throw new ConfigException.BugOrBroken("Found a concatenation node in JSON");
|
||||||
|
|
||||||
// create only if we have value tokens
|
|
||||||
List<AbstractConfigValue> values = new ArrayList<AbstractConfigValue>();
|
List<AbstractConfigValue> values = new ArrayList<AbstractConfigValue>();
|
||||||
|
|
||||||
for (AbstractConfigNode node : n.children()) {
|
for (AbstractConfigNode node : n.children()) {
|
||||||
@ -213,7 +212,6 @@ final class ConfigParser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private AbstractConfigObject parseObject(ConfigNodeObject n) {
|
private AbstractConfigObject parseObject(ConfigNodeObject n) {
|
||||||
// invoked just after the OPEN_CURLY (or START, if !hadOpenCurly)
|
|
||||||
Map<String, AbstractConfigValue> values = new HashMap<String, AbstractConfigValue>();
|
Map<String, AbstractConfigValue> values = new HashMap<String, AbstractConfigValue>();
|
||||||
SimpleConfigOrigin objectOrigin = lineOrigin();
|
SimpleConfigOrigin objectOrigin = lineOrigin();
|
||||||
boolean lastWasNewline = false;
|
boolean lastWasNewline = false;
|
||||||
@ -348,7 +346,6 @@ final class ConfigParser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private SimpleConfigList parseArray(ConfigNodeArray n) {
|
private SimpleConfigList parseArray(ConfigNodeArray n) {
|
||||||
// invoked just after the OPEN_SQUARE
|
|
||||||
arrayCount += 1;
|
arrayCount += 1;
|
||||||
|
|
||||||
SimpleConfigOrigin arrayOrigin = lineOrigin();
|
SimpleConfigOrigin arrayOrigin = lineOrigin();
|
||||||
@ -358,7 +355,7 @@ final class ConfigParser {
|
|||||||
List<String> comments = new ArrayList<String>();
|
List<String> comments = new ArrayList<String>();
|
||||||
|
|
||||||
AbstractConfigValue v = null;
|
AbstractConfigValue v = null;
|
||||||
// now remaining elements
|
|
||||||
for (AbstractConfigNode node : n.children()) {
|
for (AbstractConfigNode node : n.children()) {
|
||||||
if (node instanceof ConfigNodeComment) {
|
if (node instanceof ConfigNodeComment) {
|
||||||
comments.add(((ConfigNodeComment) node).commentText());
|
comments.add(((ConfigNodeComment) node).commentText());
|
||||||
|
@ -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()
|
// options.getAllowMissing()
|
||||||
protected ConfigDocument rawParseDocument(ConfigOrigin origin, ConfigParseOptions finalOptions)
|
protected ConfigDocument rawParseDocument(ConfigOrigin origin, ConfigParseOptions finalOptions)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
Loading…
Reference in New Issue
Block a user