@Test public void testInitFromLogManager() throws Exception { final LogManager manager = LogManager.getLogManager(); synchronized (manager) { try { initGoodTest(MailHandler.class, new Class<?>[0], new Object[0]); initBadTest(MailHandler.class, new Class<?>[0], new Object[0]); initGoodTest(MailHandler.class, new Class<?>[]{Integer.TYPE}, new Object[]{10}); initBadTest(MailHandler.class, new Class<?>[]{Integer.TYPE}, new Object[]{100}); initGoodTest(MailHandler.class, new Class<?>[]{Properties.class}, new Object[]{new Properties()}); initBadTest(MailHandler.class, new Class<?>[]{Properties.class}, new Object[]{new Properties()}); initGoodTest(MailHandlerExt.class, new Class<?>[0], new Object[0]); initBadTest(MailHandlerExt.class, new Class<?>[0], new Object[0]); initGoodTest(MailHandlerExt.class, new Class<?>[]{Integer.TYPE}, new Object[]{10}); initBadTest(MailHandlerExt.class, new Class<?>[]{Integer.TYPE}, new Object[]{100}); initGoodTest(MailHandlerExt.class, new Class<?>[]{Properties.class}, new Object[]{new Properties()}); initBadTest(MailHandlerExt.class, new Class<?>[]{Properties.class}, new Object[]{new Properties()}); } finally { manager.reset(); } } }
private void reset() { assert Thread.holdsLock(this); if (size < data.length) { Arrays.fill(data, 0, size, null); } else { Arrays.fill(data, null); } this.size = 0; }
MailHandler extends Handler { private void reset() { assert Thread.holdsLock(this); if (size < data.length) { Arrays.fill(data, 0, size, null); } else { Arrays.fill(data, null); } this.size = 0; } }
MailHandler extends Handler { private void reset() { assert Thread.holdsLock(this); if (size < data.length) { Arrays.fill(data, 0, size, null); } else { Arrays.fill(data, null); } this.size = 0; } MailHandler();  MailHandler(final int capacity);  MailHandler(final Properties props); }
MailHandler extends Handler { private void reset() { assert Thread.holdsLock(this); if (size < data.length) { Arrays.fill(data, 0, size, null); } else { Arrays.fill(data, null); } this.size = 0; } 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 { private void reset() { assert Thread.holdsLock(this); if (size < data.length) { Arrays.fill(data, 0, size, null); } else { Arrays.fill(data, null); } this.size = 0; } 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);  }