@Test public void testEscapingAuthenticator() throws Exception { try { Class<?> k = ErrorAuthenticator.class; javax.mail.Authenticator a; a = LogManagerProperties.newAuthenticator(k.getName()); assertEquals(k, a.getClass()); setPending(new ThreadDeath()); try { a = LogManagerProperties.newAuthenticator(k.getName()); fail(String.valueOf(a)); } catch (ThreadDeath expect) { } setPending(new OutOfMemoryError()); try { a = LogManagerProperties.newAuthenticator(k.getName()); fail(String.valueOf(a)); } catch (OutOfMemoryError expect) { } } finally { setPending(null); } }
static Authenticator newAuthenticator(String name) throws Exception { return newObjectFrom(name, Authenticator.class); }
LogManagerProperties extends Properties { static Authenticator newAuthenticator(String name) throws Exception { return newObjectFrom(name, Authenticator.class); } }
LogManagerProperties extends Properties { static Authenticator newAuthenticator(String name) throws Exception { return newObjectFrom(name, Authenticator.class); } LogManagerProperties(final Properties parent, final String prefix); }
LogManagerProperties extends Properties { static Authenticator newAuthenticator(String name) throws Exception { return newObjectFrom(name, Authenticator.class); } LogManagerProperties(final Properties parent, final String prefix); @Override @SuppressWarnings("CloneDoesntCallSuperClone") synchronized Object clone(); @Override synchronized String getProperty(final String key); @Override String getProperty(final String key, final String def); @Override Object get(final Object key); @Override synchronized Object put(final Object key, final Object value); @Override Object setProperty(String key, String value); @Override boolean containsKey(final Object key); @Override synchronized Object remove(final Object key); @Override Enumeration<?> propertyNames(); @Override boolean equals(final Object o); @Override int hashCode(); }
LogManagerProperties extends Properties { static Authenticator newAuthenticator(String name) throws Exception { return newObjectFrom(name, Authenticator.class); } LogManagerProperties(final Properties parent, final String prefix); @Override @SuppressWarnings("CloneDoesntCallSuperClone") synchronized Object clone(); @Override synchronized String getProperty(final String key); @Override String getProperty(final String key, final String def); @Override Object get(final Object key); @Override synchronized Object put(final Object key, final Object value); @Override Object setProperty(String key, String value); @Override boolean containsKey(final Object key); @Override synchronized Object remove(final Object key); @Override Enumeration<?> propertyNames(); @Override boolean equals(final Object o); @Override int hashCode();  }