java-almanac icon indicating copy to clipboard operation
java-almanac copied to clipboard

Only compare packages exported by modules

Open AlanBateman opened this issue 2 years ago • 3 comments

Looking at this page: https://javaalmanac.io/jdk/22/apidiff/21/

where it shows a new method added to java.awt.peer.WindowPeer. This is confusing to see because this is an internal class, the java.awt.peer package is not an exported/documented/supported interface. The diff tool shouldn't be looking at APIs in non-exported packages.

AlanBateman avatar Oct 02 '23 06:10 AlanBateman

You're right. Currently I simply filter by package name. It's on my todo list since quite some time to consider the exports in module-info.class.

marchof avatar Oct 02 '23 08:10 marchof

I run a prototype: java.awt.peer is the only instance where a java.* package is not exported in the JDK.

marchof avatar Oct 04 '23 06:10 marchof

I run a prototype: java.awt.peer is the only instance where a java.* package is not exported in the JDK.

That's right, the peers were developed in this package a long time ago but never part of the documented/supported API. When the platform moved to modules in Java 9, the java.awt.peer package was not exported.

AlanBateman avatar Oct 04 '23 07:10 AlanBateman