Changeset 14025 in josm


Ignore:
Timestamp:
2018-07-08T23:38:08+02:00 (6 years ago)
Author:
Don-vip
Message:

taginfo: remove withCloseable statement requiring groovy >= 2.4.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/TagInfoExtract.groovy

    r14024 r14025  
    365365        config[JsonGenerator.PRETTY_PRINTING] = output_file == null
    366366        def writer = output_file != null ? output_file : new StringWriter()
    367         Json.createWriterFactory(config).createWriter(writer).withCloseable {json ->
     367        def json = Json.createWriterFactory(config).createWriter(writer)
     368        try {
    368369            def project = Json.createObjectBuilder()
    369370                .add("name", name)
     
    395396                .add("tags", jsonTags.build())
    396397                .build())
     398        } finally {
     399            json.close()
    397400        }
    398401
Note: See TracChangeset for help on using the changeset viewer.