/** * If CloseGuard is enabled, logs a warning if the caller did not * properly cleanup by calling an explicit close method * before finalization. If CloseGuard is disabled, no action is * performed. */ public void warnIfOpen() { if (allocationSite == null || !ENABLED) { return; } String message = ("A resource was acquired at attached stack trace but never released. " + "See java.io.Closeable for information on avoiding resource leaks."); REPORTER.report(message, allocationSite); }
/** * If CloseGuard is enabled, logs a warning if the caller did not * properly cleanup by calling an explicit close method * before finalization. If CloseGuard is disabled, no action is * performed. */ public void warnIfOpen() { if (allocationSite == null || !ENABLED) { return; } String message = ("A resource was acquired at attached stack trace but never released. " + "See java.io.Closeable for information on avoiding resource leaks."); REPORTER.report(message, allocationSite); }
/** * If CloseGuard is enabled, logs a warning if the caller did not * properly cleanup by calling an explicit close method * before finalization. If CloseGuard is disabled, no action is * performed. */ public void warnIfOpen() { if (allocationSite == null || !ENABLED) { return; } String message = ("A resource was acquired at attached stack trace but never released. " + "See java.io.Closeable for information on avoiding resource leaks."); REPORTER.report(message, allocationSite); }
/** * If CloseGuard is enabled, logs a warning if the caller did not * properly cleanup by calling an explicit close method * before finalization. If CloseGuard is disabled, no action is * performed. */ public void warnIfOpen() { if (allocationSite == null || !ENABLED) { return; } String message = ("A resource was acquired at attached stack trace but never released. " + "See java.io.Closeable for information on avoiding resource leaks."); REPORTER.report(message, allocationSite); }
/** * If CloseGuard is enabled, logs a warning if the caller did not * properly cleanup by calling an explicit close method * before finalization. If CloseGuard is disabled, no action is * performed. */ public void warnIfOpen() { if (allocationSite == null || !ENABLED) { return; } String message = ("A resource was acquired at attached stack trace but never released. " + "See java.io.Closeable for information on avoiding resource leaks."); REPORTER.report(message, allocationSite); }
/** * If CloseGuard is enabled, logs a warning if the caller did not * properly cleanup by calling an explicit close method * before finalization. If CloseGuard is disabled, no action is * performed. */ public void warnIfOpen() { if (allocationSite == null || !ENABLED) { return; } String message = ("A resource was acquired at attached stack trace but never released. " + "See java.io.Closeable for information on avoiding resource leaks."); REPORTER.report(message, allocationSite); }
/** * If CloseGuard is enabled, logs a warning if the caller did not * properly cleanup by calling an explicit close method * before finalization. If CloseGuard is disabled, no action is * performed. */ public void warnIfOpen() { if (allocationSite == null || !ENABLED) { return; } String message = ("A resource was acquired at attached stack trace but never released. " + "See java.io.Closeable for information on avoiding resource leaks."); REPORTER.report(message, allocationSite); }