Sha256: c4f1d778685eebf826eb1e87303156cd482a6a0e70f216b3cd2ecad028494578
Contents?: true
Size: 735 Bytes
Versions: 88
Compression:
Stored size: 735 Bytes
Contents
package org.embulk.spi; import com.google.common.base.Throwables; public class CloseResource implements AutoCloseable { private AutoCloseable resource; public CloseResource() { this(null); } public CloseResource(AutoCloseable resource) { this.resource = resource; } public void closeThis(AutoCloseable resource) { this.resource = resource; } public void dontClose() { this.resource = null; } public void close() { if (resource != null) { try { resource.close(); } catch (Exception ex) { throw Throwables.propagate(ex); } } } }
Version data entries
88 entries across 88 versions & 1 rubygems