On Tue, 22 Sep 2026 12:25:42 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

> `Win32PrintService.Win32ServiceUIFactory.getUIClassNamesForRole()` 
> incorrectly creates a zero-length String array when handling 
> `DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE`, then writes the Document 
> Properties UI class name at index zero, so as
> a result, calling 
> `Win32PrintService.getServiceUIFactory().getUIClassNamesForRole(DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE)`
> throws `ArrayIndexOutOfBoundsException `instead of reporting the supported UI 
> class.
> 
> The fix returns a single-element array containing 
> `DocumentPropertiesUI.DOCPROPERTIESCLASSNAME`
> 
> 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has now been integrated.

Changeset: c1565def
Author:    Prasanta Sadhukhan <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/c1565def6c3d6c6b4700b0d0b863a90f1ca7e61a
Stats:     54 lines in 2 files changed: 50 ins; 2 del; 2 mod

8392783: Win32PrintService.getUIClassNamesForRole throws 
ArrayIndexOutOfBoundsException

Reviewed-by: prr, serb

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

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

Reply via email to