Skip to content

Commit 7d5053d

Browse files
committed
Merge tag 'jdk-17.0.17+9' into v0.56.0-release
Signed-off-by: Peter Shipton <[email protected]>
2 parents 827d95d + 1251dfa commit 7d5053d

File tree

9 files changed

+40
-76
lines changed

9 files changed

+40
-76
lines changed

make/data/currency/CurrencyData.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ formatVersion=3
3232
# Version of the currency code information in this class.
3333
# It is a serial number that accompanies with each amendment.
3434

35-
dataVersion=179
35+
dataVersion=180
3636

3737
# List of all valid ISO 4217 currency codes.
3838
# To ensure compatibility, do not remove codes.
@@ -147,7 +147,7 @@ IO=USD
147147
# BRUNEI DARUSSALAM
148148
BN=BND
149149
# BULGARIA
150-
BG=BGN
150+
BG=BGN;2025-12-31-22-00-00;EUR
151151
# BURKINA FASO
152152
BF=XOF
153153
# BURUNDI
@@ -193,7 +193,7 @@ HR=EUR
193193
# CUBA
194194
CU=CUP
195195
# Cura\u00e7ao
196-
CW=ANG;2025-04-01-04-00-00;XCG
196+
CW=XCG
197197
# CYPRUS
198198
CY=EUR
199199
# CZECHIA
@@ -510,7 +510,7 @@ SR=SRD
510510
# SVALBARD AND JAN MAYEN
511511
SJ=NOK
512512
# Sint Maarten (Dutch part)
513-
SX=ANG;2025-04-01-04-00-00;XCG
513+
SX=XCG
514514
# ESWATINI
515515
SZ=SZL
516516
# SWEDEN

