Skip to content

Commit a3ad007

Browse files
authored
Merge branch 'openjdk:master' into backport-mrserb-4abb5e4a-master
2 parents ba79b13 + 652f7a7 commit a3ad007

File tree

48 files changed

+2417
-648
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2417
-648
lines changed

THIRD_PARTY_README

Lines changed: 94 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,31 +1725,108 @@ THE SOFTWARE.
17251725

17261726
-------------------------------------------------------------------------------
17271727

1728-
%% This notice is provided with respect to Little CMS 2.12, which may be
1728+
%% This notice is provided with respect to Little CMS 2.14, which may be
17291729
included with JRE 8, JDK 8, and OpenJDK 8.
17301730

17311731
--- begin of LICENSE ---
17321732

1733+
README.1ST file information
1734+
1735+
LittleCMS core is released under MIT License
1736+
1737+
---------------------------------
1738+
17331739
Little CMS
1734-
Copyright (c) 1998-2020 Marti Maria Saguer
1740+
Copyright (c) 1998-2022 Marti Maria Saguer
17351741

1736-
Permission is hereby granted, free of charge, to any person obtaining a copy
1737-
of this software and associated documentation files (the "Software"), to deal
1738-
in the Software without restriction, including without limitation the rights
1739-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1740-
copies of the Software, and to permit persons to whom the Software is
1741-
furnished to do so, subject to the following conditions:
1742+
Permission is hereby granted, free of charge, to any person obtaining
1743+
a copy of this software and associated documentation files (the
1744+
"Software"), to deal in the Software without restriction, including
1745+
without limitation the rights to use, copy, modify, merge, publish,
1746+
distribute, sublicense, and/or sell copies of the Software, and to
1747+
permit persons to whom the Software is furnished to do so, subject
1748+
to the following conditions:
1749+
1750+
The above copyright notice and this permission notice shall be
1751+
included in all copies or substantial portions of the Software.
1752+
1753+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1754+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1755+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1756+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
1757+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
1758+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
1759+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17421760

1743-
The above copyright notice and this permission notice shall be included in all
1744-
copies or substantial portions of the Software.
1761+
---------------------------------
1762+
1763+
The below license applies to the following files:
1764+
liblcms/cmssm.c
1765+
1766+
Copyright 2001, softSurfer (www.softsurfer.com)
1767+
1768+
This code may be freely used and modified for any purpose
1769+
providing that this copyright notice is included with it.
1770+
SoftSurfer makes no warranty for this code, and cannot be held
1771+
liable for any real or imagined damage resulting from its use.
1772+
Users of this code must verify correctness for their application.
1773+
1774+
1775+
AUTHORS File Information:
1776+
1777+
Main Author
1778+
------------
1779+
Marti Maria
1780+
1781+
1782+
Contributors
1783+
------------
1784+
Bob Friesenhahn
1785+
Kai-Uwe Behrmann
1786+
Stuart Nixon
1787+
Jordi Vilar
1788+
Richard Hughes
1789+
Auke Nauta
1790+
Chris Evans (Google)
1791+
Lorenzo Ridolfi
1792+
Robin Watts (Artifex)
1793+
Shawn Pedersen
1794+
Andrew Brygin
1795+
Samuli Suominen
1796+
Florian Hˆch
1797+
Aurelien Jarno
1798+
Claudiu Cebuc
1799+
Michael Vhrel (Artifex)
1800+
Michal Cihar
1801+
Daniel Kaneider
1802+
Mateusz Jurczyk (Google)
1803+
Paul Miller
1804+
SÈbastien LÈon
1805+
Christian Schmitz
1806+
XhmikosR
1807+
Stanislav Brabec (SuSe)
1808+
Leonhard Gruenschloss (Google)
1809+
Patrick Noffke
1810+
Christopher James Halse Rogers
1811+
John Hein
1812+
Thomas Weber (Debian)
1813+
Mark Allen
1814+
Noel Carboni
1815+
Sergei Trofimovic
1816+
Philipp Knechtges
1817+
1818+
Special Thanks
1819+
--------------
1820+
Artifex software
1821+
AlienSkin software
1822+
Jan Morovic
1823+
Jos Vernon (WebSupergoo)
1824+
Harald Schneider (Maxon)
1825+
Christian Albrecht
1826+
Dimitrios Anastassakis
1827+
Lemke Software
1828+
Tim Zaman
17451829

1746-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1747-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1748-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1749-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1750-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1751-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1752-
SOFTWARE.
17531830

17541831
--- end of LICENSE ---
17551832

hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,7 +1707,7 @@ class StubGenerator: public StubCodeGenerator {
17071707

17081708

17091709
// Helper for generating a dynamic type check.
1710-
// Smashes rscratch1.
1710+
// Smashes rscratch1, rscratch2.
17111711
void generate_type_check(Register sub_klass,
17121712
Register super_check_offset,
17131713
Register super_klass,
@@ -2137,6 +2137,10 @@ class StubGenerator: public StubCodeGenerator {
21372137
const Register dst_pos = c_rarg3; // destination position
21382138
const Register length = c_rarg4;
21392139

2140+
2141+
// Registers used as temps
2142+
const Register dst_klass = c_rarg5;
2143+
21402144
__ align(CodeEntryAlignment);
21412145

21422146
StubCodeMark mark(this, "StubRoutines", name);
@@ -2342,8 +2346,7 @@ class StubGenerator: public StubCodeGenerator {
23422346
arraycopy_range_checks(src, src_pos, dst, dst_pos, scratch_length,
23432347
r18, L_failed);
23442348

2345-
const Register rscratch2_dst_klass = rscratch2;
2346-
__ load_klass(rscratch2_dst_klass, dst); // reload
2349+
__ load_klass(dst_klass, dst); // reload
23472350

23482351
// Marshal the base address arguments now, freeing registers.
23492352
__ lea(from, Address(src, src_pos, Address::lsl(LogBytesPerHeapOop)));
@@ -2353,24 +2356,25 @@ class StubGenerator: public StubCodeGenerator {
23532356
__ movw(count, length); // length (reloaded)
23542357
Register sco_temp = c_rarg3; // this register is free now
23552358
assert_different_registers(from, to, count, sco_temp,
2356-
rscratch2_dst_klass, scratch_src_klass);
2359+
dst_klass, scratch_src_klass);
23572360
// assert_clean_int(count, sco_temp);
23582361

23592362
// Generate the type check.
23602363
const int sco_offset = in_bytes(Klass::super_check_offset_offset());
2361-
__ ldrw(sco_temp, Address(rscratch2_dst_klass, sco_offset));
2362-
// assert_clean_int(sco_temp, r18);
2363-
generate_type_check(scratch_src_klass, sco_temp, rscratch2_dst_klass, L_plain_copy);
2364+
__ ldrw(sco_temp, Address(dst_klass, sco_offset));
2365+
2366+
// Smashes rscratch1, rscratch2
2367+
generate_type_check(scratch_src_klass, sco_temp, dst_klass, L_plain_copy);
23642368

23652369
// Fetch destination element klass from the ObjArrayKlass header.
23662370
int ek_offset = in_bytes(ObjArrayKlass::element_klass_offset());
2367-
__ ldr(rscratch2_dst_klass, Address(rscratch2_dst_klass, ek_offset));
2368-
__ ldrw(sco_temp, Address(rscratch2_dst_klass, sco_offset));
2371+
__ ldr(dst_klass, Address(dst_klass, ek_offset));
2372+
__ ldrw(sco_temp, Address(dst_klass, sco_offset));
23692373

23702374
// the checkcast_copy loop needs two extra arguments:
23712375
assert(c_rarg3 == sco_temp, "#3 already in place");
23722376
// Set up arguments for checkcast_copy_entry.
2373-
__ mov(c_rarg4, rscratch2_dst_klass); // dst.klass.element_klass
2377+
__ mov(c_rarg4, dst_klass); // dst.klass.element_klass
23742378
__ b(RuntimeAddress(checkcast_copy_entry));
23752379
}
23762380

hotspot/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -34,13 +34,17 @@
3434
class LineBuffer: public StackObj {
3535

3636
private:
37-
static const int BUFFER_LEN = 1024;
37+
static const int BUFFER_LEN = 1024*3;
3838
static const int INDENT_CHARS = 3;
3939
char _buffer[BUFFER_LEN];
4040
int _indent_level;
4141
int _cur;
4242

4343
void vappend(const char* format, va_list ap) ATTRIBUTE_PRINTF(2, 0) {
44+
if (_cur >= BUFFER_LEN) {
45+
DEBUG_ONLY(warning("previous LineBuffer overflow, request ignored");)
46+
return;
47+
}
4448
int res = os::vsnprintf(&_buffer[_cur], BUFFER_LEN - _cur, format, ap);
4549
if (res > BUFFER_LEN) {
4650
DEBUG_ONLY(warning("buffer too small in LineBuffer");)

hotspot/test/compiler/unsafe/TestMisalignedUnsafeAccess.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
2+
* Copyright (C) 2020, Tencent. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

jdk/make/lib/SecurityLibraries.gmk

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2GSS, \
107107
$(call SET_SHARED_LIBRARY_ORIGIN), \
108108
LDFLAGS_SUFFIX := $(LIBDL), \
109109
LDFLAGS_SUFFIX_solaris := -lc, \
110+
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
111+
RC_FLAGS := $(RC_FLAGS) \
112+
-D "JDK_FNAME=j2gss.dll" \
113+
-D "JDK_INTERNAL_NAME=j2gss" \
114+
-D "JDK_FTYPE=0x2L", \
110115
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2gss, \
111116
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
112117

@@ -124,6 +129,11 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
124129
LDFLAGS := $(LDFLAGS_JDKLIB) \
125130
$(call SET_SHARED_LIBRARY_ORIGIN), \
126131
LDFLAGS_SUFFIX := $(LIBDL), \
132+
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
133+
RC_FLAGS := $(RC_FLAGS) \
134+
-D "JDK_FNAME=sspi_bridge.dll" \
135+
-D "JDK_INTERNAL_NAME=sspi_bridge" \
136+
-D "JDK_FTYPE=0x2L", \
127137
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsspi_bridge, \
128138
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
129139

jdk/src/share/classes/javax/swing/LayoutFocusTraversalPolicy.java

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -26,9 +26,9 @@
2626

2727
import java.awt.Component;
2828
import java.awt.Container;
29-
import java.awt.ComponentOrientation;
3029
import java.util.Comparator;
3130
import java.io.*;
31+
import java.util.Enumeration;
3232
import sun.awt.SunToolkit;
3333

3434

@@ -235,6 +235,30 @@ protected boolean accept(Component aComponent) {
235235
JComboBox box = (JComboBox)aComponent;
236236
return box.getUI().isFocusTraversable(box);
237237
} else if (aComponent instanceof JComponent) {
238+
if (SunToolkit.isInstanceOf(aComponent,
239+
"javax.swing.JToggleButton")) {
240+
ButtonModel buttonModel = ((JToggleButton) aComponent).getModel();
241+
if (buttonModel != null && buttonModel instanceof DefaultButtonModel) {
242+
DefaultButtonModel model = (DefaultButtonModel) buttonModel;
243+
ButtonGroup group = model.getGroup();
244+
if (group != null) {
245+
Enumeration<AbstractButton> elements =
246+
group.getElements();
247+
int idx = 0;
248+
while (elements.hasMoreElements()) {
249+
AbstractButton member = elements.nextElement();
250+
if (member.isVisible() && member.isDisplayable() &&
251+
member.isEnabled() && member.isFocusable()) {
252+
if (member == aComponent) {
253+
return idx == 0;
254+
}
255+
idx++;
256+
}
257+
}
258+
}
259+
}
260+
}
261+
238262
JComponent jComponent = (JComponent)aComponent;
239263
InputMap inputMap = jComponent.getInputMap(JComponent.WHEN_FOCUSED,
240264
false);

jdk/src/share/classes/javax/swing/plaf/basic/BasicRadioButtonUI.java

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -437,21 +437,7 @@ boolean containsInGroup(Object obj){
437437
// Check if the next object to gain focus belongs
438438
// to the button group or not
439439
Component getFocusTransferBaseComponent(boolean next){
440-
Component focusBaseComp = activeBtn;
441-
Container container = focusBaseComp.getFocusCycleRootAncestor();
442-
if (container != null) {
443-
FocusTraversalPolicy policy = container.getFocusTraversalPolicy();
444-
Component comp = next ? policy.getComponentAfter(container, activeBtn)
445-
: policy.getComponentBefore(container, activeBtn);
446-
447-
// If next component in the button group, use last/first button as base focus
448-
// otherwise, use the activeBtn as the base focus
449-
if (containsInGroup(comp)) {
450-
focusBaseComp = next ? lastBtn : firstBtn;
451-
}
452-
}
453-
454-
return focusBaseComp;
440+
return firstBtn;
455441
}
456442

457443
boolean getButtonGroupInfo() {
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Tips and tasks when updating LittleCMS sources to a newer version.
2+
3+
Download and unzip latest release from https://sourceforge.net/projects/lcms/files/
4+
Replace files in jdk/src/share/native/sun/java2d/cmm/lcms with files from unzipped src and include folders
5+
Replace is important because the lcms sources here are just the subset needed by JDK.
6+
This is deliberate, so when updating be sure to import only the same files.
7+
If a file has been removed from upstream you will notice it during the copy.
8+
It should then be removed from the JDK sources.
9+
If a new file is needed then the build will fail. Manually copy that in.
10+
11+
Some re-editing of these updated files will be needed.
12+
Use "expand" and "sed" to remove tabs and trailing white space from the imported files.
13+
Re-apply the GPL headers used by the JDK. If done correctly these should then not
14+
show up in the PR diff.
15+
16+
Update THIRD_PARTY_README per the current license/copyrights/attributions etc.
17+
18+
Build on all platforms.
19+
If there are compiler warnings causing build failures, update the disabled warnings in
20+
jdk/make/lib/Awt2dLibraries.gmk
21+
Run all automated client tests on all platforms.
22+
Also run J2Ddemo and pay particular attention to the "color" tab.
23+
Visually verify the color transforms against the same with the current/previous JDK

0 commit comments

Comments
 (0)