7192274: Deprecate LogManager addPropertyChangeListener and removePropertyChangeListe

Alan Bateman Alan.Bateman at oracle.com
Wed Oct 10 11:19:03 UTC 2012


JEP 162 [1] captures a number of things that we can do in preparation 
for future modularization of the platform. One of these items is 
deprecating the Java SE APIs that are problematic for our modularization 
efforts. Thankfully the list is very short as this is deprecation is in 
anticipation of really removing the APIs when a module system comes along.

The patch proposed here is the first installation to deprecate the 
LogManager addPropertyChangeListener and removePropertyChangeListener 
methods. These methods are problematic because of the API dependency on 
java.beans.PropertyChangeListener (java.beans is toxic because of types 
in that package that are tied to Applet, AWT, and Swing). When we 
eventually get to remove these methods then we expect the impact will 
not be too significant. Mandy Chung has done a static analysis over 
20,000 projects to locate usages of these methods and found only 3 so we 
have some useful evidence to demonstrate that they aren't used very 
often. For now we are just proposing to deprecate the methods and the 
proposed patch is here:

http://cr.openjdk.java.net/~alanb/7192274/webrev/jdk.patch

Thanks,
Alan.

[1] http://openjdk.java.net/jeps/162



More information about the core-libs-dev mailing list