src/java.desktop/share/classes/com/sun/java/swing/SwingUtilities3.java

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ public class SwingUtilities3 {
6666
private static final Object DELEGATE_REPAINT_MANAGER_KEY =
6767
new StringBuilder("DelegateRepaintManagerKey");
6868

69-
private static Color disabledForeground;
70-
private static Color acceleratorSelectionForeground;
71-
private static Color acceleratorForeground;
72-
7369
/**
7470
* Registers delegate RepaintManager for {@code JComponent}.
7571
*/
@@ -179,7 +175,10 @@ public static void paintIcon(Graphics g, MenuItemLayoutHelper lh,
179175

180176

181177
public static void paintAccText(Graphics g, MenuItemLayoutHelper lh,
182-
MenuItemLayoutHelper.LayoutResult lr) {
178+
MenuItemLayoutHelper.LayoutResult lr,
179+
Color disabledForeground,
180+
Color acceleratorSelectionForeground,
181+
Color acceleratorForeground) {
183182
if (!lh.getAccText().isEmpty()) {
184183
ButtonModel model = lh.getMenuItem().getModel();
185184
g.setFont(lh.getAccFontMetrics().getFont());
@@ -218,18 +217,6 @@ public static void paintAccText(Graphics g, MenuItemLayoutHelper lh,
218217
}
219218
}
220219

221-
public static void setDisabledForeground(Color disabledFg) {
222-
disabledForeground = disabledFg;
223-
}
224-
225-
public static void setAcceleratorSelectionForeground(Color acceleratorSelectionFg) {
226-
acceleratorSelectionForeground = acceleratorSelectionFg;
227-
}
228-
229-
public static void setAcceleratorForeground(Color acceleratorFg) {
230-
acceleratorForeground = acceleratorFg;
231-
}
232-
233220
public static void paintArrowIcon(Graphics g, MenuItemLayoutHelper lh,
234221
MenuItemLayoutHelper.LayoutResult lr,
235222
Color foreground) {

src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -715,11 +715,10 @@ private void paintCheckIcon(Graphics g, MenuItemLayoutHelper lh,
715715

716716
private void paintAccText(Graphics g, MenuItemLayoutHelper lh,
717717
MenuItemLayoutHelper.LayoutResult lr) {
718-
SwingUtilities3.setDisabledForeground(disabledForeground);
719-
SwingUtilities3.setAcceleratorSelectionForeground(
720-
acceleratorSelectionForeground);
721-
SwingUtilities3.setAcceleratorForeground(acceleratorForeground);
722-
SwingUtilities3.paintAccText(g, lh, lr);
718+
SwingUtilities3.paintAccText(g, lh, lr,
719+
disabledForeground,
720+
acceleratorSelectionForeground,
721+
acceleratorForeground);
723722
}
724723

725724
private void paintText(Graphics g, MenuItemLayoutHelper lh,

src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsCheckBoxMenuItemUI.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ protected void paintMenuItem(Graphics g, JComponent c,
8282
int defaultTextIconGap) {
8383
if (WindowsMenuItemUI.isVistaPainting()) {
8484
WindowsMenuItemUI.paintMenuItem(accessor, g, c, checkIcon,
85-
arrowIcon, background, foreground, defaultTextIconGap,
85+
arrowIcon, background, foreground,
86+
disabledForeground, acceleratorSelectionForeground,
87+
acceleratorForeground, defaultTextIconGap,
8688
menuItem, getPropertyPrefix());
8789
return;
8890
}

src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuItemUI.java

Lines changed: 12 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ public class WindowsMenuItemUI extends BasicMenuItemUI {
6666
* The instance of {@code PropertyChangeListener}.
6767
*/
6868
private PropertyChangeListener changeListener;
69-
private static Color disabledForeground;
70-
private static Color acceleratorSelectionForeground;
71-
private static Color acceleratorForeground;
7269

7370
final WindowsMenuItemUIAccessor accessor =
7471
new WindowsMenuItemUIAccessor() {
@@ -164,44 +161,15 @@ protected void uninstallListeners() {
164161
changeListener = null;
165162
}
166163

167-
private static void applyInsets(Rectangle rect, Insets insets) {
168-
SwingUtilities3.applyInsets(rect, insets);
169-
}
170-
171-
private static void paintCheckIcon(Graphics g, MenuItemLayoutHelper lh,
172-
MenuItemLayoutHelper.LayoutResult lr,
173-
Color holdc, Color foreground) {
174-
SwingUtilities3.paintCheckIcon(g, lh, lr, holdc, foreground);
175-
}
176-
177-
private static void paintIcon(Graphics g, MenuItemLayoutHelper lh,
178-
MenuItemLayoutHelper.LayoutResult lr, Color holdc) {
179-
SwingUtilities3.paintIcon(g, lh, lr, holdc);
180-
}
181-
182-
private static void paintAccText(Graphics g, MenuItemLayoutHelper lh,
183-
MenuItemLayoutHelper.LayoutResult lr) {
184-
SwingUtilities3.setDisabledForeground(disabledForeground);
185-
SwingUtilities3.setAcceleratorSelectionForeground(
186-
acceleratorSelectionForeground);
187-
SwingUtilities3.setAcceleratorForeground(acceleratorForeground);
188-
SwingUtilities3.paintAccText(g, lh, lr);
189-
}
190-
191-
private static void paintArrowIcon(Graphics g, MenuItemLayoutHelper lh,
192-
MenuItemLayoutHelper.LayoutResult lr,
193-
Color foreground) {
194-
SwingUtilities3.paintArrowIcon(g, lh, lr, foreground);
195-
}
196-
197164
protected void paintMenuItem(Graphics g, JComponent c,
198165
Icon checkIcon, Icon arrowIcon,
199166
Color background, Color foreground,
200167
int defaultTextIconGap) {
201168
if (WindowsMenuItemUI.isVistaPainting()) {
202169
WindowsMenuItemUI.paintMenuItem(accessor, g, c, checkIcon,
203170
arrowIcon, background, foreground,
204-
defaultTextIconGap, menuItem,
171+
disabledForeground, acceleratorSelectionForeground,
172+
acceleratorForeground, defaultTextIconGap, menuItem,
205173
getPropertyPrefix());
206174
return;
207175
}
@@ -212,6 +180,9 @@ protected void paintMenuItem(Graphics g, JComponent c,
212180
static void paintMenuItem(WindowsMenuItemUIAccessor accessor, Graphics g,
213181
JComponent c, Icon checkIcon, Icon arrowIcon,
214182
Color background, Color foreground,
183+
Color disabledForeground,
184+
Color acceleratorSelectionForeground,
185+
Color acceleratorForeground,
215186
int defaultTextIconGap, JMenuItem menuItem, String prefix) {
216187
// Save original graphics font and color
217188
Font holdf = g.getFont();
@@ -221,7 +192,7 @@ static void paintMenuItem(WindowsMenuItemUIAccessor accessor, Graphics g,
221192
g.setFont(mi.getFont());
222193

223194
Rectangle viewRect = new Rectangle(0, 0, mi.getWidth(), mi.getHeight());
224-
applyInsets(viewRect, mi.getInsets());
195+
SwingUtilities3.applyInsets(viewRect, mi.getInsets());
225196

226197
String acceleratorDelimiter =
227198
UIManager.getString("MenuItem.acceleratorDelimiter");
@@ -239,8 +210,8 @@ static void paintMenuItem(WindowsMenuItemUIAccessor accessor, Graphics g,
239210
MenuItemLayoutHelper.LayoutResult lr = lh.layoutMenuItem();
240211

241212
paintBackground(accessor, g, mi, background);
242-
paintCheckIcon(g, lh, lr, holdc, foreground);
243-
paintIcon(g, lh, lr, holdc);
213+
SwingUtilities3.paintCheckIcon(g, lh, lr, holdc, foreground);
214+
SwingUtilities3.paintIcon(g, lh, lr, holdc);
244215

245216
if (lh.getCheckIcon() != null && lh.useCheckAndArrow()) {
246217
Rectangle rect = lr.getTextRect();
@@ -264,8 +235,10 @@ static void paintMenuItem(WindowsMenuItemUIAccessor accessor, Graphics g,
264235
rect.x += lh.getAfterCheckIconGap();
265236
lr.setAccRect(rect);
266237
}
267-
paintAccText(g, lh, lr);
268-
paintArrowIcon(g, lh, lr, foreground);
238+
SwingUtilities3.paintAccText(g, lh, lr, disabledForeground,
239+
acceleratorSelectionForeground,
240+
acceleratorForeground);
241+
SwingUtilities3.paintArrowIcon(g, lh, lr, foreground);
269242

270243
// Restore original graphics font and color
271244
g.setColor(holdc);

src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuUI.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ protected void paintMenuItem(Graphics g, JComponent c,
137137
if (WindowsMenuItemUI.isVistaPainting()) {
138138
WindowsMenuItemUI.paintMenuItem(accessor, g, c, checkIcon, arrowIcon,
139139
background, foreground,
140-
defaultTextIconGap, menuItem,
140+
disabledForeground, acceleratorSelectionForeground,
141+
acceleratorForeground, defaultTextIconGap, menuItem,
141142
getPropertyPrefix());
142143
return;
143144
}

src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsRadioButtonMenuItemUI.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ protected void paintMenuItem(Graphics g, JComponent c,
8282
int defaultTextIconGap) {
8383
if (WindowsMenuItemUI.isVistaPainting()) {
8484
WindowsMenuItemUI.paintMenuItem(accessor, g, c, checkIcon,
85-
arrowIcon, background, foreground, defaultTextIconGap,
85+
arrowIcon, background, foreground,
86+
disabledForeground, acceleratorSelectionForeground,
87+
acceleratorForeground, defaultTextIconGap,
8688
menuItem, getPropertyPrefix());
8789
return;
8890
}

test/jdk/java/util/Currency/ISO4217-list-one.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#
22
#
3-
# Amendments up until ISO 4217 AMENDMENT NUMBER 179
4-
# (As of 02 May 2025)
3+
# Amendments up until ISO 4217 AMENDMENT NUMBER 180
4+
# (As of 22 September 2025)
55
#
66

77
# Version
88
FILEVERSION=3
9-
DATAVERSION=179
9+
DATAVERSION=180
1010

1111
# ISO 4217 currency data
1212
AF AFN 971 2
@@ -44,7 +44,7 @@ BV NOK 578 2
4444
BR BRL 986 2
4545
IO USD 840 2
4646
BN BND 96 2
47-
BG BGN 975 2
47+
BG BGN 975 2 2025-12-31-22-00-00 EUR 978 2
4848
BF XOF 952 0
4949
BI BIF 108 0
5050
KH KHR 116 2
@@ -69,7 +69,7 @@ CR CRC 188 2
6969
CI XOF 952 0
7070
HR EUR 978 2
7171
CU CUP 192 2
72-
CW ANG 532 2 2025-04-01-04-00-00 XCG 532 2
72+
CW XCG 532 2
7373
CY EUR 978 2
7474
CZ CZK 203 2
7575
DK DKK 208 2
@@ -233,7 +233,7 @@ LK LKR 144 2
233233
SD SDG 938 2
234234
SR SRD 968 2
235235
SJ NOK 578 2
236-
SX ANG 532 2 2025-04-01-04-00-00 XCG 532 2
236+
SX XCG 532 2
237237
SZ SZL 748 2
238238
SE SEK 752 2
239239
CH CHF 756 2

test/jdk/java/util/Currency/ValidateISO4217.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* @bug 4691089 4819436 4942982 5104960 6544471 6627549 7066203 7195759
2727
* 8039317 8074350 8074351 8145952 8187946 8193552 8202026 8204269
2828
* 8208746 8209775 8264792 8274658 8283277 8296239 8321480 8334653
29-
* 8356096
29+
* 8356096 8368308
3030
* @summary Validate ISO 4217 data for Currency class.
3131
* @modules java.base/java.util:open
3232
* jdk.localedata
@@ -87,7 +87,7 @@ public class ValidateISO4217 {
8787
private static final Set<Currency> testCurrencies = new HashSet<>();
8888
// Codes that are obsolete, do not have related country, extra currency
8989
private static final String otherCodes =
90-
"ADP-AFA-ATS-AYM-AZM-BEF-BGL-BOV-BYB-BYR-CHE-CHW-CLF-COU-CUC-CYP-"
90+
"ADP-AFA-ATS-AYM-AZM-BEF-BGL-BGN-BOV-BYB-BYR-CHE-CHW-CLF-COU-CUC-CYP-"
9191
+ "DEM-EEK-ESP-FIM-FRF-GHC-GRD-GWP-HRK-IEP-ITL-LTL-LUF-LVL-MGF-MRO-MTL-MXV-MZM-NLG-"
9292
+ "PTE-ROL-RUR-SDD-SIT-SLL-SKK-SRG-STD-TMM-TPE-TRL-VEF-UYI-USN-USS-VEB-VED-"
9393
+ "XAD-XAG-XAU-XBA-XBB-XBC-XBD-XDR-XFO-XFU-XPD-XPT-XSU-XTS-XUA-XXX-"

0 commit comments

Comments
 (0)