File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
subprojects/groovy-toml/src/main/java/org/apache/groovy/toml/util Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -40,10 +40,10 @@ public final class TomlConverter {
4040 * @return the text of json
4141 */
4242 public static String convertTomlToJson (Reader tomlReader ) {
43- try ( Reader reader = tomlReader ) {
44- Object yaml = new ObjectMapper (new TomlFactory ()).readValue (reader , Object .class );
43+ try {
44+ Object toml = new ObjectMapper (new TomlFactory ()).readValue (tomlReader , Object .class );
4545
46- return new ObjectMapper ().writeValueAsString (yaml );
46+ return new ObjectMapper ().writeValueAsString (toml );
4747 } catch (IOException e ) {
4848 throw new TomlRuntimeException (e );
4949 }
@@ -55,8 +55,8 @@ public static String convertTomlToJson(Reader tomlReader) {
5555 * @return the text of toml
5656 */
5757 public static String convertJsonToToml (Reader jsonReader ) {
58- try ( Reader reader = jsonReader ) {
59- JsonNode json = new ObjectMapper ().readTree (reader );
58+ try {
59+ JsonNode json = new ObjectMapper ().readTree (jsonReader );
6060
6161 return new TomlMapper ().writeValueAsString (json );
6262 } catch (IOException e ) {
You can’t perform that action at this time.
0 commit comments