Merge GNU Classpath 0.99 into libjava.

From-SVN: r185741
This commit is contained in:
Andrew John Hughes 2012-03-23 15:19:26 +00:00
parent 21669dfe20
commit 0563022a20
516 changed files with 64503 additions and 61116 deletions

View file

@ -211,11 +211,21 @@ public class LogManager
/**
* Registers a listener which will be notified when the
* logging properties are re-read.
*
* @param listener the event listener to register.
* @throws NullPointerException if the listener is {@code null}.
* @throws SecurityException if a security manager exists and the
* calling code does not have the permission
* {@code LoggingPermission("control")}.
*/
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
{
/* do not register null. */
listener.getClass();
if (listener == null)
throw new NullPointerException("Attempt to add null property change listener");
SecurityManager sm = System.getSecurityManager();
if (sm != null)
sm.checkPermission(new LoggingPermission("control", null));
pcs.addPropertyChangeListener(listener);
}
@ -226,11 +236,22 @@ public class LogManager
* If <code>listener</code> has not been registered previously,
* nothing happens. Also, no exception is thrown if
* <code>listener</code> is <code>null</code>.
*
* @param listener the listener to remove.
* @throws SecurityException if a security manager exists and the
* calling code does not have the permission
* {@code LoggingPermission("control")}.
*/
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
{
if (listener != null)
pcs.removePropertyChangeListener(listener);
{
SecurityManager sm = System.getSecurityManager();
if (sm != null)
sm.checkPermission(new LoggingPermission("control", null));
pcs.removePropertyChangeListener(listener);
}
}
/**