br.com.objectos.lang.ThrowablesJava7 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of objectos-lang Show documentation
Show all versions of objectos-lang Show documentation
A set of utilities for classes of the java.lang and the java.util packages.
The newest version!
/*
* Copyright 2021 Objectos Software LTDA.
*
* Reprodução parcial ou total proibida.
*/
package br.com.objectos.lang;
import static br.com.objectos.lang.Lang.checkNotNull;
import br.com.objectos.multirelease.Singleton;
class ThrowablesJava7 extends Throwables {
@Singleton.Field
static final Throwables INSTANCE = new ThrowablesJava7();
ThrowablesJava7() {}
@Override
public final Exception addSuppressed(Exception exception, Exception suppressed) {
checkNotNull(suppressed, "suppressed == null");
if (exception != null) {
exception.addSuppressed(suppressed);
return exception;
} else {
return suppressed;
}
}
@Override
public final Throwable[] getSuppressed(Throwable throwable) {
checkNotNull(throwable, "throwable == null");
return throwable.getSuppressed();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy