Skip to content

Commit 22c4d45

Browse files
committed
Merge
2 parents 195bfab + 75168ea commit 22c4d45

File tree

519 files changed

+9248
-4978
lines changed

Some content is hidden

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

519 files changed

+9248
-4978
lines changed

bin/jib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ install_jib() {
130130
fi
131131
# Want to check the filetype using file, to see if we got served a HTML error page.
132132
# This is sensitive to the filename containing a specific string, but good enough.
133-
file ${installed_jib_script}.gz | grep "gzip compressed data" > /dev/null
133+
file "${installed_jib_script}.gz" | grep "gzip compressed data" > /dev/null
134134
if [ $? -ne 0 ]; then
135135
echo "Warning: ${installed_jib_script}.gz is not a gzip file."
136136
echo "If you are behind a proxy you may need to configure exceptions using no_proxy."

make/CompileDemos.gmk

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,41 +171,41 @@ $(BUILD_DEMO_CodePointIM_JAR): $(CODEPOINT_METAINF_SERVICE_FILE)
171171

172172
$(eval $(call SetupBuildDemo, FileChooserDemo, \
173173
DEMO_SUBDIR := jfc, \
174-
DISABLED_WARNINGS := rawtypes deprecation unchecked, \
174+
DISABLED_WARNINGS := rawtypes deprecation unchecked this-escape, \
175175
))
176176

177177
$(eval $(call SetupBuildDemo, SwingSet2, \
178178
DEMO_SUBDIR := jfc, \
179179
EXTRA_COPY_TO_JAR := .java, \
180180
EXTRA_MANIFEST_ATTR := SplashScreen-Image: resources/images/splash.png, \
181-
DISABLED_WARNINGS := rawtypes deprecation unchecked static serial cast, \
181+
DISABLED_WARNINGS := rawtypes deprecation unchecked static serial cast this-escape, \
182182
))
183183

184184
$(eval $(call SetupBuildDemo, Font2DTest, \
185-
DISABLED_WARNINGS := rawtypes deprecation unchecked serial cast, \
185+
DISABLED_WARNINGS := rawtypes deprecation unchecked serial cast this-escape, \
186186
DEMO_SUBDIR := jfc, \
187187
))
188188

189189
$(eval $(call SetupBuildDemo, J2Ddemo, \
190190
DEMO_SUBDIR := jfc, \
191191
MAIN_CLASS := java2d.J2Ddemo, \
192-
DISABLED_WARNINGS := rawtypes deprecation unchecked cast lossy-conversions, \
192+
DISABLED_WARNINGS := rawtypes deprecation unchecked cast lossy-conversions this-escape, \
193193
JAR_NAME := J2Ddemo, \
194194
))
195195

196196
$(eval $(call SetupBuildDemo, Metalworks, \
197-
DISABLED_WARNINGS := rawtypes unchecked, \
197+
DISABLED_WARNINGS := rawtypes unchecked this-escape, \
198198
DEMO_SUBDIR := jfc, \
199199
))
200200

201201
$(eval $(call SetupBuildDemo, Notepad, \
202-
DISABLED_WARNINGS := rawtypes, \
202+
DISABLED_WARNINGS := rawtypes this-escape, \
203203
DEMO_SUBDIR := jfc, \
204204
))
205205

206206
$(eval $(call SetupBuildDemo, Stylepad, \
207207
DEMO_SUBDIR := jfc, \
208-
DISABLED_WARNINGS := rawtypes unchecked, \
208+
DISABLED_WARNINGS := rawtypes unchecked this-escape, \
209209
EXTRA_SRC_DIR := $(DEMO_SHARE_SRC)/jfc/Notepad, \
210210
EXCLUDE_FILES := $(DEMO_SHARE_SRC)/jfc/Notepad/README.txt, \
211211
))
@@ -215,11 +215,12 @@ $(eval $(call SetupBuildDemo, SampleTree, \
215215
))
216216

217217
$(eval $(call SetupBuildDemo, TableExample, \
218-
DISABLED_WARNINGS := rawtypes unchecked deprecation, \
218+
DISABLED_WARNINGS := rawtypes unchecked deprecation this-escape, \
219219
DEMO_SUBDIR := jfc, \
220220
))
221221

222222
$(eval $(call SetupBuildDemo, TransparentRuler, \
223+
DISABLED_WARNINGS := this-escape, \
223224
DEMO_SUBDIR := jfc, \
224225
MAIN_CLASS := transparentruler.Ruler, \
225226
))

make/CompileModuleTools.gmk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ $(eval $(call SetupJavaCompilation, BUILD_JIGSAW_TOOLS, \
5353
build/tools/jigsaw, \
5454
COPY := .properties .html, \
5555
BIN := $(TOOLS_CLASSES_DIR), \
56-
DISABLED_WARNINGS := fallthrough, \
56+
DISABLED_WARNINGS := fallthrough this-escape, \
5757
JAVAC_FLAGS := \
5858
--add-modules jdk.jdeps \
5959
--add-exports java.base/jdk.internal.module=ALL-UNNAMED \

make/autoconf/basic.m4

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,11 @@ AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
477477
# df on AIX does not understand -l. On modern AIXes it understands "-T local" which
478478
# is the same. On older AIXes we just continue to live with a "not local build" warning.
479479
if test "x$OPENJDK_TARGET_OS" = xaix; then
480-
DF_LOCAL_ONLY_OPTION='-T local'
480+
if "$DF -T local > /dev/null 2>&1"; then
481+
DF_LOCAL_ONLY_OPTION='-T local'
482+
else # AIX may use GNU-utils instead
483+
DF_LOCAL_ONLY_OPTION='-l'
484+
fi
481485
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl1"; then
482486
# In WSL1, we can only build on a drvfs file system (that is, a mounted real Windows drive)
483487
DF_LOCAL_ONLY_OPTION='-t drvfs'

make/data/hotspot-symbols/symbols-unix

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,8 @@ JVM_DefineModule
218218
JVM_SetBootLoaderUnnamedModule
219219

220220
# Virtual thread notifications for JVMTI
221-
JVM_VirtualThreadMountBegin
222-
JVM_VirtualThreadMountEnd
223-
JVM_VirtualThreadUnmountBegin
224-
JVM_VirtualThreadUnmountEnd
221+
JVM_VirtualThreadMount
222+
JVM_VirtualThreadUnmount
225223
JVM_VirtualThreadHideFrames
226224

227225
# Scoped values
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
/*
2+
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* This code is free software; you can redistribute it and/or modify it
6+
* under the terms of the GNU General Public License version 2 only, as
7+
* published by the Free Software Foundation. Oracle designates this
8+
* particular file as subject to the "Classpath" exception as provided
9+
* by Oracle in the LICENSE file that accompanied this code.
10+
*
11+
* This code is distributed in the hope that it will be useful, but WITHOUT
12+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
* version 2 for more details (a copy is included in the LICENSE file that
15+
* accompanied this code).
16+
*
17+
* You should have received a copy of the GNU General Public License version
18+
* 2 along with this work; if not, write to the Free Software Foundation,
19+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20+
*
21+
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22+
* or visit www.oracle.com if you need additional information or have any
23+
* questions.
24+
*/
25+
26+
package build.tools.generatecharacter;
27+
28+
import java.io.IOException;
29+
import java.nio.file.Files;
30+
import java.nio.file.Path;
31+
import java.nio.file.StandardOpenOption;
32+
import java.util.AbstractMap;
33+
import java.util.Map;
34+
import java.util.Set;
35+
import java.util.function.Predicate;
36+
import java.util.stream.Collectors;
37+
import java.util.stream.IntStream;
38+
import java.util.stream.Stream;
39+
40+
/**
41+
* A class holding emoji character properties
42+
* https://unicode.org/reports/tr51/#Emoji_Properties_and_Data_Files
43+
*/
44+
class EmojiData {
45+
// Emoji properties map
46+
private final Map<Integer, Long> emojiProps;
47+
48+
static EmojiData readSpecFile(Path file, int plane) throws IOException {
49+
return new EmojiData(file, plane);
50+
}
51+
52+
EmojiData(Path file, int plane) throws IOException {
53+
emojiProps = Files.readAllLines(file).stream()
54+
.map(line -> line.split("#", 2)[0])
55+
.filter(Predicate.not(String::isBlank))
56+
.map(line -> line.split("[ \t]*;[ \t]*", 2))
57+
.flatMap(map -> {
58+
var range = map[0].split("\\.\\.", 2);
59+
var start = Integer.valueOf(range[0], 16);
60+
if ((start >> 16) != plane) {
61+
return Stream.empty();
62+
} else {
63+
return range.length == 1 ?
64+
Stream.of(new AbstractMap.SimpleEntry<>(start, convertType(map[1].trim()))) :
65+
IntStream.rangeClosed(start, Integer.valueOf(range[1], 16))
66+
.mapToObj(cp -> new AbstractMap.SimpleEntry<>(cp, convertType(map[1].trim())));
67+
}
68+
})
69+
.collect(Collectors.toMap(AbstractMap.SimpleEntry::getKey,
70+
AbstractMap.SimpleEntry::getValue,
71+
(v1, v2) -> v1 | v2));
72+
}
73+
74+
long properties(int cp) {
75+
return emojiProps.get(cp);
76+
}
77+
78+
Set<Integer> codepoints() {
79+
return emojiProps.keySet();
80+
}
81+
82+
private static long convertType(String type) {
83+
return switch (type) {
84+
case "Emoji" -> GenerateCharacter.maskEmoji;
85+
case "Emoji_Presentation" -> GenerateCharacter.maskEmojiPresentation;
86+
case "Emoji_Modifier" -> GenerateCharacter.maskEmojiModifier;
87+
case "Emoji_Modifier_Base" -> GenerateCharacter.maskEmojiModifierBase;
88+
case "Emoji_Component" -> GenerateCharacter.maskEmojiComponent;
89+
case "Extended_Pictographic" -> GenerateCharacter.maskExtendedPictographic;
90+
default -> throw new InternalError("Unrecognizable Emoji type: " + type);
91+
};
92+
}
93+
}

0 commit comments

Comments
 (0)