mirror of
https://github.com/lightbend/config.git
synced 2025-01-28 21:20:07 +08:00
close StringReader in parsePath
not sure there's any real need but technically correct
This commit is contained in:
parent
d46b068eaf
commit
cfff60131e
@ -512,9 +512,13 @@ final class Parser {
|
||||
|
||||
static Path parsePath(String path) {
|
||||
StringReader reader = new StringReader(path);
|
||||
Iterator<Token> tokens = Tokenizer.tokenize(apiOrigin, reader);
|
||||
tokens.next(); // drop START
|
||||
|
||||
return parsePathExpression(tokens, apiOrigin);
|
||||
try {
|
||||
Iterator<Token> tokens = Tokenizer.tokenize(apiOrigin, reader);
|
||||
tokens.next(); // drop START
|
||||
return parsePathExpression(tokens, apiOrigin);
|
||||
} finally {
|
||||
reader.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user