On Fri, 31 Mar 2023 07:34:50 GMT, Daniel Jeliński <djelin...@openjdk.org> wrote:

> Please review this patch that removes a number of unused exports from 
> java.desktop native libraries.
> 
> In most cases I removed JNIEXPORT from methods and variables that are only 
> used within a single shared library. Other than that:
> - removed `getSunFontIDs` that was reportedly used by rasterizer; as far as I 
> could tell, rasterizer project is dead now, but if that's incorrect I can 
> restore that export.
> - removed `colorValueID` in X11Color; that field was not used.
> - removed `J2dTraceInit` from header file. That method is only used 
> internally by `J2dTraceImpl`.
> 
> The methods `Transform_GetInfo` and `Transform_transform` are declared in 
> GraphicsPrimitiveMgr, but are only used in TransformHelper. Let me know if I 
> should move them to where they are used.
> 
> The method `img_makePalette`, currently located in 
> `share/native/libawt/awt/image/cvutils/img_colors.c`, is only used by 
> `unix/native/common/awt/X11Color.c`; it could be moved to the same directory 
> to avoid exporting the method from libawt. The files `img_colors.[ch]` do not 
> have any references to other files in `cvutils`.
> 
> Manually verified that the exports are no longer present after these changes. 
> Tier1-3 and client libs tests still pass.

This pull request has now been integrated.

Changeset: 723db2dc
Author:    Daniel Jeliński <djelin...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/723db2dc8651efb9e5da7754cbefb80f4171a367
Stats:     55 lines in 17 files changed: 3 ins; 21 del; 31 mod

8305321: Remove unused exports in java.desktop

Reviewed-by: aivanov, prr

-------------

PR: https://git.openjdk.org/jdk/pull/13261

Reply via email to