RFR: 8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
Xueming Shen
xueming.shen at oracle.com
Wed Sep 11 17:30:00 UTC 2013
Hi,
The background of this bug is the anti-pattern of defining constants in interfaces. In this case all the
constants defined in package private interface ZipConstants are being exposed as public fields of the
classes that implements it. This is JDK 1.0 era design/implementation, something we can't reverse any
more for compatibility concern. However it appears reasonable to not further add more new constants
into this interface class while it might be a logical place for them. The proposed change here is to move
these constants (all added in jdk8) to ZipConstants64.java, with comment add for why they are there,
so these constants will be kept as an implementation details.
http://cr.openjdk.java.net/~sherman/8024338/webrev
Thanks,
-Sherman
More information about the core-libs-dev
mailing list