/** * @deprecated Use {@link #assertAndLogWithException(Logger, boolean, String, Throwable)} instead. * This will make sure log events go to your logger instead of a hard-to-filter default. * (com.palantir.util.AssertUtils) */ @Deprecated public static void assertAndLogWithException(boolean cheapTest, String msg, Throwable t) { assertAndLogWithException(defaultLog, cheapTest, msg, t); }
public static void assertAndLogWithException(Logger log, boolean cheapTest, String format, Throwable t, Object... args) { if (!cheapTest) { assertAndLogWithException(log, false, String.format(format, args), t); } }
/** * @deprecated Use {@link #assertAndLogWithException(Logger, boolean, String, Throwable, Object...)} instead. * This will make sure log events go to your logger instead of a hard-to-filter default. * (com.palantir.util.AssertUtils) */ @Deprecated public static void assertAndLogWithException(boolean cheapTest, String format, Throwable t, Object... args) { assertAndLogWithException(defaultLog, cheapTest, format, t, args); }
public static void assertAndLog(Logger log, boolean cheapTest, String msg) { if (!cheapTest) { assertAndLogWithException(log, false, msg, getDebuggingException()); } }
@Override public void finalize() throws Throwable { try { if (!hasBeenClosed) { close(); AssertUtils.assertAndLogWithException(log, false, String.format( "This AgnosticLightResultSet is being finalized, but it has not been closed. " + //$NON-NLS-1$ "This is a programming error and can lead to cursor leaks. Thread: %s", creationThreadName), //$NON-NLS-1$ creationLocation); } } finally { super.finalize(); } }
/** * @deprecated Use {@link #assertAndLogWithException(Logger, boolean, String, Throwable, Object...)} instead. * This will make sure log events go to your logger instead of a hard-to-filter default. * (com.palantir.util.AssertUtils) */ @Deprecated public static void assertAndLogWithException(boolean cheapTest, String format, Throwable t, Object... args) { assertAndLogWithException(defaultLog, cheapTest, format, t, args); }
/** * @deprecated Use {@link #assertAndLogWithException(Logger, boolean, String, Throwable)} instead. * This will make sure log events go to your logger instead of a hard-to-filter default. * (com.palantir.util.AssertUtils) */ @Deprecated public static void assertAndLogWithException(boolean cheapTest, String msg, Throwable t) { assertAndLogWithException(defaultLog, cheapTest, msg, t); }
public static void assertAndLogWithException(Logger log, boolean cheapTest, String format, Throwable t, Object... args) { if (!cheapTest) { assertAndLogWithException(log, false, String.format(format, args), t); } }
public static void assertAndLog(Logger log, boolean cheapTest, String msg) { if (!cheapTest) { assertAndLogWithException(log, false, msg, getDebuggingException()); } }
@Override public void finalize() throws Throwable { try { if (!hasBeenClosed) { close(); AssertUtils.assertAndLogWithException(log, false, String.format( "This AgnosticLightResultSet is being finalized, but it has not been closed. " + //$NON-NLS-1$ "This is a programming error and can lead to cursor leaks. Thread: %s", creationThreadName), //$NON-NLS-1$ creationLocation); } } finally { super.finalize(); } }