From cdef758f4c7de3ef161d2e2b94dd48487d025cb7 Mon Sep 17 00:00:00 2001 From: "moandji.ezana" Date: Fri, 13 Feb 2015 08:19:40 +0200 Subject: [PATCH] Made TomlParser#run(String) static --- src/main/java/com/moandjiezana/toml/Toml.java | 2 +- src/main/java/com/moandjiezana/toml/TomlParser.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/moandjiezana/toml/Toml.java b/src/main/java/com/moandjiezana/toml/Toml.java index 2da371f..a6730d7 100644 --- a/src/main/java/com/moandjiezana/toml/Toml.java +++ b/src/main/java/com/moandjiezana/toml/Toml.java @@ -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()); } diff --git a/src/main/java/com/moandjiezana/toml/TomlParser.java b/src/main/java/com/moandjiezana/toml/TomlParser.java index 14e0a35..f881326 100644 --- a/src/main/java/com/moandjiezana/toml/TomlParser.java +++ b/src/main/java/com/moandjiezana/toml/TomlParser.java @@ -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() {} }