com.yoti.api.client.spi.remote.util.QuietCloseable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yoti-sdk-api Show documentation
Show all versions of yoti-sdk-api Show documentation
Java SDK for simple integration with the Yoti platform
The newest version!
package com.yoti.api.client.spi.remote.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class QuietCloseable implements AutoCloseable {
private static final Logger LOG = LoggerFactory.getLogger(QuietCloseable.class);
private final T autoCloseable;
public QuietCloseable(T autoCloseable) {
this.autoCloseable = autoCloseable;
}
public T get() {
return autoCloseable;
}
@Override
public void close() {
try {
autoCloseable.close();
} catch (Exception e) {
LOG.error("Failed to close '{}'", autoCloseable.getClass().getCanonicalName(), e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy