All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nl.topicus.jdbc.shaded.com.google.instrumentation.common.NonThrowingCloseable Maven / Gradle / Ivy

package nl.topicus.jdbc.shaded.com.google.instrumentation.common;

import java.io.Closeable;

/**
 * An {@link Closeable} which cannot throw a checked exception.
 *
 * 

This is useful because such a reversion otherwise requires the caller to catch the * (impossible) Exception in the try-with-resources. * *

Example of usage: * *

 *   try (NonThrowingAutoCloseable ctx = tryEnter()) {
 *     ...
 *   }
 * 
*/ public interface NonThrowingCloseable extends Closeable { @Override void close(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy