@Test public void testMailDebugLowCap() throws Exception { MailHandler instance = new MailHandler(1); try { testMailDebug(instance, 2); } finally { instance.close(); } }
public void close() { checkAccess(); final Object ccl = getAndSetContextClassLoader(); try { Message msg = null; synchronized (this) { try { msg = writeLogRecords(ErrorManager.CLOSE_FAILURE); } finally { super.setLevel(Level.OFF); if (this.capacity > 0) { this.capacity = -this.capacity; } if (size == 0 && data.length != 1) { this.data = new LogRecord[1]; } } } if (msg != null) { send(msg, false, ErrorManager.CLOSE_FAILURE); } } finally { setContextClassLoader(ccl); } }
MailHandler extends Handler { public void close() { checkAccess(); final Object ccl = getAndSetContextClassLoader(); try { Message msg = null; synchronized (this) { try { msg = writeLogRecords(ErrorManager.CLOSE_FAILURE); } finally { super.setLevel(Level.OFF); if (this.capacity > 0) { this.capacity = -this.capacity; } if (size == 0 && data.length != 1) { this.data = new LogRecord[1]; } } } if (msg != null) { send(msg, false, ErrorManager.CLOSE_FAILURE); } } finally { setContextClassLoader(ccl); } } }
MailHandler extends Handler { public void close() { checkAccess(); final Object ccl = getAndSetContextClassLoader(); try { Message msg = null; synchronized (this) { try { msg = writeLogRecords(ErrorManager.CLOSE_FAILURE); } finally { super.setLevel(Level.OFF); if (this.capacity > 0) { this.capacity = -this.capacity; } if (size == 0 && data.length != 1) { this.data = new LogRecord[1]; } } } if (msg != null) { send(msg, false, ErrorManager.CLOSE_FAILURE); } } finally { setContextClassLoader(ccl); } } MailHandler();  MailHandler(final int capacity);  MailHandler(final Properties props); }
MailHandler extends Handler { public void close() { checkAccess(); final Object ccl = getAndSetContextClassLoader(); try { Message msg = null; synchronized (this) { try { msg = writeLogRecords(ErrorManager.CLOSE_FAILURE); } finally { super.setLevel(Level.OFF); if (this.capacity > 0) { this.capacity = -this.capacity; } if (size == 0 && data.length != 1) { this.data = new LogRecord[1]; } } } if (msg != null) { send(msg, false, ErrorManager.CLOSE_FAILURE); } } finally { setContextClassLoader(ccl); } } MailHandler();  MailHandler(final int capacity);  MailHandler(final Properties props); @Override boolean isLoggable(final LogRecord record); void publish(final LogRecord record); void push(); void flush(); void close(); @Override synchronized void setLevel(final Level newLevel); final synchronized Level getPushLevel(); final synchronized void setPushLevel(final Level level); final synchronized Filter getPushFilter(); final synchronized void setPushFilter(final Filter filter); final synchronized Comparator<? super LogRecord> getComparator(); final synchronized void setComparator(Comparator<? super LogRecord> c); final synchronized int getCapacity(); final synchronized Authenticator getAuthenticator(); final void setAuthenticator(final Authenticator auth); final void setAuthenticator(final char... password); final void setMailProperties(Properties props); final Properties getMailProperties(); final Filter[] getAttachmentFilters(); final void setAttachmentFilters(Filter... filters); final Formatter[] getAttachmentFormatters(); final void setAttachmentFormatters(Formatter... formatters); final Formatter[] getAttachmentNames(); final void setAttachmentNames(final String... names); final void setAttachmentNames(Formatter... formatters); final synchronized Formatter getSubject(); final void setSubject(final String subject); final void setSubject(final Formatter format); }
MailHandler extends Handler { public void close() { checkAccess(); final Object ccl = getAndSetContextClassLoader(); try { Message msg = null; synchronized (this) { try { msg = writeLogRecords(ErrorManager.CLOSE_FAILURE); } finally { super.setLevel(Level.OFF); if (this.capacity > 0) { this.capacity = -this.capacity; } if (size == 0 && data.length != 1) { this.data = new LogRecord[1]; } } } if (msg != null) { send(msg, false, ErrorManager.CLOSE_FAILURE); } } finally { setContextClassLoader(ccl); } } MailHandler();  MailHandler(final int capacity);  MailHandler(final Properties props); @Override boolean isLoggable(final LogRecord record); void publish(final LogRecord record); void push(); void flush(); void close(); @Override synchronized void setLevel(final Level newLevel); final synchronized Level getPushLevel(); final synchronized void setPushLevel(final Level level); final synchronized Filter getPushFilter(); final synchronized void setPushFilter(final Filter filter); final synchronized Comparator<? super LogRecord> getComparator(); final synchronized void setComparator(Comparator<? super LogRecord> c); final synchronized int getCapacity(); final synchronized Authenticator getAuthenticator(); final void setAuthenticator(final Authenticator auth); final void setAuthenticator(final char... password); final void setMailProperties(Properties props); final Properties getMailProperties(); final Filter[] getAttachmentFilters(); final void setAttachmentFilters(Filter... filters); final Formatter[] getAttachmentFormatters(); final void setAttachmentFormatters(Formatter... formatters); final Formatter[] getAttachmentNames(); final void setAttachmentNames(final String... names); final void setAttachmentNames(Formatter... formatters); final synchronized Formatter getSubject(); final void setSubject(final String subject); final void setSubject(final Formatter format);  }