mirror of
https://github.com/plexusorg/toml4j.git
synced 2024-10-31 17:29:14 +00:00
Made TomlParser#run(String) static
This commit is contained in:
parent
b69f8514cb
commit
cdef758f4c
|
@ -123,7 +123,7 @@ public class Toml {
|
|||
* @throws IllegalStateException If tomlString is not valid TOML
|
||||
*/
|
||||
public Toml parse(String tomlString) throws IllegalStateException {
|
||||
Results results = new TomlParser().run(tomlString);
|
||||
Results results = TomlParser.run(tomlString);
|
||||
if (results.errors.hasErrors()) {
|
||||
throw new IllegalStateException(results.errors.toString());
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
|
||||
class TomlParser {
|
||||
|
||||
Results run(String tomlString) {
|
||||
static Results run(String tomlString) {
|
||||
final Results results = new Results();
|
||||
|
||||
if (tomlString.isEmpty()) {
|
||||
|
@ -57,4 +57,6 @@ class TomlParser {
|
|||
|
||||
return results;
|
||||
}
|
||||
|
||||
private TomlParser() {}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue