Made TomlParser#run(String) static

This commit is contained in:
moandji.ezana 2015-02-13 08:19:40 +02:00
parent b69f8514cb
commit cdef758f4c
2 changed files with 4 additions and 2 deletions

View file

@ -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());
}

View file

@ -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() {}
}