提交 32946cd9 编写于 作者: A alanb

7192274: Deprecate LogManager addPropertyChangeListener and removePropertyChangeLister methods

Reviewed-by: mchung, lancea, chegar
上级 29a9f236
...@@ -311,7 +311,14 @@ public class LogManager { ...@@ -311,7 +311,14 @@ public class LogManager {
* @exception SecurityException if a security manager exists and if * @exception SecurityException if a security manager exists and if
* the caller does not have LoggingPermission("control"). * the caller does not have LoggingPermission("control").
* @exception NullPointerException if the PropertyChangeListener is null. * @exception NullPointerException if the PropertyChangeListener is null.
* @deprecated The dependency on {@code PropertyChangeListener} creates a
* significant impediment to future modularization of the Java
* platform. This method will be removed in a future release.
* The global {@code LogManager} can detect changes to the
* logging configuration by overridding the {@link
* #readConfiguration readConfiguration} method.
*/ */
@Deprecated
public void addPropertyChangeListener(PropertyChangeListener l) throws SecurityException { public void addPropertyChangeListener(PropertyChangeListener l) throws SecurityException {
PropertyChangeListener listener = Objects.requireNonNull(l); PropertyChangeListener listener = Objects.requireNonNull(l);
checkAccess(); checkAccess();
...@@ -336,7 +343,14 @@ public class LogManager { ...@@ -336,7 +343,14 @@ public class LogManager {
* @param l event listener (can be null) * @param l event listener (can be null)
* @exception SecurityException if a security manager exists and if * @exception SecurityException if a security manager exists and if
* the caller does not have LoggingPermission("control"). * the caller does not have LoggingPermission("control").
* @deprecated The dependency on {@code PropertyChangeListener} creates a
* significant impediment to future modularization of the Java
* platform. This method will be removed in a future release.
* The global {@code LogManager} can detect changes to the
* logging configuration by overridding the {@link
* #readConfiguration readConfiguration} method.
*/ */
@Deprecated
public void removePropertyChangeListener(PropertyChangeListener l) throws SecurityException { public void removePropertyChangeListener(PropertyChangeListener l) throws SecurityException {
checkAccess(); checkAccess();
if (l != null) { if (l != null) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册