@Test public void testEscapingErrorErrorManager() throws Exception { try { Class<?> k = ErrorErrorManager.class; ErrorManager f; f = LogManagerProperties.newErrorManager(k.getName()); assertEquals(k, f.getClass()); setPending(new ThreadDeath()); try { f = LogManagerProperties.newErrorManager(k.getName()); fail(String.valueOf(f)); } catch (ThreadDeath expect) { } setPending(new OutOfMemoryError()); try { f = LogManagerProperties.newErrorManager(k.getName()); fail(String.valueOf(f)); } catch (OutOfMemoryError expect) { } } finally { setPending(null); } }
static ErrorManager newErrorManager(String name) throws Exception { return newObjectFrom(name, ErrorManager.class); }
LogManagerProperties extends Properties { static ErrorManager newErrorManager(String name) throws Exception { return newObjectFrom(name, ErrorManager.class); } }
LogManagerProperties extends Properties { static ErrorManager newErrorManager(String name) throws Exception { return newObjectFrom(name, ErrorManager.class); } LogManagerProperties(final Properties parent, final String prefix); }
LogManagerProperties extends Properties { static ErrorManager newErrorManager(String name) throws Exception { return newObjectFrom(name, ErrorManager.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 ErrorManager newErrorManager(String name) throws Exception { return newObjectFrom(name, ErrorManager.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();  }