mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2026-01-03 07:01:40 +01:00
Compare commits
372 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60fae77974 | ||
|
|
ffe5e84644 | ||
|
|
b0245c2b54 | ||
|
|
b8f2b3264c | ||
|
|
7fc31eadf3 | ||
|
|
d1b506597f | ||
|
|
c01e986cc9 | ||
|
|
9a6038fbf3 | ||
|
|
27ef185bae | ||
|
|
7753422909 | ||
|
|
d743518243 | ||
|
|
3059f593ab | ||
|
|
7afa57a37e | ||
|
|
6694402d3d | ||
|
|
643f5b5350 | ||
|
|
cb1632e8e3 | ||
|
|
40173c5042 | ||
|
|
b5897fe4ed | ||
|
|
ca85500615 | ||
|
|
d01f67193f | ||
|
|
5110de6c1f | ||
|
|
32d496507b | ||
|
|
23d6a788b4 | ||
|
|
7dc952ec20 | ||
|
|
81353a56f9 | ||
|
|
f0ba0dc6dc | ||
|
|
b6783320ca | ||
|
|
fe533725ae | ||
|
|
f37149b1c5 | ||
|
|
edb6783a21 | ||
|
|
398ce2948c | ||
|
|
75a8b7fa83 | ||
|
|
b66c680885 | ||
|
|
ed28a27490 | ||
|
|
901029355f | ||
|
|
e04080bd0f | ||
|
|
618bacec2e | ||
|
|
36af90acc0 | ||
|
|
ef335c75e3 | ||
|
|
602d98a72c | ||
|
|
672f3a1857 | ||
|
|
f778ad2f4b | ||
|
|
17ff85d4ad | ||
|
|
c5a7490809 | ||
|
|
37b7a23317 | ||
|
|
f67868d917 | ||
|
|
d243e40f7b | ||
|
|
2288788e03 | ||
|
|
b4a3809eaa | ||
|
|
34ae46e2bc | ||
|
|
136a1574ec | ||
|
|
6dffcf7533 | ||
|
|
95d2830361 | ||
|
|
cc83c45595 | ||
|
|
e7204cbc52 | ||
|
|
333a832cea | ||
|
|
104927e514 | ||
|
|
7ded8b1e30 | ||
|
|
3f698242a8 | ||
|
|
b8a2b201b5 | ||
|
|
4f629193a9 | ||
|
|
caa0884400 | ||
|
|
0f7f181d60 | ||
|
|
7143a9c581 | ||
|
|
3340e6f980 | ||
|
|
9874e698b8 | ||
|
|
1e217e7b8b | ||
|
|
c1f7fa2ece | ||
|
|
66c8794c81 | ||
|
|
32cba67284 | ||
|
|
029fea432a | ||
|
|
9dc15f17ea | ||
|
|
d3bf915030 | ||
|
|
5695e59a72 | ||
|
|
b4e85913bf | ||
|
|
e2947fe9e8 | ||
|
|
72b251d372 | ||
|
|
bca2465c94 | ||
|
|
3a7389f564 | ||
|
|
fa069be2f2 | ||
|
|
cd7d175001 | ||
|
|
c9faf88cb7 | ||
|
|
23fda7e41b | ||
|
|
b4863f9dd8 | ||
|
|
4f1fabd8d0 | ||
|
|
afe70e6985 | ||
|
|
f3ef97263f | ||
|
|
40f6d697d2 | ||
|
|
bd78beae15 | ||
|
|
15a838d312 | ||
|
|
315635ea09 | ||
|
|
bce81496ce | ||
|
|
cc9470ece1 | ||
|
|
a51dd58f38 | ||
|
|
dd63eec6e5 | ||
|
|
cadfc3d570 | ||
|
|
f1c919f28f | ||
|
|
599af2ac26 | ||
|
|
c7c8623ed6 | ||
|
|
99546049b3 | ||
|
|
44eca823aa | ||
|
|
9d7f8bc9a0 | ||
|
|
af28093ed8 | ||
|
|
9fe762d3c5 | ||
|
|
ea367322f2 | ||
|
|
34b9ac2287 | ||
|
|
bf54c47471 | ||
|
|
700f50f287 | ||
|
|
b70ef0d2e2 | ||
|
|
c6cec8a8ea | ||
|
|
1170981e93 | ||
|
|
0ee7497937 | ||
|
|
f2fb5c54ae | ||
|
|
efb25e5127 | ||
|
|
abc5619317 | ||
|
|
d76b0cf705 | ||
|
|
1d4a4fed43 | ||
|
|
e827f4ae1c | ||
|
|
e5e24ad080 | ||
|
|
0c9f8e472f | ||
|
|
a147636157 | ||
|
|
94a6149de5 | ||
|
|
f959b01203 | ||
|
|
c003fffd84 | ||
|
|
6083173f9b | ||
|
|
176192499f | ||
|
|
ec5bd02186 | ||
|
|
1a0995981c | ||
|
|
035100cc89 | ||
|
|
dbd0f0dc3b | ||
|
|
6f7a103abc | ||
|
|
195361216c | ||
|
|
2b4b3d9efc | ||
|
|
e746891f96 | ||
|
|
21cd75cb98 | ||
|
|
6ddb0f2b2c | ||
|
|
95898e86a1 | ||
|
|
4b978533ca | ||
|
|
f819e417f9 | ||
|
|
b019469232 | ||
|
|
6ead90568f | ||
|
|
3aeb2d1a51 | ||
|
|
c7e4b2afe2 | ||
|
|
afa54b7ed5 | ||
|
|
2b465b1ebf | ||
|
|
37629673e7 | ||
|
|
afbe2286e2 | ||
|
|
9e94572078 | ||
|
|
9d502f648c | ||
|
|
5ed80778bc | ||
|
|
5a68ba1339 | ||
|
|
05c539c9b4 | ||
|
|
2a35bc5aee | ||
|
|
a8b4801859 | ||
|
|
38940d166a | ||
|
|
0610992a8f | ||
|
|
2eaeb20697 | ||
|
|
5bc78c438b | ||
|
|
e30b89e138 | ||
|
|
e9494f2155 | ||
|
|
d5d6dc0caa | ||
|
|
36fac8c332 | ||
|
|
ed8c11e0d1 | ||
|
|
3aceb74ac9 | ||
|
|
58337b12f8 | ||
|
|
3ee99ca1d7 | ||
|
|
de5208e3c0 | ||
|
|
71e1277fb3 | ||
|
|
0ed44d0aee | ||
|
|
e5ab701157 | ||
|
|
70e730fd5c | ||
|
|
90a39195c1 | ||
|
|
c68e15c0c3 | ||
|
|
fee69babbd | ||
|
|
eeaafbe141 | ||
|
|
e70ee3dcf7 | ||
|
|
23def435d4 | ||
|
|
c2867d6577 | ||
|
|
6b45504934 | ||
|
|
26a7b0dddd | ||
|
|
9d0a4875d7 | ||
|
|
c42de93347 | ||
|
|
70e2c013d7 | ||
|
|
35ee1cb2b3 | ||
|
|
78d35f1435 | ||
|
|
96b61b8f4b | ||
|
|
c280d98e80 | ||
|
|
e455d382e7 | ||
|
|
6bb0536293 | ||
|
|
65bf61852f | ||
|
|
0532bd23cd | ||
|
|
5e912fbec5 | ||
|
|
55768aa45d | ||
|
|
742bdf003e | ||
|
|
0a820d6d21 | ||
|
|
5bfb8146e9 | ||
|
|
f176fae840 | ||
|
|
add146cc8b | ||
|
|
b247e6d908 | ||
|
|
1be89d9640 | ||
|
|
b38f3cf3bd | ||
|
|
8a79f26795 | ||
|
|
6ad1db40d8 | ||
|
|
5afeeed5b2 | ||
|
|
637795e0a7 | ||
|
|
0cd6d13b24 | ||
|
|
bd25c0e01a | ||
|
|
290c21f067 | ||
|
|
0ab5b968fb | ||
|
|
511501048c | ||
|
|
3a5ee7b422 | ||
|
|
518f1f9a6e | ||
|
|
39d75e894b | ||
|
|
4a951001b5 | ||
|
|
ed62024978 | ||
|
|
efdc0037b8 | ||
|
|
882633a738 | ||
|
|
5551d3d888 | ||
|
|
a1e9328367 | ||
|
|
2ba0575cea | ||
|
|
c8ed0128c2 | ||
|
|
67ba91ba52 | ||
|
|
eef5ef88b3 | ||
|
|
52fe584c5a | ||
|
|
530d53f84e | ||
|
|
cea9a9b8ce | ||
|
|
be1007cfaf | ||
|
|
f729514ebd | ||
|
|
fa7f53ee93 | ||
|
|
b4ff6abe63 | ||
|
|
8b73900222 | ||
|
|
add18914fb | ||
|
|
48c48b7a85 | ||
|
|
1f189228b6 | ||
|
|
21d3eaf587 | ||
|
|
d49cf17db0 | ||
|
|
7fe46b2464 | ||
|
|
c5bd0d7934 | ||
|
|
0368e41c12 | ||
|
|
19e02810db | ||
|
|
b0f32c4431 | ||
|
|
92686e1add | ||
|
|
069d9e792e | ||
|
|
5b9a09cb9c | ||
|
|
6b487c3cfe | ||
|
|
5531199db4 | ||
|
|
db69852ac2 | ||
|
|
8c6649dea0 | ||
|
|
5b323a8656 | ||
|
|
14e37ba3df | ||
|
|
6275aee690 | ||
|
|
eb974fad6d | ||
|
|
d778097371 | ||
|
|
0992e17b97 | ||
|
|
661c073594 | ||
|
|
534331f0a1 | ||
|
|
43e0fc04b0 | ||
|
|
593a05c93a | ||
|
|
1c1acb4757 | ||
|
|
441e16e2db | ||
|
|
99b28daf56 | ||
|
|
80ca356e7e | ||
|
|
08c3b1fc8f | ||
|
|
5eef59d22d | ||
|
|
0fd2ac701f | ||
|
|
39ab073173 | ||
|
|
53c6887a3d | ||
|
|
75632a6df2 | ||
|
|
0e3529ad10 | ||
|
|
02916dbb0b | ||
|
|
1dcd3d2c50 | ||
|
|
072cfd2e48 | ||
|
|
8208b9ce32 | ||
|
|
42ff13ab82 | ||
|
|
f4b5488181 | ||
|
|
aac5b27b6a | ||
|
|
edaf548beb | ||
|
|
d49eb0d9a7 | ||
|
|
43e0165eea | ||
|
|
d112950b5b | ||
|
|
9722dfc9bc | ||
|
|
2ba5ed53d6 | ||
|
|
f09cda2c70 | ||
|
|
672992f6ac | ||
|
|
123ac07064 | ||
|
|
5c8f935641 | ||
|
|
dc17821807 | ||
|
|
aa2be1141d | ||
|
|
e0fec43a9b | ||
|
|
a11912ca06 | ||
|
|
3ff8eff804 | ||
|
|
b58c8601bb | ||
|
|
1c1fb44ac1 | ||
|
|
ba2e4178ce | ||
|
|
046dcdc0bc | ||
|
|
7806ca1477 | ||
|
|
3d9dddd658 | ||
|
|
d0e44e5bb4 | ||
|
|
ff8e7d4087 | ||
|
|
f222cb8b8c | ||
|
|
c46623d071 | ||
|
|
c203cebcdf | ||
|
|
9f334a1640 | ||
|
|
9e2ab1e363 | ||
|
|
8c1204de6b | ||
|
|
375d0c1325 | ||
|
|
e2f4319171 | ||
|
|
f87ebd9e5d | ||
|
|
d8bded6fb4 | ||
|
|
c92adf4158 | ||
|
|
14c098610a | ||
|
|
f0cd9dd5c4 | ||
|
|
95a497ae9f | ||
|
|
25d2db06c4 | ||
|
|
3adad5a645 | ||
|
|
f10fd7a78e | ||
|
|
9c6a769618 | ||
|
|
f456f151cc | ||
|
|
001b8056c8 | ||
|
|
4a32eda417 | ||
|
|
3607ddd55a | ||
|
|
db91be2ee1 | ||
|
|
d75e62e16b | ||
|
|
78982f7c11 | ||
|
|
3ddd7b86c8 | ||
|
|
3490262a6b | ||
|
|
b2f1f73e75 | ||
|
|
d1818942b0 | ||
|
|
7ba18fc015 | ||
|
|
6cb2e02af6 | ||
|
|
10b09c7982 | ||
|
|
5229896f4f | ||
|
|
edb59b58b9 | ||
|
|
01ef6d791f | ||
|
|
ff843fabec | ||
|
|
128f083359 | ||
|
|
ef4053ee41 | ||
|
|
aa54795965 | ||
|
|
e44dcf09c0 | ||
|
|
0c9983887d | ||
|
|
9d57eefe6e | ||
|
|
b3666b94a3 | ||
|
|
8e74ed46df | ||
|
|
f916df3b0e | ||
|
|
b5e162200b | ||
|
|
b5fdcb0851 | ||
|
|
86ad195099 | ||
|
|
1e796eae8f | ||
|
|
89448a83d9 | ||
|
|
467ee78a52 | ||
|
|
ea55699f34 | ||
|
|
3ca275fb91 | ||
|
|
cf89ff7a4b | ||
|
|
52cfd292cc | ||
|
|
3fdf26d8dc | ||
|
|
2a79146791 | ||
|
|
908a933131 | ||
|
|
3c72042627 | ||
|
|
c6e9d209c5 | ||
|
|
80f5a47b4a | ||
|
|
e6915ff175 | ||
|
|
5705a55161 | ||
|
|
784e575134 | ||
|
|
8d2aa62bd9 | ||
|
|
7af366a7e1 | ||
|
|
ff55c4903b | ||
|
|
84f3e86749 | ||
|
|
1491340708 | ||
|
|
ac60e4b98e | ||
|
|
d7b122ed69 | ||
|
|
ebadfaeb2e | ||
|
|
751de03704 |
5
.hgtags
5
.hgtags
@@ -621,3 +621,8 @@ c7d4f2849dbfb755fc5860b362a4044ea0c9e082 jdk-15+8
|
||||
bc54620a3848c26cff9766e5e2a6e5ddab98ed18 jdk-14+36
|
||||
1bee69801aeea1a34261c93f35bc9de072a98704 jdk-15+10
|
||||
b2dd4028a6de4e40dda8b76109e4b5c6b294f980 jdk-15+11
|
||||
2ec0ff3042630ddbd3587e340fe0dd40391cb6c4 jdk-15+12
|
||||
1c06a8ee8acad4d93c782626a233693a73de0add jdk-15+13
|
||||
1d6ceb13e142665ea833fca01c8c8598e0ddd211 jdk-15+14
|
||||
bc54620a3848c26cff9766e5e2a6e5ddab98ed18 jdk-14-ga
|
||||
82b7c62cf4cc56828a8fb724f57087967232a2a7 jdk-15+15
|
||||
|
||||
@@ -127,6 +127,9 @@ TEST FAILURE</code></pre>
|
||||
<p>The simplest way to run tests with JCov coverage report is to use the special target <code>jcov-test</code> instead of <code>test</code>, e.g. <code>make jcov-test TEST=jdk_lang</code>. This will make sure the JCov image is built, and that JCov reporting is enabled.</p>
|
||||
<p>The JCov report is stored in <code>build/$BUILD/test-results/jcov-output</code>.</p>
|
||||
<p>Please note that running with JCov reporting can be very memory intensive.</p>
|
||||
<h4 id="jcov_diff_changeset">JCOV_DIFF_CHANGESET</h4>
|
||||
<p>While collecting code coverage with JCov, it is also possible to find coverage for only recently changed code. JCOV_DIFF_CHANGESET specifies a source revision. A textual report will be generated showing coverage of the diff between the specified revision and the repository tip.</p>
|
||||
<p>The report is stored in <code>build/$BUILD/test-results/jcov-output/diff_coverage_report</code> file.</p>
|
||||
<h3 id="jtreg-keywords">JTReg keywords</h3>
|
||||
<h4 id="jobs-1">JOBS</h4>
|
||||
<p>The test concurrency (<code>-concurrency</code>).</p>
|
||||
|
||||
@@ -241,10 +241,20 @@ The simplest way to run tests with JCov coverage report is to use the special
|
||||
target `jcov-test` instead of `test`, e.g. `make jcov-test TEST=jdk_lang`. This
|
||||
will make sure the JCov image is built, and that JCov reporting is enabled.
|
||||
|
||||
The JCov report is stored in `build/$BUILD/test-results/jcov-output`.
|
||||
The JCov report is stored in `build/$BUILD/test-results/jcov-output/report`.
|
||||
|
||||
Please note that running with JCov reporting can be very memory intensive.
|
||||
|
||||
#### JCOV_DIFF_CHANGESET
|
||||
|
||||
While collecting code coverage with JCov, it is also possible to find coverage
|
||||
for only recently changed code. JCOV_DIFF_CHANGESET specifies a source
|
||||
revision. A textual report will be generated showing coverage of the diff
|
||||
between the specified revision and the repository tip.
|
||||
|
||||
The report is stored in `build/$BUILD/test-results/jcov-output/diff_coverage_report`
|
||||
file.
|
||||
|
||||
### JTReg keywords
|
||||
|
||||
#### JOBS
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -94,6 +94,7 @@ COPY_TO_IMAGE := *.html *.txt *.png *.xml README*
|
||||
# EXTRA_MANIFEST_ATTR Extra manifest attribute
|
||||
# SKIP_COMPILATION Skip Java compilation iff true
|
||||
# DISABLE_SJAVAC Passed to SetupJavaCompilation
|
||||
# DISABLED_WARNINGS Additional disabled warnings
|
||||
SetupBuildDemo = $(NamedParamsMacroTemplate)
|
||||
define SetupBuildDemoBody
|
||||
ifeq ($$($1_SRC_DIR), )
|
||||
@@ -135,6 +136,7 @@ define SetupBuildDemoBody
|
||||
EXTRA_MANIFEST_ATTR := $$($1_EXTRA_MANIFEST_ATTR), \
|
||||
SRCZIP := $(SUPPORT_OUTPUTDIR)/demos/image/$$($1_DEMO_SUBDIR)/$1/src.zip, \
|
||||
EXCLUDE_FILES := $$($1_EXCLUDE_FILES), \
|
||||
DISABLED_WARNINGS := $$($1_DISABLED_WARNINGS), \
|
||||
DISABLE_SJAVAC := $$($1_DISABLE_SJAVAC), \
|
||||
))
|
||||
|
||||
@@ -173,35 +175,42 @@ $(BUILD_DEMO_CodePointIM_JAR): $(CODEPOINT_METAINF_SERVICE_FILE)
|
||||
|
||||
$(eval $(call SetupBuildDemo, FileChooserDemo, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
DISABLED_WARNINGS := rawtypes deprecation unchecked, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, SwingSet2, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
EXTRA_COPY_TO_JAR := .java, \
|
||||
EXTRA_MANIFEST_ATTR := SplashScreen-Image: resources/images/splash.png, \
|
||||
DISABLED_WARNINGS := rawtypes deprecation unchecked static serial cast, \
|
||||
DISABLE_SJAVAC := true, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, Font2DTest, \
|
||||
DISABLED_WARNINGS := rawtypes deprecation unchecked serial cast, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, J2Ddemo, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
MAIN_CLASS := java2d.J2Ddemo, \
|
||||
DISABLED_WARNINGS := rawtypes deprecation unchecked cast, \
|
||||
JAR_NAME := J2Ddemo, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, Metalworks, \
|
||||
DISABLED_WARNINGS := rawtypes unchecked, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, Notepad, \
|
||||
DISABLED_WARNINGS := rawtypes, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, Stylepad, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
DISABLED_WARNINGS := rawtypes unchecked, \
|
||||
EXTRA_SRC_DIR := $(DEMO_SHARE_SRC)/jfc/Notepad, \
|
||||
EXCLUDE_FILES := $(DEMO_SHARE_SRC)/jfc/Notepad/README.txt, \
|
||||
))
|
||||
@@ -211,6 +220,7 @@ $(eval $(call SetupBuildDemo, SampleTree, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, TableExample, \
|
||||
DISABLED_WARNINGS := rawtypes unchecked deprecation, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
))
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -77,12 +77,12 @@ define SetupInterimModule
|
||||
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java, \
|
||||
COPY := .gif .png .xml .css .js javax.tools.JavaCompilerTool, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules/$1.interim, \
|
||||
DISABLED_WARNINGS := module, \
|
||||
ADD_JAVAC_FLAGS := --module-path $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules \
|
||||
$$(INTERIM_LANGTOOLS_ADD_EXPORTS) \
|
||||
--patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim \
|
||||
--add-exports java.base/jdk.internal=java.compiler.interim \
|
||||
--add-exports java.base/jdk.internal=jdk.compiler.interim \
|
||||
-Xlint:-module, \
|
||||
--add-exports java.base/jdk.internal=jdk.compiler.interim, \
|
||||
))
|
||||
|
||||
$1_DEPS_INTERIM := $$(addsuffix .interim, $$(filter \
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
|
||||
################################################################################
|
||||
# Generate interim versions of the module-info.java files for the interim
|
||||
# langtools modules. Each interim module has ".interim" added as suffix to the
|
||||
# original module name.
|
||||
|
||||
INTERIM_MODULEINFO_PATTERN := \
|
||||
$(foreach m, $(INTERIM_RMIC_BASE_MODULES), -e 's/$m\([,; ]\)/$m.interim\1/g') \
|
||||
-e '/ToolProvider[,; ]/d'
|
||||
|
||||
$(BUILDTOOLS_OUTPUTDIR)/gensrc/%.interim/module-info.java: \
|
||||
$(TOPDIR)/src/%/share/classes/module-info.java
|
||||
$(call LogInfo, Generating module-info.java for $*.interim)
|
||||
$(call MakeDir, $(@D))
|
||||
$(SED) $(INTERIM_MODULEINFO_PATTERN) $< > $@
|
||||
|
||||
TARGETS += $(patsubst %, $(BUILDTOOLS_OUTPUTDIR)/gensrc/%/module-info.java, \
|
||||
$(INTERIM_RMIC_MODULES))
|
||||
|
||||
################################################################################
|
||||
|
||||
RMIC_PKGS := \
|
||||
sun/rmi/rmic \
|
||||
sun/tools/asm \
|
||||
sun/tools/java \
|
||||
sun/tools/javac \
|
||||
sun/tools/tree \
|
||||
sun/tools/util \
|
||||
#
|
||||
|
||||
$(eval $(call SetupJavaCompilation, BUILD_jdk.rmic.interim, \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := $(TOPDIR)/src/jdk.rmic/share/classes, \
|
||||
EXCLUDE_FILES := $(TOPDIR)/src/jdk.rmic/share/classes/module-info.java, \
|
||||
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/jdk.rmic.interim/module-info.java, \
|
||||
INCLUDES := $(RMIC_PKGS), \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_modules/jdk.rmic.interim, \
|
||||
COPY := .properties, \
|
||||
ADD_JAVAC_FLAGS := \
|
||||
--module-path $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_modules \
|
||||
$(INTERIM_RMIC_ADD_EXPORTS), \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_jdk.rmic.interim)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
all: $(TARGETS)
|
||||
@@ -80,7 +80,7 @@ java.datatransfer_COPY += flavormap.properties
|
||||
################################################################################
|
||||
|
||||
java.desktop_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference \
|
||||
'-Xdoclint/package:java.*,javax.*' -Xlint:exports \
|
||||
'-Xdoclint/package:java.*,javax.*' \
|
||||
--doclint-format html4
|
||||
java.desktop_COPY += .gif .png .wav .txt .xml .css .pf
|
||||
java.desktop_CLEAN += iio-plugin.properties cursors.properties
|
||||
@@ -245,7 +245,6 @@ java.transaction.xa_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/packag
|
||||
################################################################################
|
||||
|
||||
java.sql_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
|
||||
java.sql_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -270,7 +269,7 @@ java.xml_CLEAN += .properties
|
||||
|
||||
################################################################################
|
||||
|
||||
java.naming_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility '-Xdoclint/package:java.*,javax.*' -Xlint:-exports
|
||||
java.naming_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility '-Xdoclint/package:java.*,javax.*'
|
||||
java.naming_CLEAN += jndiprovider.properties
|
||||
|
||||
################################################################################
|
||||
@@ -304,7 +303,8 @@ jdk.compiler_CLEAN_FILES += $(wildcard \
|
||||
|
||||
################################################################################
|
||||
|
||||
jdk.hotspot.agent_ADD_JAVAC_FLAGS += $(DISABLE_WARNINGS),-overrides
|
||||
jdk.hotspot.agent_DISABLED_WARNINGS += deprecation rawtypes serial unchecked \
|
||||
cast static overrides fallthrough
|
||||
jdk.hotspot.agent_COPY += .gif .png sa.js .properties
|
||||
|
||||
################################################################################
|
||||
@@ -341,17 +341,17 @@ jdk.jartool_ADD_JAVAC_FLAGS += -XDstringConcat=inline
|
||||
|
||||
################################################################################
|
||||
|
||||
jdk.scripting.nashorn_ADD_JAVAC_FLAGS += $(DISABLE_WARNINGS),-overrides
|
||||
jdk.scripting.nashorn_DISABLED_WARNINGS += removal
|
||||
jdk.scripting.nashorn_COPY := .properties .js
|
||||
|
||||
################################################################################
|
||||
|
||||
jdk.scripting.nashorn.shell_ADD_JAVAC_FLAGS += $(DISABLE_WARNINGS),-overrides
|
||||
jdk.scripting.nashorn.shell_DISABLED_WARNINGS += removal
|
||||
jdk.scripting.nashorn.shell_COPY += .js .properties
|
||||
|
||||
################################################################################
|
||||
|
||||
jdk.rmic_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
|
||||
jdk.rmic_DISABLED_WARNINGS += deprecation
|
||||
jdk.rmic_CLEAN += .properties
|
||||
|
||||
################################################################################
|
||||
@@ -431,7 +431,7 @@ jdk.internal.jvmstat_COPY += aliasmap
|
||||
# The exports are needed since JVMCI is dynamically exported (see
|
||||
# jdk.vm.ci.services.internal.ReflectionAccessJDK::openJVMCITo).
|
||||
|
||||
jdk.internal.vm.ci_ADD_JAVAC_FLAGS += -parameters -Xlint:-exports -XDstringConcat=inline
|
||||
jdk.internal.vm.ci_ADD_JAVAC_FLAGS += -parameters -XDstringConcat=inline
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -536,13 +536,9 @@ jdk.localedata_EXCLUDE_FILES += sun/text/resources/ext/BreakIteratorRules_th.jav
|
||||
jdk.localedata_KEEP_ALL_TRANSLATIONS := true
|
||||
################################################################################
|
||||
|
||||
# There is an issue in sjavac that triggers a warning in jdk.jfr that isn't
|
||||
# triggered without sjavac.
|
||||
ifeq ($(ENABLE_SJAVAC), yes)
|
||||
jdk.jfr_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
|
||||
endif
|
||||
jdk.jfr_DISABLED_WARNINGS += exports
|
||||
jdk.jfr_COPY := .xsd .xml .dtd
|
||||
jdk.jfr_ADD_JAVAC_FLAGS := -XDstringConcat=inline -Xlint:-exports
|
||||
jdk.jfr_ADD_JAVAC_FLAGS := -XDstringConcat=inline
|
||||
|
||||
################################################################################
|
||||
# If this is an imported module that has prebuilt classes, only compile
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -42,6 +42,7 @@ $(eval $(call SetupJavaCompilation,BUILD_JIGSAW_TOOLS, \
|
||||
build/tools/jigsaw, \
|
||||
COPY := .properties .html, \
|
||||
BIN := $(TOOLS_CLASSES_DIR), \
|
||||
DISABLED_WARNINGS := fallthrough, \
|
||||
ADD_JAVAC_FLAGS := \
|
||||
--add-modules jdk.jdeps \
|
||||
--add-exports java.base/jdk.internal.module=ALL-UNNAMED \
|
||||
|
||||
@@ -43,7 +43,7 @@ BUILD_TOOLS_SRC_DIRS += \
|
||||
$(BUILDTOOLS_OUTPUTDIR)/interim_tzdb_classes \
|
||||
#
|
||||
|
||||
$(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \
|
||||
$(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := $(BUILD_TOOLS_SRC_DIRS), \
|
||||
EXCLUDES := \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -57,10 +57,7 @@ $(eval $(call IncludeCustomExtension, Docs.gmk))
|
||||
################################################################################
|
||||
# Javadoc settings
|
||||
|
||||
# On top of the sources that was used to compile the JDK, we need some
|
||||
# extra java.rmi sources that are used just for javadoc.
|
||||
MODULES_SOURCE_PATH := $(call PathList, $(call GetModuleSrcPath) \
|
||||
$(SUPPORT_OUTPUTDIR)/rmic/* $(TOPDIR)/src/*/share/doc/stub)
|
||||
MODULES_SOURCE_PATH := $(call PathList, $(call GetModuleSrcPath) )
|
||||
|
||||
# URLs
|
||||
JAVADOC_BASE_URL := https://docs.oracle.com/pls/topic/lookup?ctx=javase$(VERSION_NUMBER)&id=homepage
|
||||
|
||||
@@ -45,7 +45,7 @@ help:
|
||||
$(info $(_) make <name>-image # Build just the image for any of: )
|
||||
$(info $(_) # jdk, test, docs, symbols, legacy-jre, static-libs)
|
||||
$(info $(_) make <phase> # Build the specified phase and everything it depends on)
|
||||
$(info $(_) # (gensrc, java, copy, libs, launchers, gendata, rmic))
|
||||
$(info $(_) # (gensrc, java, copy, libs, launchers, gendata))
|
||||
$(info $(_) make *-only # Applies to most targets and disables building the)
|
||||
$(info $(_) # dependencies for that target. This is faster but may)
|
||||
$(info $(_) # result in incorrect build results!)
|
||||
@@ -82,7 +82,7 @@ help:
|
||||
$(info $(_) make <module> # Build <module> and everything it depends on)
|
||||
$(info $(_) make <module>-<phase> # Compile the specified phase for the specified module)
|
||||
$(info $(_) # and everything it depends on)
|
||||
$(info $(_) # (gensrc, java, copy, libs, launchers, gendata, rmic))
|
||||
$(info $(_) # (gensrc, java, copy, libs, launchers, gendata))
|
||||
$(info )
|
||||
$(info Make control variables)
|
||||
$(info $(_) CONF= # Build all configurations (note, assignment is empty))
|
||||
|
||||
@@ -72,9 +72,6 @@ buildtools-langtools:
|
||||
interim-langtools:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimLangtools.gmk)
|
||||
|
||||
interim-rmic:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimRmic.gmk)
|
||||
|
||||
interim-tzdb:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimTZDB.gmk)
|
||||
|
||||
@@ -89,7 +86,7 @@ buildtools-hotspot:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileToolsHotspot.gmk)
|
||||
|
||||
ALL_TARGETS += buildtools-langtools interim-langtools \
|
||||
interim-rmic interim-tzdb buildtools-jdk buildtools-modules \
|
||||
interim-tzdb buildtools-jdk buildtools-modules \
|
||||
buildtools-hotspot
|
||||
|
||||
################################################################################
|
||||
@@ -193,16 +190,6 @@ $(foreach m, $(JAVA_MODULES), $(eval $(call DeclareCompileJavaRecipe,$m)))
|
||||
|
||||
ALL_TARGETS += $(JAVA_TARGETS)
|
||||
|
||||
################################################################################
|
||||
# Targets for running rmic.
|
||||
$(eval $(call DeclareRecipesForPhase, RMIC, \
|
||||
TARGET_SUFFIX := rmic, \
|
||||
FILE_PREFIX := Rmic, \
|
||||
MAKE_SUBDIR := rmic, \
|
||||
CHECK_MODULES := $(ALL_MODULES)))
|
||||
|
||||
ALL_TARGETS += $(RMIC_TARGETS)
|
||||
|
||||
################################################################################
|
||||
# Targets for compiling native libraries
|
||||
$(eval $(call DeclareRecipesForPhase, LIBS, \
|
||||
@@ -688,10 +675,6 @@ else
|
||||
|
||||
$(GENDATA_TARGETS): interim-langtools buildtools-jdk
|
||||
|
||||
interim-rmic: interim-langtools
|
||||
|
||||
$(RMIC_TARGETS): interim-langtools interim-rmic
|
||||
|
||||
$(JAVA_TARGETS): interim-langtools
|
||||
|
||||
# Declare dependencies between hotspot-<variant>* targets
|
||||
@@ -732,9 +715,6 @@ else
|
||||
# Declare dependencies between the module meta targets
|
||||
$(foreach m, $(ALL_MODULES), $(eval $m: $(call FindDepsForModule,$m)))
|
||||
|
||||
# Declare dependencies between <module>-rmic to <module>-java
|
||||
$(foreach m, $(RMIC_MODULES), $(eval $m-rmic: $m-java))
|
||||
|
||||
# Declare dependencies from <module>-lib to <module>-java
|
||||
# Skip modules that do not have java source.
|
||||
$(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs: $m-java))
|
||||
@@ -768,7 +748,7 @@ else
|
||||
jdk.internal.vm.compiler-gensrc-moduleinfo: jdk.internal.vm.compiler-gensrc-src
|
||||
jdk.internal.vm.compiler.management-gensrc-moduleinfo: jdk.internal.vm.compiler.management-gensrc-src
|
||||
|
||||
jdk.jdeps-gendata: java rmic
|
||||
jdk.jdeps-gendata: java
|
||||
|
||||
# The ct.sym generation uses all the moduleinfos as input
|
||||
jdk.compiler-gendata: $(GENSRC_MODULEINFO_TARGETS)
|
||||
@@ -790,7 +770,6 @@ else
|
||||
# Declare dependencies from <module>-jmod to all other module targets
|
||||
$(foreach m, $(JAVA_MODULES), $(eval $m_JMOD_DEPS += $m-java))
|
||||
$(foreach m, $(GENDATA_MODULES), $(eval $m_JMOD_DEPS += $m-gendata))
|
||||
$(foreach m, $(RMIC_MODULES), $(eval $m_JMOD_DEPS += $m-rmic))
|
||||
$(foreach m, $(LIBS_MODULES), $(eval $m_JMOD_DEPS += $m-libs))
|
||||
$(foreach m, $(LAUNCHER_MODULES), $(eval $m_JMOD_DEPS += $m-launchers))
|
||||
$(foreach m, $(COPY_MODULES), $(eval $m_JMOD_DEPS += $m-copy))
|
||||
@@ -856,7 +835,7 @@ else
|
||||
zip-security: java.base-java java.security.jgss-java java.security.jgss-libs \
|
||||
$(filter jdk.crypto%, $(JAVA_TARGETS))
|
||||
|
||||
zip-source: gensrc rmic
|
||||
zip-source: gensrc
|
||||
|
||||
jrtfs-jar: interim-langtools
|
||||
|
||||
@@ -903,11 +882,11 @@ else
|
||||
|
||||
bootcycle-images: jdk-image
|
||||
|
||||
docs-jdk-api-javadoc: $(GENSRC_TARGETS) rmic
|
||||
docs-jdk-api-javadoc: $(GENSRC_TARGETS)
|
||||
|
||||
docs-javase-api-javadoc: $(GENSRC_TARGETS) rmic
|
||||
docs-javase-api-javadoc: $(GENSRC_TARGETS)
|
||||
|
||||
docs-reference-api-javadoc: $(GENSRC_TARGETS) rmic
|
||||
docs-reference-api-javadoc: $(GENSRC_TARGETS)
|
||||
|
||||
docs-jdk-api-modulegraph: exploded-image buildtools-modules
|
||||
|
||||
@@ -989,7 +968,7 @@ endif
|
||||
|
||||
# If not already set, set the JVM specific tools targets
|
||||
JVM_TOOLS_TARGETS ?= buildtools-hotspot
|
||||
buildtools: buildtools-langtools interim-langtools interim-rmic \
|
||||
buildtools: buildtools-langtools interim-langtools \
|
||||
buildtools-jdk $(JVM_TOOLS_TARGETS)
|
||||
|
||||
# Declare dependencies from hotspot-<variant> targets
|
||||
@@ -1012,8 +991,6 @@ copy: $(ALL_COPY_TARGETS)
|
||||
|
||||
java: $(JAVA_TARGETS)
|
||||
|
||||
rmic: $(RMIC_TARGETS)
|
||||
|
||||
libs: $(LIBS_TARGETS)
|
||||
|
||||
static-libs: $(STATIC_LIBS_TARGETS)
|
||||
@@ -1031,7 +1008,6 @@ jdk.jdwp.agent-gensrc: jdk.jdi-gensrc
|
||||
$(foreach m, $(GENSRC_MODULES), $(eval $m: $m-gensrc))
|
||||
$(foreach m, $(JAVA_MODULES), $(eval $m: $m-java))
|
||||
$(foreach m, $(GENDATA_MODULES), $(eval $m: $m-gendata))
|
||||
$(foreach m, $(RMIC_MODULES), $(eval $m: $m-rmic))
|
||||
$(foreach m, $(LIBS_MODULES), $(eval $m: $m-libs))
|
||||
$(foreach m, $(LAUNCHER_MODULES), $(eval $m: $m-launchers))
|
||||
$(foreach m, $(ALL_COPY_MODULES), $(eval $m: $m-copy))
|
||||
@@ -1131,7 +1107,7 @@ all-images: product-images test-image docs-image
|
||||
all-bundles: product-bundles test-bundles docs-bundles static-libs-bundles
|
||||
|
||||
ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-gensrc gensrc gendata \
|
||||
copy java rmic libs static-libs launchers jmods \
|
||||
copy java libs static-libs launchers jmods \
|
||||
jdk.jdwp.agent-gensrc $(ALL_MODULES) demos \
|
||||
exploded-image-base exploded-image \
|
||||
create-buildjdk docs-jdk-api docs-javase-api docs-reference-api docs-jdk \
|
||||
|
||||
@@ -45,7 +45,7 @@ ifneq ($(TEST_VM_OPTS), )
|
||||
endif
|
||||
|
||||
$(eval $(call ParseKeywordVariable, TEST_OPTS, \
|
||||
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR JCOV, \
|
||||
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR JCOV JCOV_DIFF_CHANGESET, \
|
||||
STRING_KEYWORDS := VM_OPTIONS JAVA_OPTIONS AOT_MODULES, \
|
||||
))
|
||||
|
||||
@@ -1266,12 +1266,44 @@ ifeq ($(TEST_OPTS_JCOV), true)
|
||||
TARGETS += jcov-do-start-grabber jcov-start-grabber jcov-stop-grabber \
|
||||
jcov-gen-report
|
||||
|
||||
ifneq ($(TEST_OPTS_JCOV_DIFF_CHANGESET), )
|
||||
|
||||
JCOV_SOURCE_DIFF := $(JCOV_OUTPUT_DIR)/source_diff
|
||||
JCOV_DIFF_COVERAGE_REPORT := $(JCOV_OUTPUT_DIR)/diff_coverage_report
|
||||
|
||||
ifneq ($(and $(HG), $(wildcard $(TOPDIR)/.hg)), )
|
||||
DIFF_COMMAND := $(HG) -R $(TOPDIR) diff -r $(TEST_OPTS_JCOV_DIFF_CHANGESET) > $(JCOV_SOURCE_DIFF)
|
||||
else ifneq ($(and $(GIT), $(wildcard $(TOPDIR)/.git)), )
|
||||
DIFF_COMMAND := $(GIT) -C $(TOPDIR) diff $(TEST_OPTS_JCOV_DIFF_CHANGESET) > $(JCOV_SOURCE_DIFF)
|
||||
else
|
||||
$(info Error: Must be either hg or git source tree for diff coverage.)
|
||||
$(error Neither hg nor git source tree.)
|
||||
endif
|
||||
|
||||
jcov-gen-diffcoverage: jcov-stop-grabber
|
||||
$(call LogWarn, Generating diff coverage with changeset $(TEST_OPTS_JCOV_DIFF_CHANGESET) ... )
|
||||
$(DIFF_COMMAND)
|
||||
$(JAVA) -Xmx4g -jar $(JCOV_HOME)/lib/jcov.jar \
|
||||
DiffCoverage -replaceDiff "src/.*/classes/:" -all \
|
||||
$(JCOV_RESULT_FILE) $(JCOV_SOURCE_DIFF) > \
|
||||
$(JCOV_DIFF_COVERAGE_REPORT)
|
||||
|
||||
TARGETS += jcov-gen-diffcoverage
|
||||
|
||||
endif
|
||||
|
||||
# Hook this into the framework at appropriate places
|
||||
pre-run-test: jcov-start-grabber
|
||||
|
||||
post-run-test: jcov-gen-report
|
||||
|
||||
jcov-gen-report: run-all-tests
|
||||
ifneq ($(TEST_OPTS_JCOV_DIFF_CHANGESET), )
|
||||
|
||||
post-run-test: jcov-gen-diffcoverage
|
||||
|
||||
endif
|
||||
|
||||
jcov-stop-grabber: run-all-tests
|
||||
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -39,18 +39,12 @@ $(eval $(call IncludeCustomExtension, ZipSource.gmk))
|
||||
# Create the directory structure for src.zip using symlinks.
|
||||
# <module>/<package>/<file>.java
|
||||
|
||||
# Find extra source dirs for a module that are not part of normal compilation
|
||||
# but should be included in src.zip.
|
||||
# $1: Module to find dirs for
|
||||
ExtraSrcDirs = \
|
||||
$(wildcard $(SUPPORT_OUTPUTDIR)/rmic/$(strip $1))
|
||||
|
||||
ALL_MODULES := $(FindAllModules)
|
||||
|
||||
# Generate the src dirs in the first make invocation and then call this makefile
|
||||
# again to create src.zip.
|
||||
$(foreach m, $(ALL_MODULES), \
|
||||
$(foreach d, $(call FindModuleSrcDirs, $m) $(call ExtraSrcDirs, $m), \
|
||||
$(foreach d, $(call FindModuleSrcDirs, $m), \
|
||||
$(eval $d_TARGET := $(SRC_ZIP_WORK_DIR)/$(patsubst $(TOPDIR)/%,%,$d)/$m) \
|
||||
$(if $(SRC_GENERATED), , \
|
||||
$(eval $$($d_TARGET): $d ; \
|
||||
|
||||
@@ -393,12 +393,25 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
|
||||
AC_MSG_CHECKING([if codesign certificate is present])
|
||||
$RM codesign-testfile
|
||||
$TOUCH codesign-testfile
|
||||
$CODESIGN -s "$MACOSX_CODESIGN_IDENTITY" codesign-testfile 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD || CODESIGN=
|
||||
$CODESIGN -s "$MACOSX_CODESIGN_IDENTITY" codesign-testfile 2>&AS_MESSAGE_LOG_FD \
|
||||
>&AS_MESSAGE_LOG_FD || CODESIGN=
|
||||
$RM codesign-testfile
|
||||
if test "x$CODESIGN" = x; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
# Verify that the codesign has --option runtime
|
||||
AC_MSG_CHECKING([if codesign has --option runtime])
|
||||
$RM codesign-testfile
|
||||
$TOUCH codesign-testfile
|
||||
$CODESIGN --option runtime -s "$MACOSX_CODESIGN_IDENTITY" codesign-testfile \
|
||||
2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD || CODESIGN=
|
||||
$RM codesign-testfile
|
||||
if test "x$CODESIGN" = x; then
|
||||
AC_MSG_ERROR([codesign does not have --option runtime. macOS 10.13.6 and above is required.])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
UTIL_REQUIRE_PROGS(SETFILE, SetFile)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -167,36 +167,38 @@ AC_DEFUN_ONCE([BPERF_SETUP_TEST_JOBS],
|
||||
|
||||
AC_DEFUN([BPERF_SETUP_CCACHE],
|
||||
[
|
||||
AC_ARG_ENABLE([ccache],
|
||||
[AS_HELP_STRING([--enable-ccache],
|
||||
[enable using ccache to speed up recompilations @<:@disabled@:>@])])
|
||||
# Check if ccache is available
|
||||
CCACHE_AVAILABLE=true
|
||||
|
||||
CCACHE_STATUS=
|
||||
AC_MSG_CHECKING([is ccache enabled])
|
||||
if test "x$enable_ccache" = xyes; then
|
||||
if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
OLD_PATH="$PATH"
|
||||
if test "x$TOOLCHAIN_PATH" != x; then
|
||||
PATH=$TOOLCHAIN_PATH:$PATH
|
||||
fi
|
||||
UTIL_REQUIRE_PROGS(CCACHE, ccache)
|
||||
PATH="$OLD_PATH"
|
||||
CCACHE_VERSION=[`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`]
|
||||
CCACHE_STATUS="Active ($CCACHE_VERSION)"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_WARN([ccache is not supported with toolchain type $TOOLCHAIN_TYPE])
|
||||
fi
|
||||
elif test "x$enable_ccache" = xno; then
|
||||
AC_MSG_RESULT([no, explicitly disabled])
|
||||
CCACHE_STATUS="Disabled"
|
||||
elif test "x$enable_ccache" = x; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([unknown])
|
||||
AC_MSG_ERROR([--enable-ccache does not accept any parameters])
|
||||
OLD_PATH="$PATH"
|
||||
if test "x$TOOLCHAIN_PATH" != x; then
|
||||
PATH=$TOOLCHAIN_PATH:$PATH
|
||||
fi
|
||||
UTIL_PATH_PROGS(CCACHE, ccache)
|
||||
PATH="$OLD_PATH"
|
||||
|
||||
AC_MSG_CHECKING([if ccache is available])
|
||||
if test "x$TOOLCHAIN_TYPE" != "xgcc" && test "x$TOOLCHAIN_TYPE" != "xclang"; then
|
||||
AC_MSG_RESULT([no, not supported for toolchain type $TOOLCHAIN_TYPE])
|
||||
CCACHE_AVAILABLE=false
|
||||
elif test "x$CCACHE" = "x"; then
|
||||
AC_MSG_RESULT([no, ccache binary missing or not executable])
|
||||
CCACHE_AVAILABLE=false
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
|
||||
CCACHE_STATUS=""
|
||||
UTIL_ARG_ENABLE(NAME: ccache, DEFAULT: false, AVAILABLE: $CCACHE_AVAILABLE,
|
||||
DESC: [enable using ccache to speed up recompilations],
|
||||
CHECKING_MSG: [if ccache is enabled],
|
||||
IF_ENABLED: [
|
||||
CCACHE_VERSION=[`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`]
|
||||
CCACHE_STATUS="Active ($CCACHE_VERSION)"
|
||||
],
|
||||
IF_DISABLED: [
|
||||
CCACHE=""
|
||||
])
|
||||
AC_SUBST(CCACHE)
|
||||
|
||||
AC_ARG_WITH([ccache-dir],
|
||||
@@ -284,10 +286,10 @@ AC_DEFUN([BPERF_RUN_ICECC_CREATE_ENV],
|
||||
#
|
||||
AC_DEFUN([BPERF_SETUP_ICECC],
|
||||
[
|
||||
AC_ARG_ENABLE([icecc], [AS_HELP_STRING([--enable-icecc],
|
||||
[enable distribted compilation of native code using icecc/icecream @<:@disabled@:>@])])
|
||||
UTIL_ARG_ENABLE(NAME: icecc, DEFAULT: false, RESULT: ENABLE_ICECC,
|
||||
DESC: [enable distributed compilation of native code using icecc/icecream])
|
||||
|
||||
if test "x${enable_icecc}" = "xyes"; then
|
||||
if test "x$ENABLE_ICECC" = "xtrue"; then
|
||||
UTIL_REQUIRE_PROGS(ICECC_CMD, icecc)
|
||||
old_path="$PATH"
|
||||
|
||||
@@ -349,56 +351,44 @@ AC_DEFUN([BPERF_SETUP_ICECC],
|
||||
else
|
||||
BUILD_ICECC="${ICECC}"
|
||||
fi
|
||||
AC_SUBST(ICECC)
|
||||
AC_SUBST(BUILD_ICECC)
|
||||
fi
|
||||
|
||||
AC_SUBST(ICECC)
|
||||
AC_SUBST(BUILD_ICECC)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Can the C/C++ compiler use precompiled headers?
|
||||
#
|
||||
AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers],
|
||||
[disable using precompiled headers when compiling C++ @<:@enabled@:>@])],
|
||||
[ENABLE_PRECOMPH=${enable_precompiled_headers}], [ENABLE_PRECOMPH=yes])
|
||||
|
||||
USE_PRECOMPILED_HEADER=true
|
||||
AC_MSG_CHECKING([If precompiled header is enabled])
|
||||
if test "x$ENABLE_PRECOMPH" = xno; then
|
||||
AC_MSG_RESULT([no, forced])
|
||||
USE_PRECOMPILED_HEADER=false
|
||||
elif test "x$ICECC" != "x"; then
|
||||
# Are precompiled headers available?
|
||||
PRECOMPILED_HEADERS_AVAILABLE=true
|
||||
AC_MSG_CHECKING([if precompiled headers are available])
|
||||
if test "x$ICECC" != "x"; then
|
||||
AC_MSG_RESULT([no, does not work effectively with icecc])
|
||||
USE_PRECOMPILED_HEADER=false
|
||||
PRECOMPILED_HEADERS_AVAILABLE=false
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
AC_MSG_RESULT([no, does not work with Solaris Studio])
|
||||
USE_PRECOMPILED_HEADER=false
|
||||
PRECOMPILED_HEADERS_AVAILABLE=false
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
AC_MSG_RESULT([no, does not work with xlc])
|
||||
USE_PRECOMPILED_HEADER=false
|
||||
PRECOMPILED_HEADERS_AVAILABLE=false
|
||||
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
# Check that the compiler actually supports precomp headers.
|
||||
echo "int alfa();" > conftest.h
|
||||
$CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD
|
||||
if test ! -f conftest.hpp.gch; then
|
||||
PRECOMPILED_HEADERS_AVAILABLE=false
|
||||
AC_MSG_RESULT([no, gcc fails to compile properly with -x c++-header])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
$RM conftest.h conftest.hpp.gch
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
|
||||
if test "x$ENABLE_PRECOMPH" = xyes; then
|
||||
# Check that the compiler actually supports precomp headers.
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
AC_MSG_CHECKING([that precompiled headers work])
|
||||
echo "int alfa();" > conftest.h
|
||||
$CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD
|
||||
if test ! -f conftest.hpp.gch; then
|
||||
USE_PRECOMPILED_HEADER=false
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
$RM conftest.h conftest.hpp.gch
|
||||
fi
|
||||
fi
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: precompiled-headers, DEFAULT: auto,
|
||||
RESULT: USE_PRECOMPILED_HEADER, AVAILABLE: $PRECOMPILED_HEADERS_AVAILABLE,
|
||||
DESC: [enable using precompiled headers when compiling C++])
|
||||
AC_SUBST(USE_PRECOMPILED_HEADER)
|
||||
])
|
||||
|
||||
@@ -442,29 +432,28 @@ AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
|
||||
if test "$MX_VALUE" -lt "512"; then
|
||||
MX_VALUE=512
|
||||
fi
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xms${MS_VALUE}M -Xmx${MX_VALUE}M],SJAVAC_SERVER_JAVA_FLAGS,[$SJAVAC_SERVER_JAVA])
|
||||
|
||||
JAVAC_SERVER_AVAILABLE=true
|
||||
SJAVAC_MEMORY_OPT="-Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
|
||||
UTIL_ADD_JVM_ARG_IF_OK([$SJAVAC_MEMORY_OPT],SJAVAC_SERVER_JAVA_FLAGS,[$SJAVAC_SERVER_JAVA])
|
||||
if test "x$JVM_ARG_OK" = "xfalse"; then
|
||||
AC_MSG_WARN([Could not set '$SJAVAC_MEMORY_OPT' on bootjdk, disabling sjavac and javac server])
|
||||
JAVAC_SERVER_AVAILABLE=false
|
||||
fi
|
||||
AC_SUBST(SJAVAC_SERVER_JAVA_FLAGS)
|
||||
|
||||
AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
|
||||
[use sjavac to do fast incremental compiles @<:@disabled@:>@])],
|
||||
[ENABLE_SJAVAC="${enableval}"], [ENABLE_SJAVAC="no"])
|
||||
if test "x$JVM_ARG_OK" = "xfalse"; then
|
||||
AC_MSG_WARN([Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac])
|
||||
ENABLE_SJAVAC="no"
|
||||
fi
|
||||
AC_MSG_CHECKING([whether to use sjavac])
|
||||
AC_MSG_RESULT([$ENABLE_SJAVAC])
|
||||
UTIL_ARG_ENABLE(NAME: sjavac, DEFAULT: false, AVAILABLE: $JAVAC_SERVER_AVAILABLE,
|
||||
DESC: [use sjavac to do fast incremental compiles],
|
||||
CHECKING_MSG: [whether to use sjavac],
|
||||
IF_ENABLED: [ ENABLE_SJAVAC="yes" ],
|
||||
IF_DISABLED: [ ENABLE_SJAVAC="no" ])
|
||||
AC_SUBST(ENABLE_SJAVAC)
|
||||
|
||||
AC_ARG_ENABLE([javac-server], [AS_HELP_STRING([--disable-javac-server],
|
||||
[disable javac server @<:@enabled@:>@])],
|
||||
[ENABLE_JAVAC_SERVER="${enableval}"], [ENABLE_JAVAC_SERVER="yes"])
|
||||
if test "x$JVM_ARG_OK" = "xfalse"; then
|
||||
AC_MSG_WARN([Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server])
|
||||
ENABLE_JAVAC_SERVER="no"
|
||||
fi
|
||||
AC_MSG_CHECKING([whether to use javac server])
|
||||
AC_MSG_RESULT([$ENABLE_JAVAC_SERVER])
|
||||
UTIL_ARG_ENABLE(NAME: javac-server, DEFAULT: true, AVAILABLE: $JAVAC_SERVER_AVAILABLE,
|
||||
DESC: [enable javac server],
|
||||
CHECKING_MSG: [whether to use javac server],
|
||||
IF_ENABLED: [ ENABLE_JAVAC_SERVER="yes" ],
|
||||
IF_DISABLED: [ ENABLE_JAVAC_SERVER="no" ])
|
||||
AC_SUBST(ENABLE_JAVAC_SERVER)
|
||||
|
||||
if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -96,6 +96,7 @@ BUILD_GTEST := false
|
||||
|
||||
JVM_VARIANTS := server
|
||||
JVM_VARIANT_MAIN := server
|
||||
JVM_FEATURES_server := cds compiler1 compiler2 g1gc serialgc
|
||||
|
||||
# Some users still set EXTRA_*FLAGS on the make command line. Must
|
||||
# make sure to override that when building buildjdk.
|
||||
|
||||
@@ -95,6 +95,9 @@ if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
export HOTSPOT_BUILD_TIME="@HOTSPOT_BUILD_TIME@"
|
||||
export USE_PRECOMPILED_HEADER="@USE_PRECOMPILED_HEADER@"
|
||||
|
||||
# Now locate the main script and run it.
|
||||
REAL_COMPARE_SCRIPT="$TOPDIR/make/scripts/compare.sh"
|
||||
if [ ! -e "$REAL_COMPARE_SCRIPT" ]; then
|
||||
|
||||
@@ -132,29 +132,17 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
|
||||
|
||||
AC_DEFUN([FLAGS_SETUP_WARNINGS],
|
||||
[
|
||||
AC_ARG_ENABLE([warnings-as-errors], [AS_HELP_STRING([--disable-warnings-as-errors],
|
||||
[do not consider native warnings to be an error @<:@enabled@:>@])])
|
||||
|
||||
# Set default value.
|
||||
if test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
WARNINGS_AS_ERRORS=false
|
||||
if test "x$TOOLCHAIN_TYPE" != xxlc; then
|
||||
WARNINGS_AS_ERRORS_DEFAULT=true
|
||||
else
|
||||
WARNINGS_AS_ERRORS=true
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if native warnings are errors])
|
||||
if test "x$enable_warnings_as_errors" = "xyes"; then
|
||||
AC_MSG_RESULT([yes (explicitly set)])
|
||||
WARNINGS_AS_ERRORS=true
|
||||
elif test "x$enable_warnings_as_errors" = "xno"; then
|
||||
AC_MSG_RESULT([no (explicitly set)])
|
||||
WARNINGS_AS_ERRORS=false
|
||||
elif test "x$enable_warnings_as_errors" = "x"; then
|
||||
AC_MSG_RESULT([${WARNINGS_AS_ERRORS} (default)])
|
||||
else
|
||||
AC_MSG_ERROR([--enable-warnings-as-errors accepts no argument])
|
||||
WARNINGS_AS_ERRORS_DEFAULT=false
|
||||
fi
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: warnings-as-errors, DEFAULT: $WARNINGS_AS_ERRORS_DEFAULT,
|
||||
RESULT: WARNINGS_AS_ERRORS,
|
||||
DEFAULT_DESC: [auto],
|
||||
DESC: [consider native warnings to be an error])
|
||||
AC_SUBST(WARNINGS_AS_ERRORS)
|
||||
|
||||
case "${TOOLCHAIN_TYPE}" in
|
||||
|
||||
@@ -116,50 +116,32 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
|
||||
#
|
||||
AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_GTEST],
|
||||
[
|
||||
AC_ARG_ENABLE([hotspot-gtest], [AS_HELP_STRING([--disable-hotspot-gtest],
|
||||
[Disables building of the Hotspot unit tests @<:@enabled@:>@])])
|
||||
|
||||
GTEST_AVAILABLE=true
|
||||
|
||||
AC_MSG_CHECKING([if Hotspot gtest test source is present])
|
||||
if test -e "${TOPDIR}/test/hotspot/gtest"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, cannot run gtest])
|
||||
AC_MSG_RESULT([no, cannot build gtest])
|
||||
GTEST_AVAILABLE=false
|
||||
fi
|
||||
|
||||
# On solaris, we also must have the libstlport.so.1 library, setup in
|
||||
# LIB_SETUP_LIBRARIES.
|
||||
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
if test "x$STLPORT_LIB" = "x"; then
|
||||
AC_MSG_CHECKING([if the libstlport.so.1 library is present])
|
||||
if test "x$STLPORT_LIB" != "x"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, cannot build gtest])
|
||||
GTEST_AVAILABLE=false
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if Hotspot gtest unit tests should be built])
|
||||
if test "x$enable_hotspot_gtest" = "xyes"; then
|
||||
if test "x$GTEST_AVAILABLE" = "xtrue"; then
|
||||
AC_MSG_RESULT([yes, forced])
|
||||
BUILD_GTEST="true"
|
||||
else
|
||||
AC_MSG_ERROR([Cannot build gtest with missing dependencies])
|
||||
fi
|
||||
elif test "x$enable_hotspot_gtest" = "xno"; then
|
||||
AC_MSG_RESULT([no, forced])
|
||||
BUILD_GTEST="false"
|
||||
elif test "x$enable_hotspot_gtest" = "x"; then
|
||||
if test "x$GTEST_AVAILABLE" = "xtrue"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
BUILD_GTEST="true"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
BUILD_GTEST="false"
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([--enable-gtest must be either yes or no])
|
||||
fi
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: hotspot-gtest, DEFAULT: auto,
|
||||
RESULT: BUILD_GTEST, AVAILABLE: $GTEST_AVAILABLE,
|
||||
DEFAULT_DESC: [enabled if possible to build],
|
||||
DESC: [enable building of the Hotspot unit tests])
|
||||
AC_SUBST(BUILD_GTEST)
|
||||
])
|
||||
|
||||
@@ -175,6 +157,15 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_MISC],
|
||||
HOTSPOT_TARGET_CPU_ARCH=zero
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([hotspot-build-time], [AS_HELP_STRING([--with-hotspot-build-time],
|
||||
[timestamp to use in hotspot version string, empty for on-the-fly @<:@empty@:>@])])
|
||||
|
||||
if test "x$with_hotspot_build_time" != x; then
|
||||
HOTSPOT_BUILD_TIME="$with_hotspot_build_time"
|
||||
fi
|
||||
AC_SUBST(HOTSPOT_BUILD_TIME)
|
||||
|
||||
|
||||
# Override hotspot cpu definitions for ARM platforms
|
||||
if test "x$OPENJDK_TARGET_CPU" = xarm; then
|
||||
HOTSPOT_TARGET_CPU=arm_32
|
||||
|
||||
@@ -46,19 +46,17 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VARIANT],
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL],
|
||||
[
|
||||
DEBUG_LEVEL="release"
|
||||
AC_MSG_CHECKING([which debug level to use])
|
||||
AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug],
|
||||
[set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) @<:@disabled@:>@])],
|
||||
[
|
||||
ENABLE_DEBUG="${enableval}"
|
||||
DEBUG_LEVEL="fastdebug"
|
||||
], [ENABLE_DEBUG="no"])
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: debug, DEFAULT: false, RESULT: ENABLE_DEBUG,
|
||||
DESC: [enable debugging (shorthand for --with-debug-level=fastdebug)],
|
||||
IF_ENABLED: [ DEBUG_LEVEL="fastdebug" ])
|
||||
|
||||
AC_MSG_CHECKING([which debug level to use])
|
||||
AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level],
|
||||
[set the debug level (release, fastdebug, slowdebug, optimized) @<:@release@:>@])],
|
||||
[
|
||||
DEBUG_LEVEL="${withval}"
|
||||
if test "x$ENABLE_DEBUG" = xyes; then
|
||||
if test "x$ENABLE_DEBUG" = xtrue; then
|
||||
AC_MSG_ERROR([You cannot use both --enable-debug and --with-debug-level at the same time.])
|
||||
fi
|
||||
])
|
||||
@@ -103,77 +101,42 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL],
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_OPEN_OR_CUSTOM],
|
||||
[
|
||||
AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only],
|
||||
[suppress building custom source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"])
|
||||
|
||||
AC_MSG_CHECKING([if custom source is suppressed (openjdk-only)])
|
||||
AC_MSG_RESULT([$enable_openjdk_only])
|
||||
if test "x$enable_openjdk_only" = "xyes"; then
|
||||
SUPPRESS_CUSTOM_EXTENSIONS="true"
|
||||
elif test "x$enable_openjdk_only" = "xno"; then
|
||||
SUPPRESS_CUSTOM_EXTENSIONS="false"
|
||||
else
|
||||
AC_MSG_ERROR([Invalid value for --enable-openjdk-only: $enable_openjdk_only])
|
||||
fi
|
||||
UTIL_ARG_ENABLE(NAME: openjdk-only, DEFAULT: false,
|
||||
RESULT: SUPPRESS_CUSTOM_EXTENSIONS,
|
||||
DESC: [suppress building custom source even if present],
|
||||
CHECKING_MSG: [if custom source is suppressed (openjdk-only)])
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
|
||||
[
|
||||
# Should we build a JDK without a graphical UI?
|
||||
AC_MSG_CHECKING([headless only])
|
||||
AC_ARG_ENABLE([headless-only], [AS_HELP_STRING([--enable-headless-only],
|
||||
[only build headless (no GUI) support @<:@disabled@:>@])])
|
||||
|
||||
if test "x$enable_headless_only" = "xyes"; then
|
||||
ENABLE_HEADLESS_ONLY="true"
|
||||
AC_MSG_RESULT([yes])
|
||||
elif test "x$enable_headless_only" = "xno"; then
|
||||
ENABLE_HEADLESS_ONLY="false"
|
||||
AC_MSG_RESULT([no])
|
||||
elif test "x$enable_headless_only" = "x"; then
|
||||
ENABLE_HEADLESS_ONLY="false"
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_ERROR([--enable-headless-only can only take yes or no])
|
||||
fi
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: headless-only, DEFAULT: false,
|
||||
RESULT: ENABLE_HEADLESS_ONLY,
|
||||
DESC: [only build headless (no GUI) support],
|
||||
CHECKING_MSG: [if we should build headless-only (no GUI)])
|
||||
AC_SUBST(ENABLE_HEADLESS_ONLY)
|
||||
|
||||
# should we linktime gc unused code sections in the JDK build ?
|
||||
AC_MSG_CHECKING([linktime gc])
|
||||
AC_ARG_ENABLE([linktime-gc], [AS_HELP_STRING([--enable-linktime-gc],
|
||||
[linktime gc unused code sections in the JDK build @<:@disabled@:>@])])
|
||||
|
||||
if test "x$enable_linktime_gc" = "xyes"; then
|
||||
ENABLE_LINKTIME_GC="true"
|
||||
AC_MSG_RESULT([yes])
|
||||
elif test "x$enable_linktime_gc" = "xno"; then
|
||||
ENABLE_LINKTIME_GC="false"
|
||||
AC_MSG_RESULT([no])
|
||||
elif test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = xs390x; then
|
||||
ENABLE_LINKTIME_GC="true"
|
||||
AC_MSG_RESULT([yes])
|
||||
elif test "x$enable_linktime_gc" = "x"; then
|
||||
ENABLE_LINKTIME_GC="false"
|
||||
AC_MSG_RESULT([no])
|
||||
if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = xs390x; then
|
||||
LINKTIME_GC_DEFAULT=true
|
||||
else
|
||||
AC_MSG_ERROR([--enable-linktime-gc can only take yes or no])
|
||||
LINKTIME_GC_DEFAULT=false
|
||||
fi
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: linktime-gc, DEFAULT: $LINKTIME_GC_DEFAULT,
|
||||
DEFAULT_DESC: [auto], RESULT: ENABLE_LINKTIME_GC,
|
||||
DESC: [use link time gc on unused code sections in the JDK build],
|
||||
CHECKING_MSG: [if linker should clean out unused code (linktime-gc)])
|
||||
AC_SUBST(ENABLE_LINKTIME_GC)
|
||||
|
||||
|
||||
# Should we build the complete docs, or just a lightweight version?
|
||||
AC_ARG_ENABLE([full-docs], [AS_HELP_STRING([--enable-full-docs],
|
||||
[build complete documentation @<:@enabled if all tools found@:>@])])
|
||||
|
||||
# Verify dependencies
|
||||
# Check for full doc dependencies
|
||||
FULL_DOCS_AVAILABLE=true
|
||||
AC_MSG_CHECKING([for graphviz dot])
|
||||
if test "x$DOT" != "x"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, cannot generate full docs])
|
||||
FULL_DOCS_DEP_MISSING=true
|
||||
FULL_DOCS_AVAILABLE=false
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for pandoc])
|
||||
@@ -181,35 +144,13 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, cannot generate full docs])
|
||||
FULL_DOCS_DEP_MISSING=true
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([full docs])
|
||||
if test "x$enable_full_docs" = xyes; then
|
||||
if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
|
||||
AC_MSG_RESULT([no, missing dependencies])
|
||||
HELP_MSG_MISSING_DEPENDENCY([dot])
|
||||
AC_MSG_ERROR([Cannot enable full docs with missing dependencies. See above. $HELP_MSG])
|
||||
else
|
||||
ENABLE_FULL_DOCS=true
|
||||
AC_MSG_RESULT([yes, forced])
|
||||
fi
|
||||
elif test "x$enable_full_docs" = xno; then
|
||||
ENABLE_FULL_DOCS=false
|
||||
AC_MSG_RESULT([no, forced])
|
||||
elif test "x$enable_full_docs" = x; then
|
||||
# Check for prerequisites
|
||||
if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
|
||||
ENABLE_FULL_DOCS=false
|
||||
AC_MSG_RESULT([no, missing dependencies])
|
||||
else
|
||||
ENABLE_FULL_DOCS=true
|
||||
AC_MSG_RESULT([yes, dependencies present])
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([--enable-full-docs can only take yes or no])
|
||||
FULL_DOCS_AVAILABLE=false
|
||||
fi
|
||||
|
||||
# Should we build the complete docs, or just a lightweight version?
|
||||
UTIL_ARG_ENABLE(NAME: full-docs, DEFAULT: auto, RESULT: ENABLE_FULL_DOCS,
|
||||
AVAILABLE: $FULL_DOCS_AVAILABLE, DESC: [build complete documentation],
|
||||
DEFAULT_DESC: [enabled if all tools found])
|
||||
AC_SUBST(ENABLE_FULL_DOCS)
|
||||
|
||||
# Choose cacerts source file
|
||||
@@ -229,14 +170,8 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
|
||||
AC_SUBST(CACERTS_FILE)
|
||||
|
||||
# Enable or disable unlimited crypto
|
||||
AC_ARG_ENABLE(unlimited-crypto, [AS_HELP_STRING([--disable-unlimited-crypto],
|
||||
[Disable unlimited crypto policy @<:@enabled@:>@])],,
|
||||
[enable_unlimited_crypto=yes])
|
||||
if test "x$enable_unlimited_crypto" = "xyes"; then
|
||||
UNLIMITED_CRYPTO=true
|
||||
else
|
||||
UNLIMITED_CRYPTO=false
|
||||
fi
|
||||
UTIL_ARG_ENABLE(NAME: unlimited-crypto, DEFAULT: true, RESULT: UNLIMITED_CRYPTO,
|
||||
DESC: [enable unlimited crypto policy])
|
||||
AC_SUBST(UNLIMITED_CRYPTO)
|
||||
|
||||
# Should we build the serviceability agent (SA)?
|
||||
@@ -422,14 +357,19 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_CODE_COVERAGE],
|
||||
[
|
||||
AC_ARG_ENABLE(native-coverage, [AS_HELP_STRING([--enable-native-coverage],
|
||||
[enable native compilation with code coverage data@<:@disabled@:>@])])
|
||||
GCOV_ENABLED="false"
|
||||
if test "x$enable_native_coverage" = "xyes"; then
|
||||
case $TOOLCHAIN_TYPE in
|
||||
gcc | clang)
|
||||
AC_MSG_CHECKING([if native coverage is enabled])
|
||||
AC_MSG_RESULT([yes])
|
||||
UTIL_ARG_ENABLE(NAME: native-coverage, DEFAULT: false, RESULT: GCOV_ENABLED,
|
||||
DESC: [enable native compilation with code coverage data],
|
||||
CHECK_AVAILABLE: [
|
||||
AC_MSG_CHECKING([if native coverage is available])
|
||||
if test "x$TOOLCHAIN_TYPE" = "xgcc" ||
|
||||
test "x$TOOLCHAIN_TYPE" = "xclang"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AVAILABLE=false
|
||||
fi
|
||||
],
|
||||
IF_ENABLED: [
|
||||
GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
|
||||
GCOV_LDFLAGS="-fprofile-arcs"
|
||||
JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
|
||||
@@ -440,18 +380,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_CODE_COVERAGE],
|
||||
CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
|
||||
LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
|
||||
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
|
||||
GCOV_ENABLED="true"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([--enable-native-coverage only works with toolchain type gcc or clang])
|
||||
;;
|
||||
esac
|
||||
elif test "x$enable_native_coverage" = "xno"; then
|
||||
AC_MSG_CHECKING([if native coverage is enabled])
|
||||
AC_MSG_RESULT([no])
|
||||
elif test "x$enable_native_coverage" != "x"; then
|
||||
AC_MSG_ERROR([--enable-native-coverage can only be assigned "yes" or "no"])
|
||||
fi
|
||||
])
|
||||
AC_SUBST(GCOV_ENABLED)
|
||||
|
||||
AC_ARG_WITH(jcov, [AS_HELP_STRING([--with-jcov],
|
||||
@@ -498,14 +427,19 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_CODE_COVERAGE],
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
|
||||
[
|
||||
AC_ARG_ENABLE(asan, [AS_HELP_STRING([--enable-asan],
|
||||
[enable AddressSanitizer if possible @<:@disabled@:>@])])
|
||||
ASAN_ENABLED="no"
|
||||
if test "x$enable_asan" = "xyes"; then
|
||||
case $TOOLCHAIN_TYPE in
|
||||
gcc | clang)
|
||||
AC_MSG_CHECKING([if asan is enabled])
|
||||
AC_MSG_RESULT([yes])
|
||||
UTIL_ARG_ENABLE(NAME: asan, DEFAULT: false,
|
||||
DESC: [enable AddressSanitizer],
|
||||
CHECK_AVAILABLE: [
|
||||
AC_MSG_CHECKING([if AddressSanitizer (asan) is available])
|
||||
if test "x$TOOLCHAIN_TYPE" = "xgcc" ||
|
||||
test "x$TOOLCHAIN_TYPE" = "xclang"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AVAILABLE=false
|
||||
fi
|
||||
],
|
||||
IF_ENABLED: [
|
||||
ASAN_CFLAGS="-fsanitize=address -fno-omit-frame-pointer"
|
||||
ASAN_LDFLAGS="-fsanitize=address"
|
||||
JVM_CFLAGS="$JVM_CFLAGS $ASAN_CFLAGS"
|
||||
@@ -517,17 +451,10 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
|
||||
LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $ASAN_LDFLAGS"
|
||||
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $ASAN_LDFLAGS"
|
||||
ASAN_ENABLED="yes"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([--enable-asan only works with toolchain type gcc or clang])
|
||||
;;
|
||||
esac
|
||||
elif test "x$enable_asan" = "xno"; then
|
||||
AC_MSG_CHECKING([if asan is enabled])
|
||||
AC_MSG_RESULT([no])
|
||||
elif test "x$enable_asan" != "x"; then
|
||||
AC_MSG_ERROR([--enable-asan can only be assigned "yes" or "no"])
|
||||
fi
|
||||
],
|
||||
IF_DISABLED: [
|
||||
ASAN_ENABLED="no"
|
||||
])
|
||||
|
||||
AC_SUBST(ASAN_ENABLED)
|
||||
])
|
||||
@@ -539,26 +466,23 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_STATIC_BUILD],
|
||||
[
|
||||
AC_ARG_ENABLE([static-build], [AS_HELP_STRING([--enable-static-build],
|
||||
[enable static library build @<:@disabled@:>@])])
|
||||
STATIC_BUILD=false
|
||||
if test "x$enable_static_build" = "xyes"; then
|
||||
AC_MSG_CHECKING([if static build is enabled])
|
||||
AC_MSG_RESULT([yes])
|
||||
if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
|
||||
AC_MSG_ERROR([--enable-static-build is only supported for macosx builds])
|
||||
fi
|
||||
STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
|
||||
CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
|
||||
CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
|
||||
STATIC_BUILD=true
|
||||
elif test "x$enable_static_build" = "xno"; then
|
||||
AC_MSG_CHECKING([if static build is enabled])
|
||||
AC_MSG_RESULT([no])
|
||||
elif test "x$enable_static_build" != "x"; then
|
||||
AC_MSG_ERROR([--enable-static-build can only be assigned "yes" or "no"])
|
||||
fi
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: static-build, DEFAULT: false, RESULT: STATIC_BUILD,
|
||||
DESC: [enable static library build],
|
||||
CHECKING_MSG: [if static build is enabled],
|
||||
CHECK_AVAILABLE: [
|
||||
AC_MSG_CHECKING([if static build is available])
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AVAILABLE=false
|
||||
fi
|
||||
],
|
||||
IF_ENABLED: [
|
||||
STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
|
||||
CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
|
||||
CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
|
||||
])
|
||||
AC_SUBST(STATIC_BUILD)
|
||||
])
|
||||
|
||||
@@ -569,24 +493,10 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_STATIC_BUILD],
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_JLINK_OPTIONS],
|
||||
[
|
||||
AC_ARG_ENABLE([keep-packaged-modules], [AS_HELP_STRING([--disable-keep-packaged-modules],
|
||||
[Do not keep packaged modules in jdk image @<:@enable@:>@])])
|
||||
|
||||
AC_MSG_CHECKING([if packaged modules are kept])
|
||||
if test "x$enable_keep_packaged_modules" = "xyes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
JLINK_KEEP_PACKAGED_MODULES=true
|
||||
elif test "x$enable_keep_packaged_modules" = "xno"; then
|
||||
AC_MSG_RESULT([no])
|
||||
JLINK_KEEP_PACKAGED_MODULES=false
|
||||
elif test "x$enable_keep_packaged_modules" = "x"; then
|
||||
AC_MSG_RESULT([yes (default)])
|
||||
JLINK_KEEP_PACKAGED_MODULES=true
|
||||
else
|
||||
AC_MSG_RESULT([error])
|
||||
AC_MSG_ERROR([--enable-keep-packaged-modules accepts no argument])
|
||||
fi
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: keep-packaged-modules, DEFAULT: true,
|
||||
RESULT: JLINK_KEEP_PACKAGED_MODULES,
|
||||
DESC: [enable keeping of packaged modules in jdk image],
|
||||
CHECKING_MSG: [if packaged modules are kept])
|
||||
AC_SUBST(JLINK_KEEP_PACKAGED_MODULES)
|
||||
])
|
||||
|
||||
@@ -596,36 +506,20 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JLINK_OPTIONS],
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER],
|
||||
[
|
||||
AC_ARG_ENABLE([jtreg-failure-handler], [AS_HELP_STRING([--enable-jtreg-failure-handler],
|
||||
[forces build of the jtreg failure handler to be enabled, missing dependencies
|
||||
become fatal errors. Default is auto, where the failure handler is built if all
|
||||
dependencies are present and otherwise just disabled.])])
|
||||
|
||||
AC_MSG_CHECKING([if jtreg failure handler should be built])
|
||||
|
||||
if test "x$enable_jtreg_failure_handler" = "xyes"; then
|
||||
if test "x$JT_HOME" = "x"; then
|
||||
AC_MSG_ERROR([Cannot enable jtreg failure handler without jtreg.])
|
||||
else
|
||||
BUILD_FAILURE_HANDLER=true
|
||||
AC_MSG_RESULT([yes, forced])
|
||||
fi
|
||||
elif test "x$enable_jtreg_failure_handler" = "xno"; then
|
||||
BUILD_FAILURE_HANDLER=false
|
||||
AC_MSG_RESULT([no, forced])
|
||||
elif test "x$enable_jtreg_failure_handler" = "xauto" \
|
||||
|| test "x$enable_jtreg_failure_handler" = "x"; then
|
||||
if test "x$JT_HOME" = "x"; then
|
||||
BUILD_FAILURE_HANDLER=false
|
||||
AC_MSG_RESULT([no, missing jtreg])
|
||||
else
|
||||
BUILD_FAILURE_HANDLER=true
|
||||
AC_MSG_RESULT([yes, jtreg present])
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler])
|
||||
fi
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: jtreg-failure-handler, DEFAULT: auto,
|
||||
RESULT: BUILD_FAILURE_HANDLER,
|
||||
DESC: [enable keeping of packaged modules in jdk image],
|
||||
DEFAULT_DESC: [enabled if jtreg is present],
|
||||
CHECKING_MSG: [if the jtreg failure handler should be built],
|
||||
CHECK_AVAILABLE: [
|
||||
AC_MSG_CHECKING([if the jtreg failure handler is available])
|
||||
if test "x$JT_HOME" != "x"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AVAILABLE=false
|
||||
AC_MSG_RESULT([no (jtreg not present)])
|
||||
fi
|
||||
])
|
||||
AC_SUBST(BUILD_FAILURE_HANDLER)
|
||||
])
|
||||
|
||||
@@ -635,39 +529,14 @@ AC_DEFUN_ONCE([JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER],
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST],
|
||||
[
|
||||
AC_ARG_ENABLE([generate-classlist], [AS_HELP_STRING([--disable-generate-classlist],
|
||||
[forces enabling or disabling of the generation of a CDS classlist at build time.
|
||||
Default is to generate it when either the server or client JVMs are built and
|
||||
enable-cds is true.])])
|
||||
|
||||
# In jvm-features.m4 ENABLE_CDS is set to true iff all JVM variants has cds
|
||||
# enabled.
|
||||
|
||||
AC_MSG_CHECKING([if the CDS classlist generation should be enabled])
|
||||
if test "x$enable_generate_classlist" = "xyes"; then
|
||||
AC_MSG_RESULT([yes, forced])
|
||||
ENABLE_GENERATE_CLASSLIST="true"
|
||||
if test "x$ENABLE_CDS" = "xfalse"; then
|
||||
# In GenerateLinkOptData.gmk, DumpLoadedClassList is used to generate the
|
||||
# classlist file. It never will work in this case since the VM will report
|
||||
# an error for DumpLoadedClassList when CDS is disabled.
|
||||
AC_MSG_ERROR([Generation of classlist is not possible without JVM feature 'cds'])
|
||||
fi
|
||||
elif test "x$enable_generate_classlist" = "xno"; then
|
||||
AC_MSG_RESULT([no, forced])
|
||||
ENABLE_GENERATE_CLASSLIST="false"
|
||||
elif test "x$enable_generate_classlist" = "x"; then
|
||||
if test "x$ENABLE_CDS" = "xtrue"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
ENABLE_GENERATE_CLASSLIST="true"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
ENABLE_GENERATE_CLASSLIST="false"
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([Invalid value for --enable-generate-classlist: $enable_generate_classlist])
|
||||
fi
|
||||
|
||||
# In GenerateLinkOptData.gmk, DumpLoadedClassList is used to generate the
|
||||
# classlist file. It never will work if CDS is disabled, since the VM will report
|
||||
# an error for DumpLoadedClassList.
|
||||
UTIL_ARG_ENABLE(NAME: generate-classlist, DEFAULT: auto,
|
||||
RESULT: ENABLE_GENERATE_CLASSLIST, AVAILABLE: $ENABLE_CDS,
|
||||
DESC: [enable generation of a CDS classlist at build time],
|
||||
DEFAULT_DESC: [enabled if the JVM feature 'cds' is enabled for all JVM variants],
|
||||
CHECKING_MSG: [if the CDS classlist generation should be enabled])
|
||||
AC_SUBST(ENABLE_GENERATE_CLASSLIST)
|
||||
])
|
||||
|
||||
@@ -699,56 +568,33 @@ AC_DEFUN([JDKOPT_EXCLUDE_TRANSLATIONS],
|
||||
#
|
||||
AC_DEFUN([JDKOPT_ENABLE_DISABLE_MANPAGES],
|
||||
[
|
||||
AC_ARG_ENABLE([manpages], [AS_HELP_STRING([--disable-manpages],
|
||||
[Set to disable copy of static man pages @<:@enabled@:>@])])
|
||||
|
||||
BUILD_MANPAGES="true"
|
||||
AC_MSG_CHECKING([if static man pages should be copied])
|
||||
if test "x$enable_manpages" = "x"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
elif test "x$enable_manpages" = "xyes"; then
|
||||
AC_MSG_RESULT([yes, forced])
|
||||
elif test "x$enable_manpages" = "xno"; then
|
||||
AC_MSG_RESULT([no, forced])
|
||||
BUILD_MANPAGES="false"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([--enable-manpages can only yes/no or empty])
|
||||
fi
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: manpages, DEFAULT: true, RESULT: BUILD_MANPAGES,
|
||||
DESC: [enable copying of static man pages],
|
||||
CHECKING_MSG: [if static man pages should be copied])
|
||||
AC_SUBST(BUILD_MANPAGES)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Disable the default CDS archive generation
|
||||
# cross compilation - disabled
|
||||
#
|
||||
AC_DEFUN([JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE],
|
||||
[
|
||||
AC_ARG_ENABLE([cds-archive], [AS_HELP_STRING([--disable-cds-archive],
|
||||
[Set to disable generation of a default CDS archive in the product image @<:@enabled@:>@])])
|
||||
|
||||
AC_MSG_CHECKING([if a default CDS archive should be generated])
|
||||
if test "x$ENABLE_CDS" = "xfalse"; then
|
||||
AC_MSG_RESULT([no, because CDS is disabled])
|
||||
BUILD_CDS_ARCHIVE="false"
|
||||
elif test "x$COMPILE_TYPE" = "xcross"; then
|
||||
AC_MSG_RESULT([no, not possible with cross compilation])
|
||||
BUILD_CDS_ARCHIVE="false"
|
||||
elif test "x$enable_cds_archive" = "xyes"; then
|
||||
AC_MSG_RESULT([yes, forced])
|
||||
BUILD_CDS_ARCHIVE="true"
|
||||
elif test "x$enable_cds_archive" = "x"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
BUILD_CDS_ARCHIVE="true"
|
||||
elif test "x$enable_cds_archive" = "xno"; then
|
||||
AC_MSG_RESULT([no, forced])
|
||||
BUILD_CDS_ARCHIVE="false"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([--enable-cds_archive can only be yes/no or empty])
|
||||
fi
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: cds-archive, DEFAULT: auto, RESULT: BUILD_CDS_ARCHIVE,
|
||||
DESC: [enable generation of a default CDS archive in the product image],
|
||||
DEFAULT_DESC: [enabled if possible],
|
||||
CHECKING_MSG: [if a default CDS archive should be generated],
|
||||
CHECK_AVAILABLE: [
|
||||
AC_MSG_CHECKING([if CDS archive is available])
|
||||
if test "x$ENABLE_CDS" = "xfalse"; then
|
||||
AC_MSG_RESULT([no (CDS is disabled)])
|
||||
AVAILABLE=false
|
||||
elif test "x$COMPILE_TYPE" = "xcross"; then
|
||||
AC_MSG_RESULT([no (not possible with cross compilation)])
|
||||
AVAILABLE=false
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
])
|
||||
AC_SUBST(BUILD_CDS_ARCHIVE)
|
||||
])
|
||||
|
||||
@@ -171,12 +171,14 @@ AC_DEFUN_ONCE([JVM_FEATURES_PARSE_OPTIONS],
|
||||
m4_undefine([FEATURE_SHELL])
|
||||
])
|
||||
|
||||
# Warn if the user has both enabled and disabled a feature
|
||||
# If this happens, disable will override enable.
|
||||
# Check if the user has both enabled and disabled a feature
|
||||
UTIL_GET_MATCHING_VALUES(enabled_and_disabled, $JVM_FEATURES_ENABLED, \
|
||||
$JVM_FEATURES_DISABLED)
|
||||
if test "x$enabled_and_disabled" != x; then
|
||||
AC_MSG_WARN([Disabling of these features will override enabling: '$enabled_and_disabled'])
|
||||
AC_MSG_NOTICE([These feature are both enabled and disabled: '$enabled_and_disabled'])
|
||||
AC_MSG_NOTICE([This can happen if you mix --with-jvm-features and --enable-jvm-feature-*])
|
||||
AC_MSG_NOTICE([The recommendation is to only use --enable-jvm-feature-*])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
# Clean up lists and announce results to user
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -28,6 +28,10 @@
|
||||
################################################################################
|
||||
AC_DEFUN_ONCE([LIB_SETUP_LIBFFI],
|
||||
[
|
||||
UTIL_ARG_ENABLE(NAME: libffi-bundling, DEFAULT: false,
|
||||
RESULT: ENABLE_LIBFFI_BUNDLING,
|
||||
DESC: [enable bundling of libffi.so to make the built JDK runnable on more systems])
|
||||
|
||||
AC_ARG_WITH(libffi, [AS_HELP_STRING([--with-libffi],
|
||||
[specify prefix directory for the libffi package
|
||||
(expecting the libraries under PATH/lib and the headers under PATH/include)])])
|
||||
@@ -35,8 +39,6 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBFFI],
|
||||
[specify directory for the libffi include files])])
|
||||
AC_ARG_WITH(libffi-lib, [AS_HELP_STRING([--with-libffi-lib],
|
||||
[specify directory for the libffi library])])
|
||||
AC_ARG_ENABLE(libffi-bundling, [AS_HELP_STRING([--enable-libffi-bundling],
|
||||
[enable bundling of libffi.so to make the built JDK runnable on more systems])])
|
||||
|
||||
if test "x$NEEDS_LIB_FFI" = xfalse; then
|
||||
if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
|
||||
@@ -114,20 +116,6 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBFFI],
|
||||
AC_MSG_ERROR([Found libffi but could not link and compile with it. $HELP_MSG])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if libffi should be bundled])
|
||||
if test "x$enable_libffi_bundling" = "x"; then
|
||||
AC_MSG_RESULT([no])
|
||||
ENABLE_LIBFFI_BUNDLING=false
|
||||
elif test "x$enable_libffi_bundling" = "xno"; then
|
||||
AC_MSG_RESULT([no, forced])
|
||||
ENABLE_LIBFFI_BUNDLING=false
|
||||
elif test "x$enable_libffi_bundling" = "xyes"; then
|
||||
AC_MSG_RESULT([yes, forced])
|
||||
ENABLE_LIBFFI_BUNDLING=true
|
||||
else
|
||||
AC_MSG_ERROR([Invalid value for --enable-libffi-bundling])
|
||||
fi
|
||||
|
||||
# Find the libffi.so.X to bundle
|
||||
if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
|
||||
AC_MSG_CHECKING([for libffi lib file location])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -563,11 +563,14 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET],
|
||||
|
||||
AC_DEFUN([PLATFORM_CHECK_DEPRECATION],
|
||||
[
|
||||
AC_ARG_ENABLE(deprecated-ports, [AS_HELP_STRING([--enable-deprecated-ports@<:@=yes/no@:>@],
|
||||
[Suppress the error when configuring for a deprecated port @<:@no@:>@])])
|
||||
UTIL_ARG_ENABLE(NAME: deprecated-ports, DEFAULT: false,
|
||||
RESULT: ENABLE_DEPRECATED_PORTS,
|
||||
DESC: [suppress the error when configuring for a deprecated port])
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris || (test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc && test "x$with_jvm_variants" != xzero); then
|
||||
if test "x$enable_deprecated_ports" = "xyes"; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris || \
|
||||
(test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc && \
|
||||
test "x$with_jvm_variants" != xzero); then
|
||||
if test "x$ENABLE_DEPRECATED_PORTS" = "xtrue"; then
|
||||
AC_MSG_WARN([The Solaris and SPARC ports are deprecated and may be removed in a future release.])
|
||||
else
|
||||
AC_MSG_ERROR(m4_normalize([The Solaris and SPARC ports are deprecated and may be removed in a
|
||||
|
||||
@@ -156,6 +156,7 @@ IMPORT_MODULES_SRC:=@IMPORT_MODULES_SRC@
|
||||
IMPORT_MODULES_MAKE:=@IMPORT_MODULES_MAKE@
|
||||
|
||||
COPYRIGHT_YEAR:=@COPYRIGHT_YEAR@
|
||||
HOTSPOT_BUILD_TIME:=@HOTSPOT_BUILD_TIME@
|
||||
|
||||
# Platform naming variables
|
||||
LAUNCHER_NAME:=@LAUNCHER_NAME@
|
||||
@@ -656,7 +657,7 @@ BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
|
||||
BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
|
||||
BUILD_JAR=@FIXPATH@ $(BUILD_JDK)/bin/jar
|
||||
|
||||
# Interim langtools and rmic modules and arguments
|
||||
# Interim langtools modules and arguments
|
||||
INTERIM_LANGTOOLS_BASE_MODULES := java.compiler jdk.compiler jdk.javadoc
|
||||
INTERIM_LANGTOOLS_MODULES := $(addsuffix .interim, $(INTERIM_LANGTOOLS_BASE_MODULES))
|
||||
INTERIM_LANGTOOLS_ADD_EXPORTS := \
|
||||
@@ -675,15 +676,6 @@ INTERIM_LANGTOOLS_ARGS := \
|
||||
JAVAC_MAIN_CLASS = -m jdk.compiler.interim/com.sun.tools.javac.Main
|
||||
JAVADOC_MAIN_CLASS = -m jdk.javadoc.interim/jdk.javadoc.internal.tool.Main
|
||||
|
||||
INTERIM_RMIC_BASE_MODULES := jdk.rmic
|
||||
INTERIM_RMIC_MODULES := $(addsuffix .interim, $(INTERIM_RMIC_BASE_MODULES))
|
||||
#
|
||||
# Use = to delay expansion of PathList since it's not available in this file.
|
||||
INTERIM_RMIC_ARGS = --limit-modules java.base,jdk.compiler,jdk.javadoc \
|
||||
--module-path $(call PathList, $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_modules \
|
||||
$(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules) \
|
||||
#
|
||||
|
||||
# You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ...
|
||||
# Use = assignment to be able to override in bootcycle-spec.gmk
|
||||
NEW_JAVAC = $(INTERIM_LANGTOOLS_ARGS) $(JAVAC_MAIN_CLASS)
|
||||
|
||||
@@ -53,7 +53,7 @@ m4_include([util_windows.m4])
|
||||
AC_DEFUN([UTIL_DEFUN_NAMED],
|
||||
[
|
||||
AC_DEFUN($1, [
|
||||
m4_foreach(arg, m4_split($2), [
|
||||
m4_foreach(arg, m4_split(m4_normalize($2)), [
|
||||
m4_if(m4_bregexp(arg, [^\*]), -1,
|
||||
[
|
||||
m4_set_add(legal_named_args, arg)
|
||||
@@ -66,11 +66,12 @@ AC_DEFUN([UTIL_DEFUN_NAMED],
|
||||
])
|
||||
|
||||
m4_foreach([arg], [$3], [
|
||||
m4_if(m4_bregexp(arg, [: ]), -1, m4_define([arg], m4_bpatsubst(arg, [:], [: ])))
|
||||
m4_define(arg_name, m4_substr(arg, 0, m4_bregexp(arg, [: ])))
|
||||
m4_set_contains(legal_named_args, arg_name, [],[AC_MSG_ERROR([Internal error: arg_name is not a valid named argument to [$1]. Valid arguments are 'm4_set_contents(legal_named_args, [ ])'.])])
|
||||
m4_set_contains(legal_named_args, arg_name, [],[AC_MSG_ERROR([Internal error: m4_if(arg_name, , arg, arg_name) is not a valid named argument to [$1]. Valid arguments are 'm4_set_contents(defined_args, [ ]) m4_set_contents(legal_named_args, [ ])'.])])
|
||||
m4_set_remove(required_named_args, arg_name)
|
||||
m4_set_remove(legal_named_args, arg_name)
|
||||
m4_pushdef([ARG_][]arg_name, m4_substr(arg, m4_incr(m4_incr(m4_bregexp(arg, [: ])))))
|
||||
m4_pushdef([ARG_][]arg_name, m4_bpatsubst(m4_substr(arg, m4_incr(m4_incr(m4_bregexp(arg, [: ])))), [^\s*], []))
|
||||
m4_set_add(defined_args, arg_name)
|
||||
m4_undefine([arg_name])
|
||||
])
|
||||
@@ -95,6 +96,27 @@ AC_DEFUN([UTIL_DEFUN_NAMED],
|
||||
])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Assert that a programmatic condition holds. If not, exit with an error message.
|
||||
# Check that a shell expression gives return code 0
|
||||
#
|
||||
# $1: The shell expression to evaluate
|
||||
# $2: A message to describe the expression in case of failure
|
||||
# $2: An message to print in case of failure [optional]
|
||||
#
|
||||
AC_DEFUN([UTIL_ASSERT_SHELL_TEST],
|
||||
[
|
||||
ASSERTION_MSG="m4_normalize([$3])"
|
||||
if $1; then
|
||||
$ECHO Assertion failed: $2
|
||||
if test "x$3" != x; then
|
||||
$ECHO Assertion message: "$3"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Assert that a programmatic condition holds. If not, exit with an error message.
|
||||
# Check that two strings are equal.
|
||||
@@ -105,15 +127,50 @@ AC_DEFUN([UTIL_DEFUN_NAMED],
|
||||
#
|
||||
AC_DEFUN([UTIL_ASSERT_STRING_EQUALS],
|
||||
[
|
||||
ASSERTION_MSG="m4_normalize([$3])"
|
||||
if test "x[$1]" != "x[$2]"; then
|
||||
$ECHO Assertion failed: Actual value '[$1]' \("[$1]"\) did not match \
|
||||
expected value '[$2]' \("[$2]"\)
|
||||
if test "x$ASSERTION_MSG" != x; then
|
||||
$ECHO Assertion message: "$ASSERTION_MSG"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
UTIL_ASSERT_SHELL_TEST(
|
||||
[test "x[$1]" != "x[$2]"],
|
||||
[Actual value '[$1]' \("[$1]"\) did not match expected value '[$2]' \("[$2]"\)],
|
||||
$3)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Assert that a programmatic condition holds. If not, exit with an error message.
|
||||
# Check that two strings not are equal.
|
||||
#
|
||||
# $1: The actual string found
|
||||
# $2: The expected string
|
||||
# $3: An message to print in case of failure [optional]
|
||||
#
|
||||
AC_DEFUN([UTIL_ASSERT_STRING_NOT_EQUALS],
|
||||
[
|
||||
UTIL_ASSERT_SHELL_TEST(
|
||||
[test "x[$1]" = "x[$2]"],
|
||||
[Actual value '[$1]' \("[$1]"\) unexpectedly matched '[$2]' \("[$2]"\)],
|
||||
$3)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Assert that a programmatic condition holds. If not, exit with an error message.
|
||||
# Check that the given expression evaluates to the string 'true'
|
||||
#
|
||||
# $1: The expression to evaluate
|
||||
# $2: An message to print in case of failure [optional]
|
||||
#
|
||||
AC_DEFUN([UTIL_ASSERT_TRUE],
|
||||
[
|
||||
UTIL_ASSERT_STRING_EQUALS($1, true, $3)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Assert that a programmatic condition holds. If not, exit with an error message.
|
||||
# Check that the given expression does not evaluate to the string 'true'
|
||||
#
|
||||
# $1: The expression to evaluate
|
||||
# $2: An message to print in case of failure [optional]
|
||||
#
|
||||
AC_DEFUN([UTIL_ASSERT_NOT_TRUE],
|
||||
[
|
||||
UTIL_ASSERT_STRING_NOT_EQUALS($1, true, $3)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
@@ -218,20 +275,11 @@ AC_DEFUN([UTIL_DEPRECATED_ARG_WITH],
|
||||
###############################################################################
|
||||
# Register a --enable argument but mark it as deprecated
|
||||
# $1: The name of the with argument to deprecate, not including --enable-
|
||||
# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
|
||||
# $3: Messages to user.
|
||||
AC_DEFUN([UTIL_DEPRECATED_ARG_ENABLE],
|
||||
[
|
||||
AC_ARG_ENABLE($1, [AS_HELP_STRING([--enable-$1],
|
||||
[Deprecated. Option is kept for backwards compatibility and is ignored])])
|
||||
if test "x$enable_$2" != x; then
|
||||
AC_MSG_WARN([Option --enable-$1 is deprecated and will be ignored.])
|
||||
|
||||
if test "x$3" != x; then
|
||||
AC_MSG_WARN([$3])
|
||||
fi
|
||||
|
||||
fi
|
||||
[Deprecated. Option is kept for backwards compatibility and is ignored])],
|
||||
[AC_MSG_WARN([Option --enable-$1 is deprecated and will be ignored.])])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
@@ -249,6 +297,143 @@ AC_DEFUN([UTIL_ALIASED_ARG_ENABLE],
|
||||
])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Creates a command-line option using the --enable-* pattern. Will return a
|
||||
# value of 'true' or 'false' in the RESULT variable, depending on whether the
|
||||
# option was enabled or not by the user. The option can not be turned on if it
|
||||
# is not available, as specified by AVAILABLE and/or AVAILABLE_CHECK.
|
||||
#
|
||||
# Arguments:
|
||||
# NAME: The base name of this option (i.e. what follows --enable-). Required.
|
||||
# RESULT: The name of the variable to set to the result. Defaults to
|
||||
# <NAME in uppercase>_RESULT.
|
||||
# DEFAULT: The default value for this option. Can be true, false or auto.
|
||||
# Defaults to true.
|
||||
# AVAILABLE: If true, this option is allowed to be selected. Defaults to true.
|
||||
# DESC: A description of this option. Defaults to a generic and unhelpful
|
||||
# string.
|
||||
# DEFAULT_DESC: A message describing the default value, for the help. Defaults
|
||||
# to the literal value of DEFAULT.
|
||||
# CHECKING_MSG: The message to present to user when checking this option.
|
||||
# Defaults to a generic message.
|
||||
# CHECK_AVAILABLE: An optional code block to execute to determine if the
|
||||
# option should be available. Must set AVAILABLE to 'false' if not.
|
||||
# IF_GIVEN: An optional code block to execute if the option was given on the
|
||||
# command line (regardless of the value).
|
||||
# IF_ENABLED: An optional code block to execute if the option is turned on.
|
||||
# IF_DISABLED: An optional code block to execute if the option is turned off.
|
||||
#
|
||||
UTIL_DEFUN_NAMED([UTIL_ARG_ENABLE],
|
||||
[*NAME RESULT DEFAULT AVAILABLE DESC DEFAULT_DESC CHECKING_MSG
|
||||
CHECK_AVAILABLE IF_GIVEN IF_ENABLED IF_DISABLED], [$@],
|
||||
[
|
||||
##########################
|
||||
# Part 1: Set up m4 macros
|
||||
##########################
|
||||
|
||||
# If DEFAULT is not specified, set it to 'true'.
|
||||
m4_define([ARG_DEFAULT], m4_if(ARG_DEFAULT, , true, ARG_DEFAULT))
|
||||
|
||||
# If AVAILABLE is not specified, set it to 'true'.
|
||||
m4_define([ARG_AVAILABLE], m4_if(ARG_AVAILABLE, , true, ARG_AVAILABLE))
|
||||
|
||||
# If DEFAULT_DESC is not specified, calculate it from DEFAULT.
|
||||
m4_define([ARG_DEFAULT_DESC], m4_if(ARG_DEFAULT_DESC, , m4_if(ARG_DEFAULT, true, enabled, m4_if(ARG_DEFAULT, false, disabled, ARG_DEFAULT)), ARG_DEFAULT_DESC))
|
||||
|
||||
# If RESULT is not specified, set it to 'ARG_NAME[_ENABLED]'.
|
||||
m4_define([ARG_RESULT], m4_if(ARG_RESULT, , m4_translit(ARG_NAME, [a-z-], [A-Z_])[_ENABLED], ARG_RESULT))
|
||||
# Construct shell variable names for the option
|
||||
m4_define(ARG_OPTION, [enable_]m4_translit(ARG_NAME, [-], [_]))
|
||||
m4_define(ARG_GIVEN, m4_translit(ARG_NAME, [a-z-], [A-Z_])[_GIVEN])
|
||||
|
||||
# If DESC is not specified, set it to a generic description.
|
||||
m4_define([ARG_DESC], m4_if(ARG_DESC, , [Enable the ARG_NAME feature], m4_normalize(ARG_DESC)))
|
||||
|
||||
# If CHECKING_MSG is not specified, set it to a generic description.
|
||||
m4_define([ARG_CHECKING_MSG], m4_if(ARG_CHECKING_MSG, , [for --enable-ARG_NAME], ARG_CHECKING_MSG))
|
||||
|
||||
# If the code blocks are not given, set them to the empty statements to avoid
|
||||
# tripping up bash.
|
||||
m4_define([ARG_CHECK_AVAILABLE], m4_if(ARG_CHECK_AVAILABLE, , :, ARG_CHECK_AVAILABLE))
|
||||
m4_define([ARG_IF_GIVEN], m4_if(ARG_IF_GIVEN, , :, ARG_IF_GIVEN))
|
||||
m4_define([ARG_IF_ENABLED], m4_if(ARG_IF_ENABLED, , :, ARG_IF_ENABLED))
|
||||
m4_define([ARG_IF_DISABLED], m4_if(ARG_IF_DISABLED, , :, ARG_IF_DISABLED))
|
||||
|
||||
##########################
|
||||
# Part 2: Set up autoconf shell code
|
||||
##########################
|
||||
|
||||
# Check that DEFAULT has a valid value
|
||||
if test "[x]ARG_DEFAULT" != xtrue && test "[x]ARG_DEFAULT" != xfalse && \
|
||||
test "[x]ARG_DEFAULT" != xauto ; then
|
||||
AC_MSG_ERROR([Internal error: Argument DEFAULT to [UTIL_ARG_ENABLE] can only be true, false or auto, was: 'ARG_DEFAULT'])
|
||||
fi
|
||||
|
||||
# Check that AVAILABLE has a valid value
|
||||
if test "[x]ARG_AVAILABLE" != xtrue && test "[x]ARG_AVAILABLE" != xfalse; then
|
||||
AC_MSG_ERROR([Internal error: Argument AVAILABLE to [UTIL_ARG_ENABLE] can only be true or false, was: 'ARG_AVAILABLE'])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(ARG_NAME, AS_HELP_STRING([--enable-]ARG_NAME,
|
||||
[ARG_DESC [ARG_DEFAULT_DESC]]), [ARG_GIVEN=true], [ARG_GIVEN=false])
|
||||
|
||||
# Check if the option is available
|
||||
AVAILABLE=ARG_AVAILABLE
|
||||
# Run the available check block (if any), which can overwrite AVAILABLE.
|
||||
ARG_CHECK_AVAILABLE
|
||||
|
||||
# Check if the option should be turned on
|
||||
AC_MSG_CHECKING(ARG_CHECKING_MSG)
|
||||
if test x$ARG_GIVEN = xfalse; then
|
||||
if test ARG_DEFAULT = auto; then
|
||||
# If not given, and default is auto, set it to true iff it's available.
|
||||
ARG_RESULT=$AVAILABLE
|
||||
REASON="from default 'auto'"
|
||||
else
|
||||
ARG_RESULT=ARG_DEFAULT
|
||||
REASON="default"
|
||||
fi
|
||||
else
|
||||
if test x$ARG_OPTION = xyes; then
|
||||
ARG_RESULT=true
|
||||
REASON="from command line"
|
||||
elif test x$ARG_OPTION = xno; then
|
||||
ARG_RESULT=false
|
||||
REASON="from command line"
|
||||
elif test x$ARG_OPTION = xauto; then
|
||||
if test ARG_DEFAULT = auto; then
|
||||
# If both given and default is auto, set it to true iff it's available.
|
||||
ARG_RESULT=$AVAILABLE
|
||||
else
|
||||
ARG_RESULT=ARG_DEFAULT
|
||||
fi
|
||||
REASON="from command line 'auto'"
|
||||
else
|
||||
AC_MSG_ERROR([Option [--enable-]ARG_NAME can only be 'yes', 'no' or 'auto'])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x$ARG_RESULT = xtrue; then
|
||||
AC_MSG_RESULT([enabled, $REASON])
|
||||
if test x$AVAILABLE = xfalse; then
|
||||
AC_MSG_ERROR([Option [--enable-]ARG_NAME is not available])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([disabled, $REASON])
|
||||
fi
|
||||
|
||||
# Execute result payloads, if present
|
||||
if test x$ARG_GIVEN = xtrue; then
|
||||
ARG_IF_GIVEN
|
||||
fi
|
||||
|
||||
if test x$ARG_RESULT = xtrue; then
|
||||
ARG_IF_ENABLED
|
||||
else
|
||||
ARG_IF_DISABLED
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
|
||||
# $1: variable to check
|
||||
|
||||
@@ -52,9 +52,11 @@ JTREG_TESTROOTS += $(addprefix $(TOPDIR)/test/, hotspot/jtreg jdk langtools nash
|
||||
JTREG_ROOT_FILES := $(addsuffix /TEST.ROOT, $(JTREG_TESTROOTS))
|
||||
JTREG_GROUP_FILES :=
|
||||
$(foreach root, $(JTREG_TESTROOTS), \
|
||||
$(eval include $(root)/TEST.ROOT) \
|
||||
$(eval $(root)_JTREG_GROUP_FILES := $$(addprefix $(root)/, $$(groups))) \
|
||||
$(eval JTREG_GROUP_FILES += $$($(root)_JTREG_GROUP_FILES)) \
|
||||
$(if $(wildcard $(root)/TEST.ROOT), \
|
||||
$(eval include $(root)/TEST.ROOT) \
|
||||
$(eval $(root)_JTREG_GROUP_FILES := $$(addprefix $(root)/, $$(groups))) \
|
||||
$(eval JTREG_GROUP_FILES += $$($(root)_JTREG_GROUP_FILES)) \
|
||||
) \
|
||||
)
|
||||
|
||||
# Cache the expensive to calculate test names in a generated makefile.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -154,6 +154,7 @@ endef
|
||||
# SETUP:=must point to a previously setup java compiler, for example: SETUP:=BOOTJAVAC
|
||||
# JVM:=path to ..bin/java
|
||||
# ADD_JAVAC_FLAGS:=javac flags to append to the default ones.
|
||||
# DISABLED_WARNINGS:=list of Xlint warnings that should be disabled
|
||||
# SRC:=one or more directories to search for sources. The order of the source roots
|
||||
# is significant. The first found file of a certain name has priority.
|
||||
# BIN:=store classes here
|
||||
@@ -198,9 +199,15 @@ define SetupJavaCompilationBody
|
||||
$1_FLAGS := -g
|
||||
endif
|
||||
$1_FLAGS += $$($$($1_SETUP)_FLAGS) $$($1_ADD_JAVAC_FLAGS) $(JAVAC_FLAGS)
|
||||
|
||||
ifneq ($$($1_DISABLED_WARNINGS), )
|
||||
$1_FLAGS += -Xlint:$$(call CommaList, $$(addprefix -, $$($1_DISABLED_WARNINGS)))
|
||||
endif
|
||||
|
||||
ifneq ($$($1_CLASSPATH), )
|
||||
$1_FLAGS += -cp $$(call PathList, $$($1_CLASSPATH))
|
||||
endif
|
||||
|
||||
ifeq ($$($1_JAVAC),)
|
||||
$$(error The Java compilation $1 refers to a non-existant java compiler setup $$($1_SETUP))
|
||||
endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -171,6 +171,7 @@ DOCS_MODULES += \
|
||||
jdk.naming.dns \
|
||||
jdk.naming.rmi \
|
||||
jdk.net \
|
||||
jdk.nio.mapmode \
|
||||
jdk.rmic \
|
||||
jdk.scripting.nashorn \
|
||||
jdk.sctp \
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Setup make rules for creating an RMI compilation.
|
||||
#
|
||||
# Parameter 1 is the name of the rule. This name is used as variable prefix,
|
||||
# and the targets generated are listed in a variable by that name.
|
||||
#
|
||||
# Remaining parameters are named arguments. These include:
|
||||
# CLASSES:=List of classes to generate stubs for
|
||||
# CLASSES_DIR:=Directory where to look for classes
|
||||
# STUB_CLASSES_DIR:=Directory in where to put stub classes
|
||||
# RUN_V11:=Set to run rmic with -v1.1
|
||||
# RUN_V12:=Set to run rmic with -v1.2
|
||||
# KEEP_GENERATED:=Set to keep generated sources around
|
||||
# STUB_SOURCES_DIR:=Directory to put generated sources in
|
||||
SetupRMICompilation = $(NamedParamsMacroTemplate)
|
||||
define SetupRMICompilationBody
|
||||
|
||||
$1_DEP_FILE := $$($1_STUB_CLASSES_DIR)/_the.$1_rmic.generated
|
||||
|
||||
$1_CLASSES_SLASH := $$(subst .,/,$$($1_CLASSES))
|
||||
$1_CLASS_FILES := $$(addprefix $$($1_CLASSES_DIR)/,$$(addsuffix .class,$$($1_CLASSES_SLASH)))
|
||||
$1_STUB_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Stub.class,$$($1_CLASSES_SLASH)))
|
||||
$1_TARGETS := $$($1_STUB_FILES)
|
||||
$1_ARGS :=
|
||||
ifneq (,$$($1_RUN_V11))
|
||||
$1_SKEL_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Skel.class,$$($1_CLASSES_SLASH)))
|
||||
$1_TARGETS += $$($1_SKEL_FILES)
|
||||
$1_ARGS += -v1.1
|
||||
endif
|
||||
ifneq (,$$($1_RUN_V12))
|
||||
$1_ARGS += -v1.2
|
||||
endif
|
||||
|
||||
$1_TIE_BASE_FILES := $$(foreach f,$$($1_CLASSES_SLASH),$$(dir $$f)_$$(notdir $$f))
|
||||
$1_TIE_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/org/omg/stub/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
|
||||
$1_TIE_STDPKG_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
|
||||
|
||||
ifneq ($$($1_KEEP_GENERATED), )
|
||||
$1_ARGS += -keepgenerated
|
||||
$1_JAVA_TARGETS := $$(subst .class,.java,$$($1_TARGETS))
|
||||
ifneq ($$($1_STUB_SOURCES_DIR), )
|
||||
# This is where the java files are created by rmic
|
||||
$1_JAVA_TARGETS_REL := $$(subst $$($1_STUB_CLASSES_DIR),, $$($1_JAVA_TARGETS))
|
||||
# This is where the caller wants the java files
|
||||
$1_JAVA_TARGETS := $$(addprefix $$($1_STUB_SOURCES_DIR), $$($1_JAVA_TARGETS_REL))
|
||||
endif
|
||||
$1_TARGETS += $$($1_JAVA_TARGETS)
|
||||
endif
|
||||
|
||||
$1_DOLLAR_SAFE_CLASSES := $$(subst $$$$,\$$$$,$$($1_CLASSES))
|
||||
|
||||
$$($1_TARGETS): $$($1_DEP_FILE) $$($1_CLASS_FILES)
|
||||
|
||||
$$($1_DEP_FILE): $$($1_CLASS_FILES)
|
||||
$$(call LogInfo, Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES))
|
||||
$$(call MakeDir, $$($1_STUB_CLASSES_DIR))
|
||||
$(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
|
||||
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
|
||||
$$(if $$($1_STUB_SOURCES_DIR), \
|
||||
$$(foreach f, $$($1_JAVA_TARGETS_REL), \
|
||||
$(MKDIR) -p $$(dir $$($1_STUB_SOURCES_DIR)/$$f) ; \
|
||||
$(MV) $$($1_STUB_CLASSES_DIR)/$$f $$($1_STUB_SOURCES_DIR)/$$f ; \
|
||||
) \
|
||||
) \
|
||||
$(TOUCH) $$@
|
||||
|
||||
|
||||
$1 := $$($1_TARGETS) $$($1_DEP_FILE)
|
||||
|
||||
endef
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -31,8 +31,6 @@ $(eval $(call IncludeCustomExtension, common/SetupJavaCompilers.gmk))
|
||||
|
||||
include JavaCompilation.gmk
|
||||
|
||||
DISABLE_WARNINGS ?= -Xlint:all,-deprecation,-removal,-unchecked,-rawtypes,-cast,-serial,-dep-ann,-static,-fallthrough,-try,-varargs,-empty,-finally
|
||||
|
||||
JDK_SOURCE_TARGET_FLAGS := -source $(JDK_SOURCE_TARGET_VERSION) \
|
||||
-target $(JDK_SOURCE_TARGET_VERSION)
|
||||
|
||||
@@ -48,7 +46,7 @@ $(eval $(call SetupJavaCompiler,BOOT_JAVAC, \
|
||||
$(JAVA_TOOL_FLAGS_SMALL) \
|
||||
$(BOOT_JDK_SOURCETARGET) \
|
||||
-XDignore.symbol.file=true -g \
|
||||
-Xlint:all$(COMMA)-deprecation$(COMMA)-options -Werror, \
|
||||
$(JAVAC_WARNINGS) -Xlint:-options, \
|
||||
DISABLE_SJAVAC := true, \
|
||||
))
|
||||
|
||||
@@ -66,7 +64,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE, \
|
||||
JVM := $(JAVA_SMALL), \
|
||||
JAVAC := $(NEW_JAVAC), \
|
||||
FLAGS := $(BOOT_JDK_SOURCETARGET) -XDignore.symbol.file=true -XDstringConcat=inline \
|
||||
$(DISABLE_WARNINGS) -Xlint:-options, \
|
||||
$(JAVAC_WARNINGS) -Xlint:-options, \
|
||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
||||
|
||||
@@ -80,16 +78,6 @@ $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \
|
||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
||||
|
||||
# The generate new bytecode javac setup uses the new compiler to compile for the
|
||||
# new jdk. This new bytecode might only be possible to run using the new jvm.
|
||||
$(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE_NOWARNINGS, \
|
||||
JVM := $(JAVA_JAVAC), \
|
||||
JAVAC := $(NEW_JAVAC), \
|
||||
FLAGS := $(JDK_SOURCE_TARGET_FLAGS) \
|
||||
-encoding ascii -XDignore.symbol.file=true $(DISABLE_WARNINGS), \
|
||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
||||
|
||||
# After the jdk is built, we want to build demos using only the recently
|
||||
# generated jdk classes and nothing else, no jdk source, etc etc.
|
||||
# I.e. the rt.jar, but since rt.jar has not yet been generated
|
||||
@@ -97,7 +85,8 @@ $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE_NOWARNINGS, \
|
||||
$(eval $(call SetupJavaCompiler,GENERATE_USINGJDKBYTECODE, \
|
||||
JVM := $(JAVA_SMALL), \
|
||||
JAVAC := $(NEW_JAVAC), \
|
||||
FLAGS := --upgrade-module-path $(JDK_OUTPUTDIR)/modules --system none $(DISABLE_WARNINGS), \
|
||||
FLAGS := --upgrade-module-path $(JDK_OUTPUTDIR)/modules --system none \
|
||||
$(JAVAC_WARNINGS), \
|
||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
||||
|
||||
@@ -108,7 +97,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_8_BYTECODE, \
|
||||
$(JAVA_TOOL_FLAGS_SMALL) \
|
||||
--release 8 \
|
||||
-XDignore.symbol.file=true -g \
|
||||
-Xlint:all -Werror, \
|
||||
$(JAVAC_WARNINGS), \
|
||||
DISABLE_SJAVAC := true, \
|
||||
))
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@ var getJibProfilesCommon = function (input, data) {
|
||||
common.main_profile_base = {
|
||||
dependencies: ["boot_jdk", "gnumake", "jtreg", "jib", "autoconf", "jmh", "jcov"],
|
||||
default_make_targets: ["product-bundles", "test-bundles", "static-libs-bundles"],
|
||||
configure_args: concat(["--enable-jtreg-failure-handler"],
|
||||
configure_args: concat("--enable-jtreg-failure-handler",
|
||||
"--with-exclude-translations=de,es,fr,it,ko,pt_BR,sv,ca,tr,cs,sk,ja_JP_A,ja_JP_HA,ja_JP_HI,ja_JP_I,zh_TW,zh_HK",
|
||||
"--disable-manpages",
|
||||
"--disable-jvm-feature-shenandoahgc",
|
||||
@@ -466,8 +466,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "build_devkit", "cups"],
|
||||
configure_args: [
|
||||
"--openjdk-target=aarch64-linux-gnu", "--with-freetype=bundled",
|
||||
"--disable-warnings-as-errors"
|
||||
"--openjdk-target=aarch64-linux-gnu",
|
||||
],
|
||||
},
|
||||
|
||||
@@ -539,7 +538,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
});
|
||||
|
||||
// Generate -gcov profiles
|
||||
[ "linux-x64", "macosx-x64" ].forEach(function (name) {
|
||||
[ "linux-aarch64", "linux-x64", "macosx-x64" ].forEach(function (name) {
|
||||
var gcovName = name + "-gcov";
|
||||
profiles[gcovName] = clone(profiles[name]);
|
||||
profiles[gcovName].default_make_targets = ["product-bundles", "test-bundles"];
|
||||
@@ -626,7 +625,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
});
|
||||
|
||||
// JCov profiles build JCov-instrumented JDK image based on images provided through dependencies.
|
||||
[ "linux-x64", "macosx-x64", "solaris-sparcv9", "windows-x64"]
|
||||
[ "linux-aarch64", "linux-x64", "macosx-x64", "solaris-sparcv9", "windows-x64"]
|
||||
.forEach(function (name) {
|
||||
var jcovName = name + "-jcov";
|
||||
profiles[jcovName] = clone(common.main_profile_base);
|
||||
@@ -777,13 +776,17 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
= concat(profiles[cmpBaselineName].default_make_targets, "docs");
|
||||
}
|
||||
profiles[cmpBaselineName].make_args = [ "COMPARE_BUILD=CONF=" ];
|
||||
profiles[cmpBaselineName].configure_args = concat(
|
||||
profiles[cmpBaselineName].configure_args,
|
||||
"--with-hotspot-build-time=n/a",
|
||||
"--disable-precompiled-headers");
|
||||
// Do not inherit artifact definitions from base profile
|
||||
delete profiles[cmpBaselineName].artifacts;
|
||||
});
|
||||
});
|
||||
|
||||
// Artifacts of JCov profiles
|
||||
[ "linux-x64", "macosx-x64", "solaris-sparcv9", "windows-x64"]
|
||||
[ "linux-aarch64", "linux-x64", "macosx-x64", "solaris-sparcv9", "windows-x64"]
|
||||
.forEach(function (name) {
|
||||
var o = artifactData[name]
|
||||
var jdk_subdir = (o.jdk_subdir != null ? o.jdk_subdir : "jdk-" + data.version);
|
||||
@@ -803,7 +806,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
});
|
||||
|
||||
// Artifacts of gcov (native-code-coverage) profiles
|
||||
[ "linux-x64", "macosx-x64" ].forEach(function (name) {
|
||||
[ "linux-aarch64", "linux-x64", "macosx-x64" ].forEach(function (name) {
|
||||
var o = artifactData[name]
|
||||
var pf = o.platform
|
||||
var jdk_subdir = (o.jdk_subdir != null ? o.jdk_subdir : "jdk-" + data.version);
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
# 0xF9FD -> u256F -> 0xA2A3
|
||||
# 0xA2CC -> u5341 -> 0xA451
|
||||
# 0xA2CE -> u5345 -> 0xA4CA
|
||||
# 0xF9F9 -> u2550 -> 0xA2A4
|
||||
# 0xF9E9 -> u255E -> 0xA2A5
|
||||
# 0xF9EA -> u256A -> 0xA2A6
|
||||
# 0xF9EB -> u2561 -> 0xA2A7
|
||||
# 0xA2A4 -> u2550 -> 0xF9F9
|
||||
# 0xA2A5 -> u255E -> 0xF9E9
|
||||
# 0xA2A6 -> u256A -> 0xF9EA
|
||||
# 0xA2A7 -> u2561 -> 0xF9EB
|
||||
#
|
||||
# Column #1 is the cp950 code (in hex)
|
||||
# Column #2 is the Unicode (in hex as 0xXXXX)
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
# (we don't need a MS950.c2b, the entries of MS950.c2b-irreversible
|
||||
# are added in MS950.b2c already)
|
||||
#
|
||||
0xF9FA 0x256D
|
||||
0xA2A4 0x2550
|
||||
0xA2A5 0x255E
|
||||
0xA2A6 0x256A
|
||||
0xA2A7 0x2561
|
||||
0xA2CC 0x5341
|
||||
0xA2CE 0x5345
|
||||
0xF9FA 0x256D
|
||||
0xF9FB 0x256E
|
||||
0xF9FC 0x2570
|
||||
0xF9FD 0x256F
|
||||
0xA2CC 0x5341
|
||||
0xA2CE 0x5345
|
||||
0xF9F9 0x2550
|
||||
0xF9E9 0x255E
|
||||
0xF9EA 0x256A
|
||||
0xF9EB 0x2561
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
File-Date: 2019-09-16
|
||||
File-Date: 2020-03-16
|
||||
%%
|
||||
Type: language
|
||||
Subtag: aa
|
||||
@@ -47129,6 +47129,16 @@ Comments: Pamaka dialect of the "Busi Nenge Tongo" English-based
|
||||
Creole continuum in Eastern Suriname and Western French Guiana
|
||||
%%
|
||||
Type: variant
|
||||
Subtag: peano
|
||||
Description: Latino Sine Flexione
|
||||
Description: Interlingua de API
|
||||
Description: Interlingua de Peano
|
||||
Prefix: la
|
||||
Comments: Peano’s Interlingua, created in 1903 by Giuseppe Peano as an
|
||||
international auxiliary language
|
||||
Added: 2020-03-12
|
||||
%%
|
||||
Type: variant
|
||||
Subtag: petr1708
|
||||
Description: Petrine orthography
|
||||
Added: 2010-10-10
|
||||
|
||||
@@ -40,10 +40,10 @@ mkdir -p $BUILD_DIR $JAR_DIR
|
||||
cd $JAR_DIR
|
||||
rm -f *
|
||||
|
||||
wget http://central.maven.org/maven2/org/apache/commons/commons-math3/$COMMONS_MATH3_VERSION/commons-math3-$COMMONS_MATH3_VERSION.jar
|
||||
wget http://central.maven.org/maven2/net/sf/jopt-simple/jopt-simple/$JOPT_SIMPLE_VERSION/jopt-simple-$JOPT_SIMPLE_VERSION.jar
|
||||
wget http://central.maven.org/maven2/org/openjdk/jmh/jmh-core/$JMH_VERSION/jmh-core-$JMH_VERSION.jar
|
||||
wget http://central.maven.org/maven2/org/openjdk/jmh/jmh-generator-annprocess/$JMH_VERSION/jmh-generator-annprocess-$JMH_VERSION.jar
|
||||
wget https://repo.maven.apache.org/maven2/org/apache/commons/commons-math3/$COMMONS_MATH3_VERSION/commons-math3-$COMMONS_MATH3_VERSION.jar
|
||||
wget https://repo.maven.apache.org/maven2/net/sf/jopt-simple/jopt-simple/$JOPT_SIMPLE_VERSION/jopt-simple-$JOPT_SIMPLE_VERSION.jar
|
||||
wget https://repo.maven.apache.org/maven2/org/openjdk/jmh/jmh-core/$JMH_VERSION/jmh-core-$JMH_VERSION.jar
|
||||
wget https://repo.maven.apache.org/maven2/org/openjdk/jmh/jmh-generator-annprocess/$JMH_VERSION/jmh-generator-annprocess-$JMH_VERSION.jar
|
||||
|
||||
tar -cvzf ../$BUNDLE_NAME *
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -31,7 +31,7 @@ JFR_TOOLS_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/buildtools/tools_classes
|
||||
|
||||
$(eval $(call SetupJavaCompiler, GENERATE_JFRBYTECODE, \
|
||||
JAVAC := $(JAVAC), \
|
||||
FLAGS := $(DISABLE_WARNINGS), \
|
||||
FLAGS := -Xlint:all -Werror, \
|
||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA), \
|
||||
DISABLE_SJAVAC := true, \
|
||||
@@ -41,6 +41,7 @@ $(eval $(call SetupJavaCompilation, BUILD_JFR_TOOLS, \
|
||||
SETUP := GENERATE_JFRBYTECODE, \
|
||||
SRC := $(JFR_TOOLS_SRCDIR), \
|
||||
BIN := $(JFR_TOOLS_OUTPUTDIR), \
|
||||
DISABLED_WARNINGS := try, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_JFR_TOOLS)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -34,7 +34,7 @@ JVMTI_TOOLS_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/tools/jvmti
|
||||
|
||||
$(eval $(call SetupJavaCompiler, GENERATE_OLDBYTECODE, \
|
||||
JAVAC := $(JAVAC), \
|
||||
FLAGS := $(DISABLE_WARNINGS), \
|
||||
FLAGS := -Xlint:all -Werror, \
|
||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA), \
|
||||
DISABLE_SJAVAC := true, \
|
||||
@@ -43,6 +43,7 @@ $(eval $(call SetupJavaCompiler, GENERATE_OLDBYTECODE, \
|
||||
$(eval $(call SetupJavaCompilation, BUILD_JVMTI_TOOLS, \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := $(JVMTI_TOOLS_SRCDIR), \
|
||||
DISABLED_WARNINGS := rawtypes cast, \
|
||||
INCLUDE_FILES := jvmtiGen.java jvmtiEnvFill.java, \
|
||||
BIN := $(JVMTI_TOOLS_OUTPUTDIR), \
|
||||
))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -98,7 +98,7 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
|
||||
$(eval $(call SetupJavaCompilation, BUILD_PROJECT_CREATOR, \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
ADD_JAVAC_FLAGS := -Xlint:-auxiliaryclass, \
|
||||
DISABLED_WARNINGS := auxiliaryclass deprecation rawtypes unchecked cast, \
|
||||
SRC := $(TOPDIR)/make/hotspot/src/classes, \
|
||||
BIN := $(TOOLS_OUTPUTDIR), \
|
||||
))
|
||||
|
||||
@@ -75,6 +75,10 @@ CFLAGS_VM_VERSION := \
|
||||
-DCPU='"$(OPENJDK_TARGET_CPU_VM_VERSION)"' \
|
||||
#
|
||||
|
||||
ifneq ($(HOTSPOT_BUILD_TIME), )
|
||||
CFLAGS_VM_VERSION += -DHOTSPOT_BUILD_TIME='"$(HOTSPOT_BUILD_TIME)"'
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Disabled warnings
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
@@ -60,37 +60,7 @@
|
||||
</target>
|
||||
|
||||
|
||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~ -->
|
||||
<!-- Call rmic-jmx subtargets -->
|
||||
|
||||
<target name="-rmic-jmx" depends="-init,-rmic-jmx-jrmp"
|
||||
description="Calls -init,-rmic-jmx-jrmp"
|
||||
/>
|
||||
|
||||
|
||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
|
||||
<!-- Generate RMI JRMP stub class files for remote objects -->
|
||||
<!-- Generated java files are kept in a separate directory -->
|
||||
|
||||
<target name="-rmic-jmx-jrmp" depends="-init"
|
||||
description="Generate RMI JRMP stub class files for remote objects. Keep generated java files in separate dir." >
|
||||
|
||||
<!-- Dir to keep generated stub source -->
|
||||
<mkdir dir="${gensrc.dir}" />
|
||||
|
||||
<rmic base="${classes.dir}/javax/management"
|
||||
sourcebase="${gensrc.dir}"
|
||||
includeAntRuntime="no"
|
||||
includeJavaRuntime="no"
|
||||
stubversion="1.2"
|
||||
>
|
||||
<include name="javax/management/remote/rmi/RMIConnectionImpl.class" />
|
||||
<include name="javax/management/remote/rmi/RMIServerImpl.class" />
|
||||
</rmic>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="-post-compile" depends="-init,-rmic-jmx"
|
||||
<target name="-post-compile" depends="-init"
|
||||
description="Jar JMX class files (including RMI stubs)" >
|
||||
<mkdir dir="${dist.dir}/lib"/>
|
||||
<jar jarfile="${dist.dir}/lib/${jar.jmx.name}"
|
||||
|
||||
@@ -191,6 +191,7 @@ class Bundle {
|
||||
String[] cldrBundles = getCLDRPath().split(",");
|
||||
|
||||
// myMap contains resources for id.
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> myMap = new HashMap<>();
|
||||
int index;
|
||||
for (index = 0; index < cldrBundles.length; index++) {
|
||||
@@ -230,10 +231,12 @@ class Bundle {
|
||||
}
|
||||
|
||||
for (String k : COMPACT_NUMBER_PATTERN_KEYS) {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<String> patterns = (List<String>) myMap.remove(k);
|
||||
if (patterns != null) {
|
||||
// Convert the map value from List<String> to String[], replacing any missing
|
||||
// entry from the parents map, if any.
|
||||
@SuppressWarnings("unchecked")
|
||||
final List<String> pList = (List<String>)parentsMap.get(k);
|
||||
int size = patterns.size();
|
||||
int psize = pList != null ? pList.size() : 0;
|
||||
@@ -286,7 +289,7 @@ class Bundle {
|
||||
handleMultipleInheritance(myMap, parentsMap, calendarPrefix + "QuarterAbbreviations");
|
||||
handleMultipleInheritance(myMap, parentsMap, calendarPrefix + "QuarterNarrows");
|
||||
|
||||
adjustEraNames(myMap, calendarType);
|
||||
adjustEraNames(myMap, parentsMap, calendarType);
|
||||
|
||||
handleDateTimeFormatPatterns(TIME_PATTERN_KEYS, myMap, parentsMap, calendarType, "TimePatterns");
|
||||
handleDateTimeFormatPatterns(DATE_PATTERN_KEYS, myMap, parentsMap, calendarType, "DatePatterns");
|
||||
@@ -410,8 +413,9 @@ class Bundle {
|
||||
}
|
||||
|
||||
/**
|
||||
* Fills in any empty elements with its parent element. Returns true if the resulting array is
|
||||
* identical to its parent array.
|
||||
* Fills in any empty elements with its parent element, falling back to
|
||||
* aliased one if parent element is not found. Returns true if the resulting
|
||||
* array is identical to its parent array.
|
||||
*
|
||||
* @param parents
|
||||
* @param key
|
||||
@@ -423,7 +427,7 @@ class Bundle {
|
||||
return false;
|
||||
}
|
||||
if (value instanceof String[]) {
|
||||
Object pvalue = parents.get(key);
|
||||
Object pvalue = parents.getOrDefault(key, parents.get(CLDRConverter.aliases.get(key)));
|
||||
if (pvalue != null && pvalue instanceof String[]) {
|
||||
String[] strings = (String[]) value;
|
||||
String[] pstrings = (String[]) pvalue;
|
||||
@@ -442,7 +446,7 @@ class Bundle {
|
||||
* Adjusts String[] for era names because JRE's Calendars use different
|
||||
* ERA value indexes in the Buddhist, Japanese Imperial, and Islamic calendars.
|
||||
*/
|
||||
private void adjustEraNames(Map<String, Object> map, CalendarType type) {
|
||||
private void adjustEraNames(Map<String, Object> map, Map<String, Object> pMap, CalendarType type) {
|
||||
String[][] eraNames = new String[ERA_KEYS.length][];
|
||||
String[] realKeys = new String[ERA_KEYS.length];
|
||||
int index = 0;
|
||||
@@ -450,6 +454,9 @@ class Bundle {
|
||||
String realKey = type.keyElementName() + key;
|
||||
String[] value = (String[]) map.get(realKey);
|
||||
if (value != null) {
|
||||
// first fill in missing elements from parents map.
|
||||
fillInElements(pMap, realKey, value);
|
||||
|
||||
switch (type) {
|
||||
case GREGORIAN:
|
||||
break;
|
||||
|
||||
@@ -434,7 +434,7 @@ public class CLDRConverter {
|
||||
parentData.keySet().stream()
|
||||
.filter(key -> key.startsWith(PARENT_LOCALE_PREFIX))
|
||||
.forEach(key -> {
|
||||
parentLocalesMap.put(key, new TreeSet(
|
||||
parentLocalesMap.put(key, new TreeSet<String>(
|
||||
Arrays.asList(((String)parentData.get(key)).split(" "))));
|
||||
});
|
||||
|
||||
@@ -481,7 +481,7 @@ public class CLDRConverter {
|
||||
});
|
||||
}
|
||||
|
||||
private static void parseLDMLFile(File srcfile, AbstractLDMLHandler handler) throws Exception {
|
||||
private static void parseLDMLFile(File srcfile, AbstractLDMLHandler<?> handler) throws Exception {
|
||||
info("..... Parsing " + srcfile.getName() + " .....");
|
||||
SAXParserFactory pf = SAXParserFactory.newInstance();
|
||||
pf.setValidating(true);
|
||||
@@ -574,7 +574,7 @@ public class CLDRConverter {
|
||||
* Translate the aliases into the real entries in the bundle map.
|
||||
*/
|
||||
static void handleAliases(Map<String, Object> bundleMap) {
|
||||
Set bundleKeys = bundleMap.keySet();
|
||||
Set<String> bundleKeys = bundleMap.keySet();
|
||||
try {
|
||||
for (String key : aliases.keySet()) {
|
||||
String targetKey = aliases.get(key);
|
||||
@@ -1158,10 +1158,10 @@ public class CLDRConverter {
|
||||
|
||||
private static Stream<String> pluralRulesStream() {
|
||||
return handlerPlurals.getData().entrySet().stream()
|
||||
.filter(e -> !((Map<String, String>)e.getValue()).isEmpty())
|
||||
.filter(e -> !(e.getValue()).isEmpty())
|
||||
.map(e -> {
|
||||
String loc = e.getKey();
|
||||
Map<String, String> rules = (Map<String, String>)e.getValue();
|
||||
Map<String, String> rules = e.getValue();
|
||||
return " {\"" + loc + "\", \"" +
|
||||
rules.entrySet().stream()
|
||||
.map(rule -> rule.getKey() + ":" + rule.getValue().replaceFirst("@.*", ""))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -40,7 +40,7 @@ import org.xml.sax.SAXException;
|
||||
* plurals.xml
|
||||
*/
|
||||
|
||||
class PluralsParseHandler extends AbstractLDMLHandler<Object> {
|
||||
class PluralsParseHandler extends AbstractLDMLHandler<Map<String, String>> {
|
||||
@Override
|
||||
public InputSource resolveEntity(String publicID, String systemID) throws IOException, SAXException {
|
||||
// avoid HTTP traffic to unicode.org
|
||||
@@ -82,13 +82,13 @@ class PluralsParseHandler extends AbstractLDMLHandler<Object> {
|
||||
switch (qName) {
|
||||
case "pluralRule":
|
||||
assert !(currentContainer instanceof Entry);
|
||||
Entry entry = (Entry)currentContainer;
|
||||
Entry<?> entry = (Entry<?>)currentContainer;
|
||||
final String count = entry.getKey();
|
||||
final String rule = (String)entry.getValue();
|
||||
String locales = ((KeyContainer)(currentContainer.getParent())).getKey();
|
||||
Arrays.stream(locales.split("\\s"))
|
||||
.forEach(loc -> {
|
||||
Map<String, String> rules = (Map<String, String>)get(loc);
|
||||
Map<String, String> rules = get(loc);
|
||||
if (rules == null) {
|
||||
rules = new HashMap<>();
|
||||
put(loc, rules);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -139,7 +139,7 @@ class DTDBuilder extends DTD {
|
||||
}
|
||||
int i = namesVector.size();
|
||||
namesVector.addElement(name);
|
||||
namesHash.put(name, new Integer(i));
|
||||
namesHash.put(name, i);
|
||||
return (short) i;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -92,8 +92,8 @@ class DTDInputStream extends FilterReader implements DTDConstants {
|
||||
* Push an entire input stream
|
||||
*/
|
||||
void push(Reader in) throws IOException {
|
||||
stack.push(new Integer(ln));
|
||||
stack.push(new Integer(ch));
|
||||
stack.push(Integer.valueOf(ln));
|
||||
stack.push(Integer.valueOf(ch));
|
||||
stack.push(this.in);
|
||||
this.in = in;
|
||||
ch = in.read();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -87,12 +87,12 @@ public class GenerateBreakIteratorData {
|
||||
ResourceBundle rules, info;
|
||||
|
||||
info = (ResourceBundle) Class.forName(
|
||||
localizedBundleName("sun.text.resources", "BreakIteratorInfo")).newInstance();
|
||||
localizedBundleName("sun.text.resources", "BreakIteratorInfo")).getDeclaredConstructor().newInstance();
|
||||
|
||||
classNames = info.getStringArray("BreakIteratorClasses");
|
||||
|
||||
rules = (ResourceBundle) Class.forName(
|
||||
localizedBundleName("sun.text.resources", "BreakIteratorRules")).newInstance();
|
||||
localizedBundleName("sun.text.resources", "BreakIteratorRules")).getDeclaredConstructor().newInstance();
|
||||
|
||||
if (info.containsKey("CharacterData")) {
|
||||
generateDataFile(info.getString("CharacterData"),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -290,7 +290,7 @@ class RuleBasedBreakIteratorBuilder {
|
||||
}
|
||||
|
||||
lastOpen = c;
|
||||
parenStack.push(new Character((char)c));
|
||||
parenStack.push(Character.valueOf((char)c));
|
||||
if (c == '<') {
|
||||
sawVarName = true;
|
||||
}
|
||||
@@ -902,11 +902,11 @@ class RuleBasedBreakIteratorBuilder {
|
||||
// if we're adding rules to the backward state table, mark the initial state
|
||||
// as a looping state
|
||||
if (!forward) {
|
||||
loopingStates.addElement(new Integer(1));
|
||||
loopingStates.addElement(Integer.valueOf(1));
|
||||
}
|
||||
|
||||
// put the current state on the decision point list before we start
|
||||
decisionPointList.addElement(new Integer(currentState)); // we want currentState to
|
||||
decisionPointList.addElement(Integer.valueOf(currentState)); // we want currentState to
|
||||
// be 1 here...
|
||||
currentState = tempStateTable.size() - 1; // but after that, we want it to be
|
||||
// 1 less than the state number of the next state
|
||||
@@ -978,7 +978,7 @@ class RuleBasedBreakIteratorBuilder {
|
||||
// if the period is followed by an asterisk, then just set the current
|
||||
// state to loop back on itself
|
||||
if (p + 1 < rule.length() && rule.charAt(p + 1) == '*' && state[0] != 0) {
|
||||
decisionPointList.addElement(new Integer(state[0]));
|
||||
decisionPointList.addElement(Integer.valueOf(state[0]));
|
||||
pendingChars = "";
|
||||
++p;
|
||||
}
|
||||
@@ -1012,7 +1012,7 @@ class RuleBasedBreakIteratorBuilder {
|
||||
// it to the end of the state table
|
||||
int newState = tempStateTable.size();
|
||||
if (loopingStates.size() != 0) {
|
||||
statesToBackfill.addElement(new Integer(newState));
|
||||
statesToBackfill.addElement(Integer.valueOf(newState));
|
||||
}
|
||||
state = new short[numCategories + 1];
|
||||
if (sawEarlyBreak) {
|
||||
@@ -1032,7 +1032,7 @@ class RuleBasedBreakIteratorBuilder {
|
||||
lastState = currentState;
|
||||
do {
|
||||
++currentState;
|
||||
decisionPointList.addElement(new Integer(currentState));
|
||||
decisionPointList.addElement(Integer.valueOf(currentState));
|
||||
} while (currentState + 1 < tempStateTable.size());
|
||||
}
|
||||
}
|
||||
@@ -1058,7 +1058,7 @@ class RuleBasedBreakIteratorBuilder {
|
||||
if (c == '*') {
|
||||
for (int i = lastState + 1; i < tempStateTable.size(); i++) {
|
||||
Vector<Integer> temp = new Vector<>();
|
||||
temp.addElement(new Integer(i));
|
||||
temp.addElement(Integer.valueOf(i));
|
||||
updateStateTable(temp, pendingChars, (short)(lastState + 1));
|
||||
}
|
||||
}
|
||||
@@ -1121,7 +1121,7 @@ class RuleBasedBreakIteratorBuilder {
|
||||
|
||||
// add the current state to the decision point list (add it at the
|
||||
// BEGINNING so we can find it later)
|
||||
decisionPointList.insertElementAt(new Integer(currentState), 0);
|
||||
decisionPointList.insertElementAt(Integer.valueOf(currentState), 0);
|
||||
|
||||
// finally, push a copy of the current decision point list onto the
|
||||
// stack (this keeps track of the active decision point list before
|
||||
@@ -1208,7 +1208,7 @@ class RuleBasedBreakIteratorBuilder {
|
||||
for (int i = 0; i < tempState.length; i++) {
|
||||
if (tempState[i] > tempStateNum) {
|
||||
updateStateTable(exitPoints,
|
||||
new Character((char)(i + 0x100)).toString(),
|
||||
Character.valueOf((char)(i + 0x100)).toString(),
|
||||
tempState[i]);
|
||||
}
|
||||
}
|
||||
@@ -1330,7 +1330,7 @@ class RuleBasedBreakIteratorBuilder {
|
||||
short[] newValues,
|
||||
Vector<Integer> rowsBeingUpdated) {
|
||||
short[] oldValues = tempStateTable.elementAt(rowNum);
|
||||
boolean isLoopingState = loopingStates.contains(new Integer(rowNum));
|
||||
boolean isLoopingState = loopingStates.contains(Integer.valueOf(rowNum));
|
||||
|
||||
// for each of the cells in the rows we're reconciling, do...
|
||||
for (int i = 0; i < oldValues.length; i++) {
|
||||
@@ -1343,7 +1343,7 @@ class RuleBasedBreakIteratorBuilder {
|
||||
// if oldValues is a looping state and the state the current cell points to
|
||||
// is too, then we can just stomp over the current value of that cell (and
|
||||
// set the clear-looping-states flag if necessary)
|
||||
else if (isLoopingState && loopingStates.contains(new Integer(oldValues[i]))) {
|
||||
else if (isLoopingState && loopingStates.contains(Integer.valueOf(oldValues[i]))) {
|
||||
if (newValues[i] != 0) {
|
||||
if (oldValues[i] == 0) {
|
||||
clearLoopingStates = true;
|
||||
@@ -1401,29 +1401,29 @@ class RuleBasedBreakIteratorBuilder {
|
||||
|
||||
// if the decision point list contains either of the parent rows,
|
||||
// update it to include the new row as well
|
||||
if ((decisionPointList.contains(new Integer(oldRowNum))
|
||||
|| decisionPointList.contains(new Integer(newRowNum)))
|
||||
&& !decisionPointList.contains(new Integer(combinedRowNum))
|
||||
if ((decisionPointList.contains(Integer.valueOf(oldRowNum))
|
||||
|| decisionPointList.contains(Integer.valueOf(newRowNum)))
|
||||
&& !decisionPointList.contains(Integer.valueOf(combinedRowNum))
|
||||
) {
|
||||
decisionPointList.addElement(new Integer(combinedRowNum));
|
||||
decisionPointList.addElement(Integer.valueOf(combinedRowNum));
|
||||
}
|
||||
|
||||
// do the same thing with the list of rows being updated
|
||||
if ((rowsBeingUpdated.contains(new Integer(oldRowNum))
|
||||
|| rowsBeingUpdated.contains(new Integer(newRowNum)))
|
||||
&& !rowsBeingUpdated.contains(new Integer(combinedRowNum))
|
||||
if ((rowsBeingUpdated.contains(Integer.valueOf(oldRowNum))
|
||||
|| rowsBeingUpdated.contains(Integer.valueOf(newRowNum)))
|
||||
&& !rowsBeingUpdated.contains(Integer.valueOf(combinedRowNum))
|
||||
) {
|
||||
decisionPointList.addElement(new Integer(combinedRowNum));
|
||||
decisionPointList.addElement(Integer.valueOf(combinedRowNum));
|
||||
}
|
||||
// now (groan) do the same thing for all the entries on the
|
||||
// decision point stack
|
||||
for (int k = 0; k < decisionPointStack.size(); k++) {
|
||||
Vector<Integer> dpl = decisionPointStack.elementAt(k);
|
||||
if ((dpl.contains(new Integer(oldRowNum))
|
||||
|| dpl.contains(new Integer(newRowNum)))
|
||||
&& !dpl.contains(new Integer(combinedRowNum))
|
||||
if ((dpl.contains(Integer.valueOf(oldRowNum))
|
||||
|| dpl.contains(Integer.valueOf(newRowNum)))
|
||||
&& !dpl.contains(Integer.valueOf(combinedRowNum))
|
||||
) {
|
||||
dpl.addElement(new Integer(combinedRowNum));
|
||||
dpl.addElement(Integer.valueOf(combinedRowNum));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1536,10 +1536,10 @@ class RuleBasedBreakIteratorBuilder {
|
||||
private void eliminateBackfillStates(int baseState) {
|
||||
|
||||
// don't do anything unless this state is actually in the backfill list...
|
||||
if (statesToBackfill.contains(new Integer(baseState))) {
|
||||
if (statesToBackfill.contains(Integer.valueOf(baseState))) {
|
||||
|
||||
// if it is, take it out
|
||||
statesToBackfill.removeElement(new Integer(baseState));
|
||||
statesToBackfill.removeElement(Integer.valueOf(baseState));
|
||||
|
||||
// then go through and recursively call this function for every
|
||||
// state that the base state points to
|
||||
@@ -1608,7 +1608,7 @@ class RuleBasedBreakIteratorBuilder {
|
||||
|
||||
int[] rowNumMap = new int[tempStateTable.size()];
|
||||
Stack<Integer> rowsToFollow = new Stack<>();
|
||||
rowsToFollow.push(new Integer(1));
|
||||
rowsToFollow.push(Integer.valueOf(1));
|
||||
rowNumMap[1] = 1;
|
||||
|
||||
// determine which states are no longer reachable from the start state
|
||||
@@ -1622,7 +1622,7 @@ class RuleBasedBreakIteratorBuilder {
|
||||
if (row[i] != 0) {
|
||||
if (rowNumMap[row[i]] == 0) {
|
||||
rowNumMap[row[i]] = row[i];
|
||||
rowsToFollow.push(new Integer(row[i]));
|
||||
rowsToFollow.push(Integer.valueOf(row[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package build.tools.generatecharacter;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package build.tools.generatecharacter;
|
||||
|
||||
import java.util.regex.*;
|
||||
@@ -118,7 +143,7 @@ public class CharacterScript {
|
||||
// Character.getType() != Character.UNASSIGNED
|
||||
// first (return UNKNOWN for unassigned)
|
||||
|
||||
ArrayList<int[]> list = new ArrayList();
|
||||
ArrayList<int[]> list = new ArrayList<>();
|
||||
list.add(scripts[0]);
|
||||
|
||||
int[] last = scripts[0];
|
||||
@@ -156,7 +181,7 @@ public class CharacterScript {
|
||||
}
|
||||
|
||||
for (i = 0; i < list.size(); i++) {
|
||||
int[] a = (int[])list.get(i);
|
||||
int[] a = list.get(i);
|
||||
String name = "UNKNOWN";
|
||||
if (a[2] != -1)
|
||||
name = names[a[2]].toUpperCase(Locale.US);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -45,16 +45,16 @@ public class PrintCharacterRanges {
|
||||
int end() { return end; }
|
||||
}
|
||||
|
||||
private static List/*<BooleanRange>*/ recoverBooleanRanges(String methodName) throws Exception {
|
||||
List result = new ArrayList();
|
||||
private static List<BooleanRange> recoverBooleanRanges(String methodName) throws Exception {
|
||||
List<BooleanRange> result = new ArrayList<>();
|
||||
int currentRangeStart = -1;
|
||||
Method method = Character.class.getDeclaredMethod(methodName, new Class[] { Character.TYPE });
|
||||
Method method = Character.class.getDeclaredMethod(methodName, new Class<?>[] { Character.TYPE });
|
||||
if (method == null) {
|
||||
throw new RuntimeException("No method \"" + methodName + "\"(C) found");
|
||||
}
|
||||
|
||||
for (int i = 0; i <= 255; i++) {
|
||||
boolean methodRes = ((Boolean) method.invoke(null, new Object[] { new Character((char) i) })).booleanValue();
|
||||
boolean methodRes = ((Boolean) method.invoke(null, new Object[] { Character.valueOf((char) i) })).booleanValue();
|
||||
if (methodRes) {
|
||||
if (currentRangeStart < 0) {
|
||||
currentRangeStart = i;
|
||||
@@ -91,17 +91,17 @@ public class PrintCharacterRanges {
|
||||
return s.toString();
|
||||
}
|
||||
|
||||
private static void printBooleanRanges(List/*<BooleanRange>*/ ranges, String methodName) {
|
||||
private static void printBooleanRanges(List<BooleanRange> ranges, String methodName) {
|
||||
System.out.print(methodName + ":");
|
||||
for (Iterator iter = ranges.iterator(); iter.hasNext();) {
|
||||
BooleanRange range = (BooleanRange) iter.next();
|
||||
for (Iterator<BooleanRange> iter = ranges.iterator(); iter.hasNext();) {
|
||||
BooleanRange range = iter.next();
|
||||
System.out.print(" [ " + describe(range.begin()) + ", " + describe(range.end()) + " ]");
|
||||
}
|
||||
System.out.println("");
|
||||
}
|
||||
|
||||
private static void recoverAndPrintBooleanRanges(String methodName) throws Exception {
|
||||
List ranges = recoverBooleanRanges(methodName);
|
||||
List<BooleanRange> ranges = recoverBooleanRanges(methodName);
|
||||
printBooleanRanges(ranges, methodName);
|
||||
}
|
||||
|
||||
@@ -121,17 +121,17 @@ public class PrintCharacterRanges {
|
||||
int offset() { return offset; }
|
||||
}
|
||||
|
||||
private static List/*<ShiftRange>*/ recoverShiftRanges(String methodName) throws Exception {
|
||||
List result = new ArrayList();
|
||||
private static List<ShiftRange> recoverShiftRanges(String methodName) throws Exception {
|
||||
List<ShiftRange> result = new ArrayList<>();
|
||||
int currentRangeStart = -1;
|
||||
int currentRangeOffset = -1;
|
||||
Method method = Character.class.getDeclaredMethod(methodName, new Class[] { Character.TYPE });
|
||||
Method method = Character.class.getDeclaredMethod(methodName, new Class<?>[] { Character.TYPE });
|
||||
if (method == null) {
|
||||
throw new RuntimeException("No method \"" + methodName + "\"(C) found");
|
||||
}
|
||||
|
||||
for (int i = 0; i <= 255; i++) {
|
||||
char methodRes = ((Character) method.invoke(null, new Object[] { new Character((char) i) })).charValue();
|
||||
char methodRes = ((Character) method.invoke(null, new Object[] { Character.valueOf((char) i) })).charValue();
|
||||
if (methodRes != i) {
|
||||
int offset = methodRes - i;
|
||||
if (currentRangeStart < 0) {
|
||||
@@ -155,11 +155,11 @@ public class PrintCharacterRanges {
|
||||
return result;
|
||||
}
|
||||
|
||||
private static void printShiftRanges(List/*<ShiftRange>*/ ranges, String methodName) {
|
||||
private static void printShiftRanges(List<ShiftRange> ranges, String methodName) {
|
||||
System.out.print(methodName + ":");
|
||||
boolean isFirst = true;
|
||||
for (Iterator iter = ranges.iterator(); iter.hasNext();) {
|
||||
ShiftRange range = (ShiftRange) iter.next();
|
||||
for (Iterator<ShiftRange> iter = ranges.iterator(); iter.hasNext();) {
|
||||
ShiftRange range = iter.next();
|
||||
if (isFirst) {
|
||||
isFirst = false;
|
||||
} else {
|
||||
@@ -173,7 +173,7 @@ public class PrintCharacterRanges {
|
||||
}
|
||||
|
||||
private static void recoverAndPrintShiftRanges(String methodName) throws Exception {
|
||||
List ranges = recoverShiftRanges(methodName);
|
||||
List<ShiftRange> ranges = recoverShiftRanges(methodName);
|
||||
printShiftRanges(ranges, methodName);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -322,7 +322,7 @@ public class GenerateCurrencyData {
|
||||
specialCaseNewCurrenciesDefaultFractionDigits[specialCaseCount] = getDefaultFractionDigits(newCurrency);
|
||||
specialCaseNewCurrenciesNumericCode[specialCaseCount] = getNumericCode(newCurrency);
|
||||
}
|
||||
specialCaseMap.put(currencyInfo, new Integer(specialCaseCount));
|
||||
specialCaseMap.put(currencyInfo, Integer.valueOf(specialCaseCount));
|
||||
return specialCaseCount++;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -215,10 +215,7 @@ public class EquivMapsGenerator {
|
||||
+ " static final Map<String, String[]> multiEquivsMap;\n"
|
||||
+ " static final Map<String, String> regionVariantEquivMap;\n\n"
|
||||
+ " static {\n"
|
||||
+ " singleEquivMap = new HashMap<>();\n"
|
||||
+ " multiEquivsMap = new HashMap<>();\n"
|
||||
+ " regionVariantEquivMap = new HashMap<>();\n\n"
|
||||
+ " // This is an auto-generated file and should not be manually edited.\n";
|
||||
+ " singleEquivMap = new HashMap<>(";
|
||||
|
||||
private static final String footerText =
|
||||
" }\n\n"
|
||||
@@ -242,6 +239,12 @@ public class EquivMapsGenerator {
|
||||
Paths.get(fileName))) {
|
||||
writer.write(getOpenJDKCopyright());
|
||||
writer.write(headerText
|
||||
+ (int)(sortedLanguageMap1.size() / 0.75f + 1) + ");\n"
|
||||
+ " multiEquivsMap = new HashMap<>("
|
||||
+ (int)(sortedLanguageMap2.size() / 0.75f + 1) + ");\n"
|
||||
+ " regionVariantEquivMap = new HashMap<>("
|
||||
+ (int)(sortedRegionVariantMap.size() / 0.75f + 1) + ");\n\n"
|
||||
+ " // This is an auto-generated file and should not be manually edited.\n"
|
||||
+ " // LSR Revision: " + LSRrevisionDate);
|
||||
writer.newLine();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -27,6 +27,7 @@ package build.tools.jdwpgen;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
class Parse {
|
||||
|
||||
@@ -144,12 +145,18 @@ class Parse {
|
||||
return null;
|
||||
} else {
|
||||
try {
|
||||
Node node = (Node)proto.getClass().newInstance();
|
||||
Node node = (Node)proto.getClass().getDeclaredConstructor().newInstance();
|
||||
node.set(kind, list, izer.lineno());
|
||||
return node;
|
||||
} catch (InstantiationException exc) {
|
||||
error(exc.toString());
|
||||
return null;
|
||||
} catch (NoSuchMethodException exc) {
|
||||
error(exc.toString());
|
||||
return null;
|
||||
} catch (InvocationTargetException exc) {
|
||||
error(exc.toString());
|
||||
return null;
|
||||
} catch (IllegalAccessException exc) {
|
||||
error(exc.toString());
|
||||
return null;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -73,11 +73,9 @@ public class ModuleGraph implements Taglet {
|
||||
+ getImage(moduleName, imageFile, -1, true)
|
||||
+ "</span>";
|
||||
}
|
||||
return "<dt>"
|
||||
+ "<span class=\"simpleTagLabel\">Module Graph:</span>\n"
|
||||
+ "</dt>"
|
||||
return "<dt>Module Graph:</dt>"
|
||||
+ "<dd>"
|
||||
+ "<a class=moduleGraph href=\"" + imageFile + "\">"
|
||||
+ "<a class=\"module-graph\" href=\"" + imageFile + "\">"
|
||||
+ getImage(moduleName, imageFile, thumbnailHeight, false)
|
||||
+ hoverImage
|
||||
+ "</a>"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -95,7 +95,7 @@ public class ToolGuide implements Taglet {
|
||||
return "";
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("<dt class=\"simpleTagLabel\">Tool Guides:</dt>\n")
|
||||
sb.append("<dt>Tool Guides:</dt>\n")
|
||||
.append("<dd>");
|
||||
|
||||
boolean needComma = false;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -67,7 +67,7 @@ class TzdbZoneRulesProvider {
|
||||
}
|
||||
|
||||
public Set<String> getZoneIds() {
|
||||
return new TreeSet(regionIds);
|
||||
return new TreeSet<String>(regionIds);
|
||||
}
|
||||
|
||||
public Map<String, String> getAliasMap() {
|
||||
@@ -100,6 +100,7 @@ class TzdbZoneRulesProvider {
|
||||
return (ZoneRules)obj;
|
||||
}
|
||||
try {
|
||||
@SuppressWarnings("unchecked")
|
||||
ZoneRules zrules = buildRules(zoneId, (List<ZoneLine>)obj);
|
||||
zones.put(zoneId, zrules);
|
||||
return zrules;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -47,11 +47,11 @@ public class WrapperGenerator {
|
||||
String defaultBaseClass = "XWrapperBase";
|
||||
|
||||
String compile_options = "-lX11";
|
||||
static Hashtable symbolTable = new Hashtable();
|
||||
static Hashtable sizeTable32bit = new Hashtable();
|
||||
static Hashtable sizeTable64bit = new Hashtable();
|
||||
static Hashtable knownSizes32 = new Hashtable();
|
||||
static Hashtable knownSizes64 = new Hashtable();
|
||||
static Hashtable<String, BaseType> symbolTable = new Hashtable<>();
|
||||
static Hashtable<String, String> sizeTable32bit = new Hashtable<>();
|
||||
static Hashtable<String, String> sizeTable64bit = new Hashtable<>();
|
||||
static Hashtable<String, Integer> knownSizes32 = new Hashtable<>();
|
||||
static Hashtable<String, Integer> knownSizes64 = new Hashtable<>();
|
||||
static {
|
||||
/*
|
||||
knownSizes64.put("", Integer.valueOf());
|
||||
@@ -391,7 +391,7 @@ public class WrapperGenerator {
|
||||
alias = true;
|
||||
aliasName = attributes[4];
|
||||
} else if (type == TYPE_ARRAY || type == TYPE_PTR || type == TYPE_STRUCT) {
|
||||
referencedType = (BaseType)symbolTable.get(mod);
|
||||
referencedType = symbolTable.get(mod);
|
||||
if (referencedType == null) {
|
||||
log.warning("Can't find type for name " + mod);
|
||||
}
|
||||
@@ -457,7 +457,7 @@ public class WrapperGenerator {
|
||||
|
||||
private static class StructType extends BaseType {
|
||||
|
||||
Vector members;
|
||||
Vector<BaseType> members;
|
||||
String description;
|
||||
boolean packed;
|
||||
int size;
|
||||
@@ -472,7 +472,7 @@ public class WrapperGenerator {
|
||||
*/
|
||||
public StructType(String _desc)
|
||||
{
|
||||
members = new Vector();
|
||||
members = new Vector<>();
|
||||
parseDescription(_desc);
|
||||
}
|
||||
public int getNumFields()
|
||||
@@ -495,7 +495,7 @@ public class WrapperGenerator {
|
||||
return description;
|
||||
}
|
||||
|
||||
public Enumeration getMembers()
|
||||
public Enumeration<BaseType> getMembers()
|
||||
{
|
||||
return members.elements();
|
||||
}
|
||||
@@ -545,8 +545,8 @@ public class WrapperGenerator {
|
||||
* Returns String containing Java code calculating size of the structure depending on the data model
|
||||
*/
|
||||
public String getSize() {
|
||||
String s32 = (String) WrapperGenerator.sizeTable32bit.get(getName());
|
||||
String s64 = (String) WrapperGenerator.sizeTable64bit.get(getName());
|
||||
String s32 = WrapperGenerator.sizeTable32bit.get(getName());
|
||||
String s64 = WrapperGenerator.sizeTable64bit.get(getName());
|
||||
if (s32 == null || s64 == null) {
|
||||
return (s32 == null)?(s64):(s32);
|
||||
}
|
||||
@@ -558,8 +558,8 @@ public class WrapperGenerator {
|
||||
}
|
||||
public String getOffset(AtomicType atp) {
|
||||
String key = getName()+"."+(atp.isAlias() ? atp.getAliasName() : atp.getName());
|
||||
String s64 = (String) WrapperGenerator.sizeTable64bit.get(key);
|
||||
String s32 = (String) WrapperGenerator.sizeTable32bit.get(key);
|
||||
String s64 = WrapperGenerator.sizeTable64bit.get(key);
|
||||
String s32 = WrapperGenerator.sizeTable32bit.get(key);
|
||||
if (s32 == null || s64 == null) {
|
||||
return (s32 == null)?(s64):(s32);
|
||||
}
|
||||
@@ -573,7 +573,7 @@ public class WrapperGenerator {
|
||||
|
||||
private static class FunctionType extends BaseType {
|
||||
|
||||
Vector args;
|
||||
Vector<BaseType> args;
|
||||
String description;
|
||||
boolean packed;
|
||||
String returnType;
|
||||
@@ -582,7 +582,7 @@ public class WrapperGenerator {
|
||||
|
||||
public FunctionType(String _desc)
|
||||
{
|
||||
args = new Vector();
|
||||
args = new Vector<>();
|
||||
description = _desc;
|
||||
setName(_desc);
|
||||
}
|
||||
@@ -618,7 +618,7 @@ public class WrapperGenerator {
|
||||
return description;
|
||||
}
|
||||
|
||||
public Collection getArguments()
|
||||
public Collection<BaseType> getArguments()
|
||||
{
|
||||
return args;
|
||||
}
|
||||
@@ -653,28 +653,28 @@ public class WrapperGenerator {
|
||||
public String getOffsets(StructType stp,AtomicType atp, boolean wide)
|
||||
{
|
||||
String key = stp.getName()+"."+atp.getName();
|
||||
return wide == true ? (String) sizeTable64bit.get(key) : (String) sizeTable32bit.get(key);
|
||||
return wide == true ? sizeTable64bit.get(key) : sizeTable32bit.get(key);
|
||||
}
|
||||
|
||||
public String getStructSize(StructType stp, boolean wide)
|
||||
{
|
||||
return wide == true ? (String) sizeTable64bit.get(stp.getName()) : (String) sizeTable32bit.get(stp.getName());
|
||||
return wide == true ? sizeTable64bit.get(stp.getName()) : sizeTable32bit.get(stp.getName());
|
||||
}
|
||||
|
||||
public int getLongSize(boolean wide)
|
||||
{
|
||||
return Integer.parseInt(wide == true ? (String)sizeTable64bit.get("long") : (String)sizeTable32bit.get("long"));
|
||||
return Integer.parseInt(wide == true ? sizeTable64bit.get("long") : sizeTable32bit.get("long"));
|
||||
}
|
||||
|
||||
public int getPtrSize(boolean wide)
|
||||
{
|
||||
return Integer.parseInt(wide == true ? (String)sizeTable64bit.get("ptr") : (String)sizeTable32bit.get("ptr"));
|
||||
return Integer.parseInt(wide == true ? sizeTable64bit.get("ptr") : sizeTable32bit.get("ptr"));
|
||||
}
|
||||
public int getBoolSize(boolean wide) {
|
||||
return getOrdinalSize("Bool", wide);
|
||||
}
|
||||
public int getOrdinalSize(String ordinal, boolean wide) {
|
||||
return Integer.parseInt(wide == true ? (String)sizeTable64bit.get(ordinal) : (String)sizeTable32bit.get(ordinal));
|
||||
return Integer.parseInt(wide == true ? sizeTable64bit.get(ordinal) : sizeTable32bit.get(ordinal));
|
||||
}
|
||||
|
||||
public void writeToString(StructType stp, PrintWriter pw) {
|
||||
@@ -682,7 +682,7 @@ public class WrapperGenerator {
|
||||
pw.println("\n\n\tString getName() {\n\t\treturn \"" + stp.getName()+ "\"; \n\t}");
|
||||
pw.println("\n\n\tString getFieldsAsString() {\n\t\tStringBuilder ret = new StringBuilder(" + stp.getNumFields() * 40 + ");\n");
|
||||
|
||||
for (Enumeration e = stp.getMembers() ; e.hasMoreElements() ;) {
|
||||
for (Enumeration<BaseType> e = stp.getMembers() ; e.hasMoreElements() ;) {
|
||||
AtomicType tp = (AtomicType) e.nextElement();
|
||||
|
||||
type = tp.getType();
|
||||
@@ -718,7 +718,7 @@ public class WrapperGenerator {
|
||||
} else {
|
||||
prefix = "\t";
|
||||
}
|
||||
for (Enumeration e = stp.getMembers() ; e.hasMoreElements() ;) {
|
||||
for (Enumeration<BaseType> e = stp.getMembers() ; e.hasMoreElements() ;) {
|
||||
AtomicType tp = (AtomicType) e.nextElement();
|
||||
|
||||
type = tp.getType();
|
||||
@@ -753,7 +753,7 @@ public class WrapperGenerator {
|
||||
int acc_size_32 = 0;
|
||||
int acc_size_64 = 0;
|
||||
String s_log = (generateLog?"log.finest(\"\");":"");
|
||||
for (Enumeration e = stp.getMembers() ; e.hasMoreElements() ;) {
|
||||
for (Enumeration<BaseType> e = stp.getMembers() ; e.hasMoreElements() ;) {
|
||||
AtomicType tp = (AtomicType) e.nextElement();
|
||||
|
||||
type = tp.getType();
|
||||
@@ -946,7 +946,7 @@ public class WrapperGenerator {
|
||||
pw.println("\tprivate static Unsafe unsafe = XlibWrapper.unsafe;");
|
||||
pw.println("\tprivate boolean __executed = false;");
|
||||
pw.println("\tprivate boolean __disposed = false;");
|
||||
Iterator iter = ft.getArguments().iterator();
|
||||
Iterator<BaseType> iter = ft.getArguments().iterator();
|
||||
while (iter.hasNext()) {
|
||||
AtomicType at = (AtomicType)iter.next();
|
||||
if (at.isIn()) {
|
||||
@@ -1110,8 +1110,8 @@ public class WrapperGenerator {
|
||||
|
||||
public void writeJavaWrapperClass(String outputDir) {
|
||||
try {
|
||||
for (Enumeration e = symbolTable.elements() ; e.hasMoreElements() ;) {
|
||||
BaseType tp = (BaseType) e.nextElement();
|
||||
for (Enumeration<BaseType> e = symbolTable.elements() ; e.hasMoreElements() ;) {
|
||||
BaseType tp = e.nextElement();
|
||||
if (tp instanceof StructType) {
|
||||
StructType st = (StructType) tp;
|
||||
writeWrapper(outputDir, st);
|
||||
@@ -1132,7 +1132,7 @@ public class WrapperGenerator {
|
||||
int j=0;
|
||||
BaseType tp;
|
||||
StructType stp;
|
||||
Enumeration eo;
|
||||
Enumeration<BaseType> eo;
|
||||
|
||||
try {
|
||||
|
||||
@@ -1158,7 +1158,7 @@ public class WrapperGenerator {
|
||||
pw.println("\n\nint main(){");
|
||||
j=0;
|
||||
for ( eo = symbolTable.elements() ; eo.hasMoreElements() ;) {
|
||||
tp = (BaseType) eo.nextElement();
|
||||
tp = eo.nextElement();
|
||||
if (tp instanceof StructType)
|
||||
{
|
||||
stp = (StructType) tp;
|
||||
@@ -1181,14 +1181,14 @@ public class WrapperGenerator {
|
||||
for (eo = symbolTable.elements() ; eo.hasMoreElements() ;) {
|
||||
|
||||
|
||||
tp = (BaseType) eo.nextElement();
|
||||
tp = eo.nextElement();
|
||||
if (tp instanceof StructType)
|
||||
{
|
||||
stp = (StructType) tp;
|
||||
if (stp.getIsInterface()) {
|
||||
continue;
|
||||
}
|
||||
for (Enumeration e = stp.getMembers() ; e.hasMoreElements() ;) {
|
||||
for (Enumeration<BaseType> e = stp.getMembers() ; e.hasMoreElements() ;) {
|
||||
AtomicType atp = (AtomicType) e.nextElement();
|
||||
if (atp.isAlias()) continue;
|
||||
pw.println("printf(\""+ stp.getName() + "." + atp.getName() + "\t%d\\n\""+
|
||||
@@ -1277,7 +1277,7 @@ public class WrapperGenerator {
|
||||
|
||||
}
|
||||
else if (line != null) {
|
||||
BaseType bt = (BaseType) symbolTable.get(line);
|
||||
BaseType bt = symbolTable.get(line);
|
||||
if (bt == null) {
|
||||
if (line.startsWith("!")) {
|
||||
FunctionType ft = new FunctionType(line);
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
default: all
|
||||
|
||||
include RmicCommon.gmk
|
||||
|
||||
##########################################################################################
|
||||
#
|
||||
# Generate RMI stubs
|
||||
#
|
||||
|
||||
JMX_RMI_CLASSES := javax.management.remote.rmi.RMIConnectionImpl \
|
||||
javax.management.remote.rmi.RMIServerImpl
|
||||
|
||||
# Generate into gensrc dir where sources get picked up for javadoc, then move the classes
|
||||
# into the stub classes dir.
|
||||
$(eval $(call SetupRMICompilation,RMI_GEN, \
|
||||
CLASSES := $(JMX_RMI_CLASSES), \
|
||||
CLASSES_DIR := $(CLASSES_DIR)/java.management.rmi, \
|
||||
STUB_CLASSES_DIR := $(STUB_CLASSES_DIR)/java.management.rmi, \
|
||||
RUN_V12 := true, \
|
||||
KEEP_GENERATED := true, \
|
||||
STUB_SOURCES_DIR := $(RMIC_GENSRC_DIR)/java.management.rmi, \
|
||||
))
|
||||
|
||||
##########################################################################################
|
||||
|
||||
all: $(RMI_GEN)
|
||||
|
||||
.PHONY: all
|
||||
@@ -1,48 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
default: all
|
||||
|
||||
include RmicCommon.gmk
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Generate RMI stubs
|
||||
#
|
||||
|
||||
$(eval $(call SetupRMICompilation,RMI_12, \
|
||||
CLASSES := sun.rmi.server.Activation$$ActivationSystemImpl \
|
||||
java.rmi.activation.ActivationGroup, \
|
||||
CLASSES_DIR := $(CLASSES_DIR)/java.rmi, \
|
||||
STUB_CLASSES_DIR := $(STUB_CLASSES_DIR)/java.rmi, \
|
||||
RUN_V12 := true))
|
||||
GENCLASSES += $(RMI_12)
|
||||
|
||||
|
||||
################################################################################
|
||||
|
||||
all: $(RMI_12)
|
||||
|
||||
.PHONY: all
|
||||
@@ -1,45 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
default: all
|
||||
|
||||
include RmicCommon.gmk
|
||||
|
||||
##########################################################################################
|
||||
#
|
||||
# Generate RMI stubs
|
||||
#
|
||||
|
||||
$(eval $(call SetupRMICompilation,RMI_12, \
|
||||
CLASSES := com.sun.jndi.rmi.registry.ReferenceWrapper, \
|
||||
CLASSES_DIR := $(CLASSES_DIR)/jdk.naming.rmi, \
|
||||
STUB_CLASSES_DIR := $(STUB_CLASSES_DIR)/jdk.naming.rmi, \
|
||||
RUN_V12 := true))
|
||||
|
||||
##########################################################################################
|
||||
|
||||
all: $(RMI_12)
|
||||
|
||||
.PHONY: all
|
||||
@@ -1,45 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include RMICompilation.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
RMIC_MAIN_CLASS := -m jdk.rmic.interim/sun.rmi.rmic.Main
|
||||
|
||||
RMIC := $(JAVA_SMALL) $(INTERIM_RMIC_ARGS) $(RMIC_MAIN_CLASS)
|
||||
|
||||
CLASSES_DIR := $(JDK_OUTPUTDIR)/modules
|
||||
# NOTE: If the smart javac dependency management is reintroduced, these classes
|
||||
# risk interfering with the dependency checking. In that case they will need to
|
||||
# be kept separate.
|
||||
STUB_CLASSES_DIR := $(JDK_OUTPUTDIR)/modules
|
||||
RMIC_GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/rmic
|
||||
|
||||
################################################################################
|
||||
@@ -36,13 +36,15 @@ fi
|
||||
# Diff exceptions
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "linux" ]; then
|
||||
ACCEPTED_BIN_DIFF="
|
||||
./lib/server/libjvm.so
|
||||
./hotspot/gtest/server/libjvm.so
|
||||
"
|
||||
STRIP_BEFORE_COMPARE="
|
||||
./hotspot/gtest/server/libjvm.so
|
||||
"
|
||||
if [ "$HOTSPOT_BUILD_TIME" = "" -o "$USE_PRECOMPILED_HEADER" = "true" ]; then
|
||||
ACCEPTED_BIN_DIFF="
|
||||
./lib/server/libjvm.so
|
||||
./hotspot/gtest/server/libjvm.so
|
||||
"
|
||||
STRIP_BEFORE_COMPARE="
|
||||
./hotspot/gtest/server/libjvm.so
|
||||
"
|
||||
fi
|
||||
elif [ "$OPENJDK_TARGET_OS" = "solaris" ]; then
|
||||
SKIP_BIN_DIFF="true"
|
||||
SKIP_FULLDUMP_DIFF="true"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -52,6 +52,7 @@ $(eval $(call SetupJavaCompilation, BUILD_FAILURE_HANDLER, \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := $(FH_BASEDIR)/src/share/classes $(FH_BASEDIR)/src/share/conf, \
|
||||
BIN := $(FH_SUPPORT)/classes, \
|
||||
DISABLED_WARNINGS := deprecation serial try, \
|
||||
COPY := .properties, \
|
||||
CLASSPATH := $(JTREG_JAR) $(TOOLS_JAR), \
|
||||
JAR := $(FH_JAR), \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -77,6 +77,7 @@ $(eval $(call SetupJavaCompilation, BUILD_INDIFY, \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := $(TOPDIR)/test/jdk/java/lang/invoke, \
|
||||
INCLUDE_FILES := indify/Indify.java, \
|
||||
DISABLED_WARNINGS := rawtypes unchecked serial deprecation, \
|
||||
BIN := $(MICROBENCHMARK_TOOLS_CLASSES), \
|
||||
))
|
||||
|
||||
@@ -88,7 +89,8 @@ $(eval $(call SetupJavaCompiler, MICROBENCHMARK_JAVA_COMPILER, \
|
||||
JVM := $(JAVA) --add-modules jdk.unsupported --limit-modules java.management, \
|
||||
JAVAC := $(NEW_JAVAC), \
|
||||
DISABLE_SJAVAC := true, \
|
||||
FLAGS := --upgrade-module-path $(JDK_OUTPUTDIR)/modules --system none $(DISABLE_WARNINGS), \
|
||||
FLAGS := --upgrade-module-path $(JDK_OUTPUTDIR)/modules --system none \
|
||||
-Xlint:all -Werror, \
|
||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA), \
|
||||
))
|
||||
@@ -96,7 +98,8 @@ $(eval $(call SetupJavaCompiler, MICROBENCHMARK_JAVA_COMPILER, \
|
||||
# Build microbenchmark suite for the current JDK
|
||||
$(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
|
||||
SETUP := MICROBENCHMARK_JAVA_COMPILER, \
|
||||
ADD_JAVAC_FLAGS := -cp $(MICROBENCHMARK_CLASSPATH) -Xlint -Xlint:-processing -Werror, \
|
||||
ADD_JAVAC_FLAGS := -cp $(MICROBENCHMARK_CLASSPATH), \
|
||||
DISABLED_WARNINGS := processing rawtypes cast serial deprecation, \
|
||||
SRC := $(MICROBENCHMARK_SRC), \
|
||||
BIN := $(MICROBENCHMARK_CLASSES), \
|
||||
))
|
||||
|
||||
@@ -61,7 +61,6 @@ ifeq ($(INCLUDE_GRAAL), true)
|
||||
$(LIB_OUTPUTDIR)/hamcrest-core-1.3.jar
|
||||
|
||||
TEST_JAVAC_FLAGS := \
|
||||
-Xlint:none \
|
||||
-processorpath $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.replacements.verifier.jar \
|
||||
--add-exports jdk.unsupported/sun.misc=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
|
||||
@@ -114,6 +113,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
||||
EXCLUDE_FILES := org/graalvm/compiler/core/test/VerifyDebugUsageTest.java, \
|
||||
BIN := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests, \
|
||||
CLASSPATH := $(TEST_COMPILE_CP), \
|
||||
DISABLED_WARNINGS := processing, \
|
||||
ADD_JAVAC_FLAGS := $(TEST_JAVAC_FLAGS), \
|
||||
COPY := .input, \
|
||||
))
|
||||
@@ -131,6 +131,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
||||
$(TEST_COMPILE_CP) \
|
||||
$(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests \
|
||||
, \
|
||||
DISABLED_WARNINGS := processing, \
|
||||
ADD_JAVAC_FLAGS := \
|
||||
$(TEST_JAVAC_FLAGS) \
|
||||
-XDstringConcat=inline \
|
||||
@@ -155,6 +156,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
||||
SRC := $(TEST_DIR)/com.oracle.mxtool.junit, \
|
||||
BIN := $(COMPILE_OUTPUTDIR)/com.oracle.mxtool.junit, \
|
||||
JAR := $(COMPILE_OUTPUTDIR)/com.oracle.mxtool.junit.jar, \
|
||||
DISABLED_WARNINGS := processing, \
|
||||
CLASSPATH := $(LIB_OUTPUTDIR)/junit-4.12.jar, \
|
||||
))
|
||||
|
||||
|
||||
@@ -881,7 +881,7 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
BUILD_HOTSPOT_JTREG_EXECUTABLES_CFLAGS_exeFPRegs := -MT
|
||||
BUILD_HOTSPOT_JTREG_EXCLUDE += exesigtest.c libterminatedThread.c
|
||||
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exejvm-test-launcher := jvm.lib
|
||||
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libatExit := jvm.lib
|
||||
else
|
||||
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exejvm-test-launcher := -ljvm
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libbootclssearch_agent += -lpthread
|
||||
@@ -1517,6 +1517,7 @@ else
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetphase001 += -lpthread
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetphase002 += -lpthread
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libterminatedThread += -lpthread
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libatExit += -ljvm
|
||||
endif
|
||||
|
||||
# This evaluation is expensive and should only be done if this target was
|
||||
|
||||
@@ -55,7 +55,7 @@ BUILD_JDK_JTREG_EXECUTABLES_CFLAGS_exeJliLaunchTest := \
|
||||
|
||||
# Platform specific setup
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
BUILD_JDK_JTREG_EXCLUDE += libDirectIO.c libInheritedChannel.c
|
||||
BUILD_JDK_JTREG_EXCLUDE += libDirectIO.c libInheritedChannel.c exelauncher.c
|
||||
|
||||
WIN_LIB_JAVA := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := $(WIN_LIB_JAVA)
|
||||
@@ -69,14 +69,17 @@ else
|
||||
BUILD_JDK_JTREG_EXCLUDE += exerevokeall.c
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libInheritedChannel := -ljava
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exelauncher := -ldl
|
||||
else ifeq ($(call isTargetOs, solaris), true)
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libInheritedChannel := -ljava -lsocket -lnsl
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exelauncher := -lthread -ldl
|
||||
endif
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeJliLaunchTest := -ljli
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeCallerAccessTest := -ljvm
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
BUILD_JDK_JTREG_EXCLUDE += exelauncher.c
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libTestMainKeyWindow := -ObjC
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libTestMainKeyWindow := -framework JavaVM \
|
||||
-framework Cocoa -framework JavaNativeFoundation
|
||||
|
||||
@@ -136,7 +136,7 @@ public class FileChooserDemo extends JPanel implements ActionListener {
|
||||
private JRadioButton openRadioButton;
|
||||
private JRadioButton saveRadioButton;
|
||||
private JRadioButton customButton;
|
||||
private JComboBox lafComboBox;
|
||||
private JComboBox<SupportedLaF> lafComboBox;
|
||||
private JRadioButton justFilesRadioButton;
|
||||
private JRadioButton justDirectoriesRadioButton;
|
||||
private JRadioButton bothFilesAndDirectoriesRadioButton;
|
||||
@@ -158,7 +158,7 @@ public class FileChooserDemo extends JPanel implements ActionListener {
|
||||
for (UIManager.LookAndFeelInfo lafInfo : installedLafs) {
|
||||
try {
|
||||
Class<?> lnfClass = Class.forName(lafInfo.getClassName());
|
||||
LookAndFeel laf = (LookAndFeel) (lnfClass.newInstance());
|
||||
LookAndFeel laf = (LookAndFeel) (lnfClass.getDeclaredConstructor().newInstance());
|
||||
if (laf.isSupportedLookAndFeel()) {
|
||||
String name = lafInfo.getName();
|
||||
SupportedLaF supportedLaF = new SupportedLaF(name, laf);
|
||||
@@ -292,7 +292,7 @@ public class FileChooserDemo extends JPanel implements ActionListener {
|
||||
showButton.setMnemonic('s');
|
||||
|
||||
// Create laf combo box
|
||||
lafComboBox = new JComboBox(supportedLaFs.toArray());
|
||||
lafComboBox = new JComboBox<>(supportedLaFs.toArray(new SupportedLaF[0]));
|
||||
lafComboBox.setSelectedItem(nimbusLaF);
|
||||
lafComboBox.setEditable(false);
|
||||
lafComboBox.addActionListener(optionListener);
|
||||
@@ -729,7 +729,7 @@ public class FileChooserDemo extends JPanel implements ActionListener {
|
||||
frame.pack();
|
||||
} catch (UnsupportedLookAndFeelException exc) {
|
||||
// This should not happen because we already checked
|
||||
((DefaultComboBoxModel) lafComboBox.getModel()).
|
||||
((DefaultComboBoxModel<?>) lafComboBox.getModel()).
|
||||
removeElement(supportedLaF);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,6 @@ import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.util.EnumSet;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.BitSet;
|
||||
import javax.swing.*;
|
||||
@@ -101,8 +100,8 @@ public final class Font2DTest extends JPanel
|
||||
private final ChoiceV2 transformMenu;
|
||||
private final ChoiceV2 transformMenuG2;
|
||||
private final ChoiceV2 methodsMenu;
|
||||
private final JComboBox antiAliasMenu;
|
||||
private final JComboBox fracMetricsMenu;
|
||||
private final JComboBox<FontPanel.AAValues> antiAliasMenu;
|
||||
private final JComboBox<FontPanel.FMValues> fracMetricsMenu;
|
||||
|
||||
private final JSlider contrastSlider;
|
||||
|
||||
@@ -151,10 +150,10 @@ public final class Font2DTest extends JPanel
|
||||
methodsMenu = new ChoiceV2( this );
|
||||
|
||||
antiAliasMenu =
|
||||
new JComboBox(EnumSet.allOf(FontPanel.AAValues.class).toArray());
|
||||
new JComboBox<>(FontPanel.AAValues.values());
|
||||
antiAliasMenu.addActionListener(this);
|
||||
fracMetricsMenu =
|
||||
new JComboBox(EnumSet.allOf(FontPanel.FMValues.class).toArray());
|
||||
new JComboBox<>(FontPanel.FMValues.values());
|
||||
fracMetricsMenu.addActionListener(this);
|
||||
|
||||
contrastSlider = new JSlider(JSlider.HORIZONTAL, 100, 250,
|
||||
@@ -359,7 +358,7 @@ public final class Font2DTest extends JPanel
|
||||
userTextDialog.pack();
|
||||
userTextDialog.addWindowListener( new WindowAdapter() {
|
||||
public void windowClosing( WindowEvent e ) {
|
||||
userTextDialog.hide();
|
||||
userTextDialog.setVisible(false);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -385,7 +384,7 @@ public final class Font2DTest extends JPanel
|
||||
printDialog.setResizable( false );
|
||||
printDialog.addWindowListener( new WindowAdapter() {
|
||||
public void windowClosing( WindowEvent e ) {
|
||||
printDialog.hide();
|
||||
printDialog.setVisible(false);
|
||||
}
|
||||
});
|
||||
printDialog.getContentPane().setLayout( new GridLayout( printModeCBs.length + 2, 1 ));
|
||||
@@ -402,7 +401,7 @@ public final class Font2DTest extends JPanel
|
||||
fontInfoDialog.setResizable( false );
|
||||
fontInfoDialog.addWindowListener( new WindowAdapter() {
|
||||
public void windowClosing( WindowEvent e ) {
|
||||
fontInfoDialog.hide();
|
||||
fontInfoDialog.setVisible(false);
|
||||
showFontInfoCBMI.setState( false );
|
||||
}
|
||||
});
|
||||
@@ -467,7 +466,7 @@ public final class Font2DTest extends JPanel
|
||||
int style = fontStyles[styleMenu.getSelectedIndex()];
|
||||
Font f;
|
||||
for (int i = 0; i < listCount; i++) {
|
||||
String fontName = (String)fontMenu.getItemAt(i);
|
||||
String fontName = fontMenu.getItemAt(i);
|
||||
f = new Font(fontName, style, size);
|
||||
if ((rm.getSelectedIndex() != RangeMenu.SURROGATES_AREA_INDEX) &&
|
||||
canDisplayRange(f, rangeStart, rangeEnd)) {
|
||||
@@ -673,9 +672,9 @@ public final class Font2DTest extends JPanel
|
||||
|
||||
/// Set the visibility of User Text dialog
|
||||
if ( selectedText == fp.USER_TEXT )
|
||||
userTextDialog.show();
|
||||
userTextDialog.setVisible(true);
|
||||
else
|
||||
userTextDialog.hide();
|
||||
userTextDialog.setVisible(false);
|
||||
/// Change the visibility/status/availability of Print JDialog buttons
|
||||
printModeCBs[ fp.ONE_PAGE ].setSelected( true );
|
||||
if ( selectedText == fp.FILE_TEXT || selectedText == fp.USER_TEXT ) {
|
||||
@@ -793,10 +792,10 @@ public final class Font2DTest extends JPanel
|
||||
lcdContrast, userTextOpt );
|
||||
if ( showFontInfoOpt ) {
|
||||
fireUpdateFontInfo();
|
||||
fontInfoDialog.show();
|
||||
fontInfoDialog.setVisible(true);
|
||||
}
|
||||
else
|
||||
fontInfoDialog.hide();
|
||||
fontInfoDialog.setVisible(false);
|
||||
}
|
||||
catch ( Exception ex ) {
|
||||
fireChangeStatus( "ERROR: Failed to Load Options File; See Stack Trace", true );
|
||||
@@ -819,7 +818,7 @@ public final class Font2DTest extends JPanel
|
||||
}
|
||||
});
|
||||
f.pack();
|
||||
f.show();
|
||||
f.setVisible(true);
|
||||
}
|
||||
catch ( Exception ex ) {
|
||||
fireChangeStatus( "ERROR: Failed to Load PNG File; See Stack Trace", true );
|
||||
@@ -861,7 +860,7 @@ public final class Font2DTest extends JPanel
|
||||
else if ( itemName.equals( "Page Setup..." ))
|
||||
fp.doPageSetup();
|
||||
else if ( itemName.equals( "Print..." ))
|
||||
printDialog.show();
|
||||
printDialog.setVisible(true);
|
||||
else if ( itemName.equals( "Close" ))
|
||||
parent.dispose();
|
||||
else if ( itemName.equals( "Exit" ))
|
||||
@@ -893,19 +892,19 @@ public final class Font2DTest extends JPanel
|
||||
if ( itemName.equals( "Print" )) {
|
||||
for ( int i = 0; i < printModeCBs.length; i++ )
|
||||
if ( printModeCBs[i].isSelected() ) {
|
||||
printDialog.hide();
|
||||
printDialog.setVisible(false);
|
||||
fp.doPrint( i );
|
||||
}
|
||||
}
|
||||
else if ( itemName.equals( "Cancel" ))
|
||||
printDialog.hide();
|
||||
printDialog.setVisible(false);
|
||||
/// Update button from Usert Text JDialog...
|
||||
else if ( itemName.equals( "Update" ))
|
||||
fp.setTextToDraw( fp.USER_TEXT, null,
|
||||
parseUserText( userTextArea.getText() ), null );
|
||||
}
|
||||
else if ( source instanceof JComboBox ) {
|
||||
JComboBox c = (JComboBox) source;
|
||||
JComboBox<?> c = (JComboBox<?>) source;
|
||||
|
||||
/// RangeMenu handles actions by itself and then calls fireRangeChanged,
|
||||
/// so it is not listed or handled here
|
||||
@@ -996,10 +995,10 @@ public final class Font2DTest extends JPanel
|
||||
else if ( cbmi == showFontInfoCBMI ) {
|
||||
if ( showFontInfoCBMI.getState() ) {
|
||||
fireUpdateFontInfo();
|
||||
fontInfoDialog.show();
|
||||
fontInfoDialog.setVisible(true);
|
||||
}
|
||||
else
|
||||
fontInfoDialog.hide();
|
||||
fontInfoDialog.setVisible(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1039,7 +1038,7 @@ public final class Font2DTest extends JPanel
|
||||
|
||||
f.getContentPane().add( f2dt );
|
||||
f.pack();
|
||||
f.show();
|
||||
f.setVisible(true);
|
||||
}
|
||||
|
||||
/// Inner class definitions...
|
||||
@@ -1070,7 +1069,7 @@ public final class Font2DTest extends JPanel
|
||||
}
|
||||
}
|
||||
|
||||
private final class ChoiceV2 extends JComboBox {
|
||||
private final class ChoiceV2 extends JComboBox<String> {
|
||||
|
||||
private BitSet bitSet = null;
|
||||
|
||||
@@ -1141,7 +1140,7 @@ public final class Font2DTest extends JPanel
|
||||
this.choice = choice;
|
||||
}
|
||||
|
||||
public Component getListCellRendererComponent(JList list,
|
||||
public Component getListCellRendererComponent(JList<?> list,
|
||||
Object value,
|
||||
int index,
|
||||
boolean isSelected,
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* - Neither the name of Oracle nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This source code is provided to illustrate the usage of a given feature
|
||||
* or technique and has been deliberately simplified. Additional steps
|
||||
* required for a production-quality application, such as security checks,
|
||||
* input validation and proper error handling, might not be present in
|
||||
* this sample code.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
import java.awt.AWTPermission;
|
||||
import java.awt.Frame;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* Font2DTestApplet.java
|
||||
*
|
||||
* @author Shinsuke Fukuda
|
||||
* @author Ankit Patel [Conversion to Swing - 01/07/30]
|
||||
*/
|
||||
|
||||
/// Applet version of Font2DTest that wraps the actual demo
|
||||
|
||||
public final class Font2DTestApplet extends JApplet {
|
||||
public void init() {
|
||||
/// Check if necessary permission is given...
|
||||
SecurityManager security = System.getSecurityManager();
|
||||
if ( security != null ) {
|
||||
try {
|
||||
security.checkPermission( new AWTPermission( "showWindowWithoutWarningBanner" ));
|
||||
}
|
||||
catch ( SecurityException e ) {
|
||||
System.out.println( "NOTE: showWindowWithoutWarningBanner AWTPermission not given.\n" +
|
||||
"Zoom window will contain warning banner at bottom when shown\n" );
|
||||
}
|
||||
try {
|
||||
security.checkPrintJobAccess();
|
||||
}
|
||||
catch ( SecurityException e ) {
|
||||
System.out.println( "NOTE: queuePrintJob RuntimePermission not given.\n" +
|
||||
"Printing feature will not be available\n" );
|
||||
}
|
||||
}
|
||||
|
||||
final JFrame f = new JFrame( "Font2DTest" );
|
||||
final Font2DTest f2dt = new Font2DTest( f, true );
|
||||
f.addWindowListener( new WindowAdapter() {
|
||||
public void windowClosing( WindowEvent e ) { f.dispose(); }
|
||||
});
|
||||
|
||||
f.getContentPane().add( f2dt );
|
||||
f.pack();
|
||||
f.show();
|
||||
}
|
||||
}
|
||||
@@ -74,7 +74,6 @@ import java.awt.print.PrinterJob;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.text.AttributedString;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Vector;
|
||||
|
||||
import javax.imageio.*;
|
||||
@@ -392,7 +391,7 @@ public final class FontPanel extends JPanel implements AdjustmentListener {
|
||||
setTransformG2( g2transform ); // ABP
|
||||
setDrawMethod( method );
|
||||
setRenderingHints(AAValues.getValue(aa), FMValues.getValue(fm),
|
||||
new Integer(contrast));
|
||||
Integer.valueOf(contrast));
|
||||
}
|
||||
|
||||
/// Writes the current screen to PNG file
|
||||
@@ -434,7 +433,7 @@ public final class FontPanel extends JPanel implements AdjustmentListener {
|
||||
private int canvasInset_X = 5, canvasInset_Y = 5;
|
||||
|
||||
/// LineBreak'ed TextLayout vector
|
||||
private Vector lineBreakTLs = null;
|
||||
private Vector<TextLayout> lineBreakTLs = null;
|
||||
|
||||
/// Whether the current draw command requested is for printing
|
||||
private boolean isPrinting = false;
|
||||
@@ -800,7 +799,7 @@ public final class FontPanel extends JPanel implements AdjustmentListener {
|
||||
if ( textToUse == FILE_TEXT ) {
|
||||
if ( !isPrinting )
|
||||
f2dt.fireChangeStatus( "LineBreaking Text... Please Wait", false );
|
||||
lineBreakTLs = new Vector();
|
||||
lineBreakTLs = new Vector<>();
|
||||
for ( int i = 0; i < fileText.length; i++ ) {
|
||||
AttributedString as =
|
||||
new AttributedString( fileText[i], g2.getFont().getAttributes() );
|
||||
@@ -929,7 +928,7 @@ public final class FontPanel extends JPanel implements AdjustmentListener {
|
||||
float xPos, yPos = (float) canvasInset_Y;
|
||||
g2.drawRect( 0, 0, w - 1, h - 1 );
|
||||
for ( int i = drawStart; i <= drawEnd; i++ ) {
|
||||
TextLayout oneLine = (TextLayout) lineBreakTLs.elementAt( i );
|
||||
TextLayout oneLine = lineBreakTLs.elementAt( i );
|
||||
xPos =
|
||||
oneLine.isLeftToRight() ?
|
||||
canvasInset_X : ( (float) w - oneLine.getAdvance() - canvasInset_X );
|
||||
@@ -992,9 +991,9 @@ public final class FontPanel extends JPanel implements AdjustmentListener {
|
||||
/// Back up metrics and other drawing info before printing modifies it
|
||||
int backupDrawStart = drawStart, backupDrawEnd = drawEnd;
|
||||
int backupNumCharAcross = numCharAcross, backupNumCharDown = numCharDown;
|
||||
Vector backupLineBreakTLs = null;
|
||||
Vector<TextLayout> backupLineBreakTLs = null;
|
||||
if ( textToUse == FILE_TEXT )
|
||||
backupLineBreakTLs = (Vector) lineBreakTLs.clone();
|
||||
backupLineBreakTLs = new Vector<>(lineBreakTLs);
|
||||
|
||||
printPageNumber = pageIndex;
|
||||
isPrinting = true;
|
||||
@@ -1137,7 +1136,7 @@ public final class FontPanel extends JPanel implements AdjustmentListener {
|
||||
zoomAreaWidth / 2, (int) ( maxAscent * ZOOM ));
|
||||
g2.dispose();
|
||||
if ( !nowZooming )
|
||||
zoomWindow.show();
|
||||
zoomWindow.setVisible(true);
|
||||
/// This is sort of redundant... since there is a paint function
|
||||
/// inside zoomWindow definition that does the drawImage.
|
||||
/// (I should be able to call just repaint() here)
|
||||
@@ -1176,7 +1175,7 @@ public final class FontPanel extends JPanel implements AdjustmentListener {
|
||||
public void mouseReleased( MouseEvent e ) {
|
||||
if ( textToUse == RANGE_TEXT || textToUse == ALL_GLYPHS ) {
|
||||
if ( nowZooming )
|
||||
zoomWindow.hide();
|
||||
zoomWindow.setVisible(false);
|
||||
nowZooming = false;
|
||||
}
|
||||
this.setCursor( Cursor.getDefaultCursor() );
|
||||
@@ -1246,7 +1245,7 @@ public final class FontPanel extends JPanel implements AdjustmentListener {
|
||||
}
|
||||
public static Object getValue(int ordinal) {
|
||||
if (valArray == null) {
|
||||
valArray = (FMValues[])EnumSet.allOf(FMValues.class).toArray(new FMValues[0]);
|
||||
valArray = FMValues.values();
|
||||
}
|
||||
for (int i=0;i<valArray.length;i++) {
|
||||
if (valArray[i].ordinal() == ordinal) {
|
||||
@@ -1257,7 +1256,7 @@ public final class FontPanel extends JPanel implements AdjustmentListener {
|
||||
}
|
||||
private static FMValues[] getArray() {
|
||||
if (valArray == null) {
|
||||
valArray = (FMValues[])EnumSet.allOf(FMValues.class).toArray(new FMValues[0]);
|
||||
valArray = FMValues.values();
|
||||
}
|
||||
return valArray;
|
||||
}
|
||||
@@ -1308,7 +1307,7 @@ public final class FontPanel extends JPanel implements AdjustmentListener {
|
||||
|
||||
public static Object getValue(int ordinal) {
|
||||
if (valArray == null) {
|
||||
valArray = (AAValues[])EnumSet.allOf(AAValues.class).toArray(new AAValues[0]);
|
||||
valArray = AAValues.values();
|
||||
}
|
||||
for (int i=0;i<valArray.length;i++) {
|
||||
if (valArray[i].ordinal() == ordinal) {
|
||||
@@ -1320,8 +1319,7 @@ public final class FontPanel extends JPanel implements AdjustmentListener {
|
||||
|
||||
private static AAValues[] getArray() {
|
||||
if (valArray == null) {
|
||||
Object [] oa = EnumSet.allOf(AAValues.class).toArray(new AAValues[0]);
|
||||
valArray = (AAValues[])(EnumSet.allOf(AAValues.class).toArray(new AAValues[0]));
|
||||
valArray = AAValues.values();
|
||||
}
|
||||
return valArray;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ import java.util.regex.*;
|
||||
|
||||
/// Custom made choice menu that holds data for unicode range
|
||||
|
||||
public final class RangeMenu extends JComboBox implements ActionListener {
|
||||
public final class RangeMenu extends JComboBox<String> implements ActionListener {
|
||||
|
||||
private static final int[][] UNICODE_RANGES = getUnicodeRanges();
|
||||
private static final String[] UNICODE_RANGE_NAMES = getUnicodeRangeNames();
|
||||
@@ -181,12 +181,12 @@ public final class RangeMenu extends JComboBox implements ActionListener {
|
||||
Object source = e.getSource();
|
||||
|
||||
if ( source instanceof JComboBox ) {
|
||||
String rangeName = (String)((JComboBox)source).getSelectedItem();
|
||||
String rangeName = (String)((JComboBox<?>)source).getSelectedItem();
|
||||
|
||||
if ( rangeName.equals("Custom...") ) {
|
||||
useCustomRange = true;
|
||||
customRangeDialog.setLocationRelativeTo(parent);
|
||||
customRangeDialog.show();
|
||||
customRangeDialog.setVisible(true);
|
||||
}
|
||||
else {
|
||||
useCustomRange = false;
|
||||
@@ -195,7 +195,7 @@ public final class RangeMenu extends JComboBox implements ActionListener {
|
||||
}
|
||||
else if ( source instanceof JButton ) {
|
||||
/// Since it is only "OK" button that sends any action here...
|
||||
customRangeDialog.hide();
|
||||
customRangeDialog.setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ public class DemoPanel extends JPanel {
|
||||
try {
|
||||
if (obj instanceof String) {
|
||||
className = (String) obj;
|
||||
obj = Class.forName(className).newInstance();
|
||||
obj = Class.forName(className).getDeclaredConstructor().newInstance();
|
||||
}
|
||||
if (obj instanceof Component) {
|
||||
add((Component) obj);
|
||||
|
||||
@@ -63,7 +63,7 @@ public class GlobalControls extends JPanel implements ItemListener,
|
||||
"USHORT_x555_RGB", "BYTE_GRAY", "USHORT_GRAY",
|
||||
"BYTE_BINARY", "BYTE_INDEXED", "BYTE_BINARY 2 bit", "BYTE_BINARY 4 bit",
|
||||
"INT_RGBx", "USHORT_555x_RGB" };
|
||||
public final JComboBox screenCombo;
|
||||
public final JComboBox<String> screenCombo;
|
||||
public TextureChooser texturechooser;
|
||||
public JCheckBox aliasCB, renderCB, toolBarCB;
|
||||
public JCheckBox compositeCB, textureCB;
|
||||
@@ -83,7 +83,7 @@ public class GlobalControls extends JPanel implements ItemListener,
|
||||
textureCB = createCheckBox("Texture", false, 2);
|
||||
compositeCB = createCheckBox("AlphaComposite", false, 3);
|
||||
|
||||
screenCombo = new JComboBox();
|
||||
screenCombo = new JComboBox<>();
|
||||
screenCombo.setPreferredSize(new Dimension(120, 18));
|
||||
screenCombo.setLightWeightPopupEnabled(true);
|
||||
screenCombo.setFont(font);
|
||||
|
||||
@@ -94,7 +94,7 @@ public final class Tools extends JPanel implements ActionListener,
|
||||
protected boolean focus;
|
||||
public JToggleButton toggleB;
|
||||
public JButton printB;
|
||||
public JComboBox screenCombo;
|
||||
public JComboBox<String> screenCombo;
|
||||
public JToggleButton renderB, aliasB;
|
||||
public JToggleButton textureB, compositeB;
|
||||
public JButton startStopB;
|
||||
@@ -167,7 +167,7 @@ public final class Tools extends JPanel implements ActionListener,
|
||||
toolbar.setPreferredSize(new Dimension(6*25, 26));
|
||||
}
|
||||
|
||||
screenCombo = new JComboBox();
|
||||
screenCombo = new JComboBox<>();
|
||||
screenCombo.setPreferredSize(new Dimension(100, 18));
|
||||
screenCombo.setFont(font);
|
||||
for (String name : GlobalControls.screenNames) {
|
||||
|
||||
@@ -151,7 +151,6 @@ public class Areas extends ControlsSurface {
|
||||
|
||||
Areas demo;
|
||||
JToolBar toolbar;
|
||||
JComboBox combo;
|
||||
|
||||
public DemoControls(Areas demo) {
|
||||
super(demo.name);
|
||||
|
||||
@@ -51,8 +51,8 @@ import java2d.AnimatingSurface;
|
||||
public class Tree extends AnimatingSurface {
|
||||
|
||||
private char theC = 'A';
|
||||
private Character theT = new Character(theC);
|
||||
private Character theR = new Character((char) (theC + 1));
|
||||
private Character theT = Character.valueOf(theC);
|
||||
private Character theR = Character.valueOf((char) (theC + 1));
|
||||
|
||||
public Tree() {
|
||||
setBackground(WHITE);
|
||||
@@ -65,9 +65,9 @@ public class Tree extends AnimatingSurface {
|
||||
@Override
|
||||
public void step(int w, int h) {
|
||||
setSleepAmount(4000);
|
||||
theT = new Character(theC = ((char) (theC + 1)));
|
||||
theR = new Character((char) (theC + 1));
|
||||
if (theR.compareTo(new Character('z')) == 0) {
|
||||
theT = Character.valueOf(theC = ((char) (theC + 1)));
|
||||
theR = Character.valueOf((char) (theC + 1));
|
||||
if (theR.compareTo(Character.valueOf('z')) == 0) {
|
||||
theC = 'A';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,20 +188,20 @@ public class ImageOps extends ControlsSurface implements ChangeListener {
|
||||
static class DemoControls extends CustomControls implements ActionListener {
|
||||
|
||||
ImageOps demo;
|
||||
JComboBox imgCombo, opsCombo;
|
||||
JComboBox<String> imgCombo, opsCombo;
|
||||
Font font = new Font(Font.SERIF, Font.PLAIN, 10);
|
||||
|
||||
@SuppressWarnings("LeakingThisInConstructor")
|
||||
public DemoControls(ImageOps demo) {
|
||||
super(demo.name);
|
||||
this.demo = demo;
|
||||
add(imgCombo = new JComboBox());
|
||||
add(imgCombo = new JComboBox<>());
|
||||
imgCombo.setFont(font);
|
||||
for (String name : ImageOps.imgName) {
|
||||
imgCombo.addItem(name);
|
||||
}
|
||||
imgCombo.addActionListener(this);
|
||||
add(opsCombo = new JComboBox());
|
||||
add(opsCombo = new JComboBox<>());
|
||||
opsCombo.setFont(font);
|
||||
for (String name : ImageOps.opsName) {
|
||||
opsCombo.addItem(name);
|
||||
|
||||
@@ -71,7 +71,7 @@ public class Balls extends AnimatingControlsSurface {
|
||||
private boolean active;
|
||||
protected Ball[] balls = new Ball[colors.length];
|
||||
protected boolean clearToggle;
|
||||
protected JComboBox combo;
|
||||
protected JComboBox<String> combo;
|
||||
|
||||
public Balls() {
|
||||
setBackground(WHITE);
|
||||
@@ -279,7 +279,7 @@ public class Balls extends AnimatingControlsSurface {
|
||||
addTool("B", demo.balls[4].isSelected);
|
||||
addTool("I", demo.balls[5].isSelected);
|
||||
addTool("V", demo.balls[6].isSelected);
|
||||
add(combo = new JComboBox());
|
||||
add(combo = new JComboBox<>());
|
||||
combo.addItem("10");
|
||||
combo.addItem("20");
|
||||
combo.addItem("30");
|
||||
|
||||
@@ -60,7 +60,6 @@ import java.util.logging.Logger;
|
||||
import java2d.AnimatingControlsSurface;
|
||||
import java2d.CustomControls;
|
||||
import javax.swing.AbstractButton;
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JToggleButton;
|
||||
import javax.swing.JToolBar;
|
||||
|
||||
@@ -320,7 +319,6 @@ public class BezierScroller extends AnimatingControlsSurface {
|
||||
|
||||
BezierScroller demo;
|
||||
JToolBar toolbar;
|
||||
JComboBox combo;
|
||||
|
||||
public DemoControls(BezierScroller demo) {
|
||||
super(demo.name);
|
||||
|
||||
@@ -266,13 +266,13 @@ public class GradAnim extends AnimatingControlsSurface {
|
||||
class DemoControls extends CustomControls implements ActionListener {
|
||||
|
||||
GradAnim demo;
|
||||
JComboBox combo;
|
||||
JComboBox<String> combo;
|
||||
|
||||
@SuppressWarnings("LeakingThisInConstructor")
|
||||
public DemoControls(GradAnim demo) {
|
||||
super(demo.name);
|
||||
this.demo = demo;
|
||||
combo = new JComboBox();
|
||||
combo = new JComboBox<>();
|
||||
combo.addActionListener(this);
|
||||
combo.addItem("2-color GradientPaint");
|
||||
combo.addItem("3-color LinearGradientPaint");
|
||||
|
||||
@@ -299,7 +299,7 @@ public final class TextureAnim extends AnimatingControlsSurface {
|
||||
|
||||
TextureAnim demo;
|
||||
JToolBar toolbar;
|
||||
JComboBox combo;
|
||||
JComboBox<String> combo;
|
||||
JMenu menu;
|
||||
JMenuItem[] menuitems;
|
||||
int iconSize = 20;
|
||||
@@ -318,7 +318,7 @@ public final class TextureAnim extends AnimatingControlsSurface {
|
||||
addTool("RO", "rotate", false);
|
||||
addTool("SX", "shear x", false);
|
||||
addTool("SY", "shear y", false);
|
||||
add(combo = new JComboBox());
|
||||
add(combo = new JComboBox<>());
|
||||
combo.addActionListener(this);
|
||||
combo.addItem("8");
|
||||
combo.addItem("16");
|
||||
|
||||
@@ -162,7 +162,7 @@ public final class MetalworksPrefs extends JDialog {
|
||||
|
||||
JPanel protoPanel = new JPanel();
|
||||
JLabel protoLabel = new JLabel("Protocol");
|
||||
JComboBox protocol = new JComboBox();
|
||||
JComboBox<String> protocol = new JComboBox<>();
|
||||
protocol.addItem("SMTP");
|
||||
protocol.addItem("IMAP");
|
||||
protocol.addItem("Other...");
|
||||
@@ -171,7 +171,7 @@ public final class MetalworksPrefs extends JDialog {
|
||||
|
||||
JPanel attachmentPanel = new JPanel();
|
||||
JLabel attachmentLabel = new JLabel("Attachments");
|
||||
JComboBox attach = new JComboBox();
|
||||
JComboBox<String> attach = new JComboBox<>();
|
||||
attach.addItem("Download Always");
|
||||
attach.addItem("Ask size > 1 Meg");
|
||||
attach.addItem("Ask size > 5 Meg");
|
||||
|
||||
@@ -115,7 +115,7 @@ public class ElementTreePanel extends JPanel implements CaretListener,
|
||||
|
||||
if (as != null) {
|
||||
StringBuilder retBuffer = new StringBuilder("[");
|
||||
Enumeration names = as.getAttributeNames();
|
||||
Enumeration<?> names = as.getAttributeNames();
|
||||
|
||||
while (names.hasMoreElements()) {
|
||||
Object nextName = names.nextElement();
|
||||
|
||||
@@ -255,8 +255,8 @@ public class Stylepad extends Notepad {
|
||||
w.loadDocument();
|
||||
}
|
||||
|
||||
JComboBox createFamilyChoices() {
|
||||
JComboBox b = new JComboBox();
|
||||
JComboBox<String> createFamilyChoices() {
|
||||
JComboBox<String> b = new JComboBox<>();
|
||||
String[] fontNames = GraphicsEnvironment.getLocalGraphicsEnvironment().
|
||||
getAvailableFontFamilyNames();
|
||||
for (String fontName : fontNames) {
|
||||
|
||||
@@ -61,12 +61,12 @@ public class ButtonDemo extends DemoModule implements ChangeListener {
|
||||
JPanel radioButtonPanel = new JPanel();
|
||||
JPanel toggleButtonPanel = new JPanel();
|
||||
|
||||
Vector buttons = new Vector();
|
||||
Vector checkboxes = new Vector();
|
||||
Vector radiobuttons = new Vector();
|
||||
Vector togglebuttons = new Vector();
|
||||
Vector<Component> buttons = new Vector<>();
|
||||
Vector<Component> checkboxes = new Vector<>();
|
||||
Vector<Component> radiobuttons = new Vector<>();
|
||||
Vector<Component> togglebuttons = new Vector<>();
|
||||
|
||||
Vector currentControls = buttons;
|
||||
Vector<Component> currentControls = buttons;
|
||||
|
||||
JButton button;
|
||||
JCheckBox check;
|
||||
@@ -466,12 +466,12 @@ public class ButtonDemo extends DemoModule implements ChangeListener {
|
||||
String command = cb.getActionCommand();
|
||||
if(command == "Enabled") {
|
||||
for(int i = 0; i < currentControls.size(); i++) {
|
||||
c = (Component) currentControls.elementAt(i);
|
||||
c = currentControls.elementAt(i);
|
||||
c.setEnabled(cb.isSelected());
|
||||
c.invalidate();
|
||||
}
|
||||
} else if(command == "PaintBorder") {
|
||||
c = (Component) currentControls.elementAt(0);
|
||||
c = currentControls.elementAt(0);
|
||||
if(c instanceof AbstractButton) {
|
||||
for(int i = 0; i < currentControls.size(); i++) {
|
||||
b = (AbstractButton) currentControls.elementAt(i);
|
||||
@@ -480,7 +480,7 @@ public class ButtonDemo extends DemoModule implements ChangeListener {
|
||||
}
|
||||
}
|
||||
} else if(command == "PaintFocus") {
|
||||
c = (Component) currentControls.elementAt(0);
|
||||
c = currentControls.elementAt(0);
|
||||
if(c instanceof AbstractButton) {
|
||||
for(int i = 0; i < currentControls.size(); i++) {
|
||||
b = (AbstractButton) currentControls.elementAt(i);
|
||||
@@ -489,7 +489,7 @@ public class ButtonDemo extends DemoModule implements ChangeListener {
|
||||
}
|
||||
}
|
||||
} else if(command == "ContentFilled") {
|
||||
c = (Component) currentControls.elementAt(0);
|
||||
c = currentControls.elementAt(0);
|
||||
if(c instanceof AbstractButton) {
|
||||
for(int i = 0; i < currentControls.size(); i++) {
|
||||
b = (AbstractButton) currentControls.elementAt(i);
|
||||
@@ -549,7 +549,7 @@ public class ButtonDemo extends DemoModule implements ChangeListener {
|
||||
}
|
||||
}
|
||||
|
||||
public Vector getCurrentControls() {
|
||||
public Vector<Component> getCurrentControls() {
|
||||
return currentControls;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ public class ColorChooserDemo extends DemoModule {
|
||||
okListener,
|
||||
null);
|
||||
|
||||
dialog.show();
|
||||
dialog.setVisible(true);
|
||||
|
||||
if(e.getSource() == outerColorButton) {
|
||||
bezAnim.setOuterColor(chosen);
|
||||
|
||||
@@ -57,13 +57,13 @@ public class ComboBoxDemo extends DemoModule implements ActionListener {
|
||||
Face face;
|
||||
JLabel faceLabel;
|
||||
|
||||
JComboBox hairCB;
|
||||
JComboBox eyesCB;
|
||||
JComboBox mouthCB;
|
||||
JComboBox<?> hairCB;
|
||||
JComboBox<?> eyesCB;
|
||||
JComboBox<?> mouthCB;
|
||||
|
||||
JComboBox presetCB;
|
||||
JComboBox<?> presetCB;
|
||||
|
||||
Hashtable parts = new Hashtable();
|
||||
Hashtable<String, Object> parts = new Hashtable<>();
|
||||
|
||||
/**
|
||||
* main method allows us to run as a standalone demo.
|
||||
@@ -111,28 +111,31 @@ public class ComboBoxDemo extends DemoModule implements ActionListener {
|
||||
|
||||
JLabel l = (JLabel) comboBoxPanel.add(new JLabel(getString("ComboBoxDemo.presets")));
|
||||
l.setAlignmentX(JLabel.LEFT_ALIGNMENT);
|
||||
presetCB = (JComboBox) comboBoxPanel.add(createPresetComboBox());
|
||||
presetCB = createPresetComboBox();
|
||||
presetCB.setAlignmentX(JComboBox.LEFT_ALIGNMENT);
|
||||
l.setLabelFor(presetCB);
|
||||
comboBoxPanel.add(presetCB);
|
||||
comboBoxPanel.add(Box.createRigidArea(VGAP30));
|
||||
|
||||
l = (JLabel) comboBoxPanel.add(new JLabel(getString("ComboBoxDemo.hair_description")));
|
||||
l.setAlignmentX(JLabel.LEFT_ALIGNMENT);
|
||||
hairCB = (JComboBox) comboBoxPanel.add(createHairComboBox());
|
||||
hairCB = createHairComboBox();
|
||||
hairCB.setAlignmentX(JComboBox.LEFT_ALIGNMENT);
|
||||
l.setLabelFor(hairCB);
|
||||
comboBoxPanel.add(hairCB);
|
||||
comboBoxPanel.add(Box.createRigidArea(VGAP15));
|
||||
|
||||
l = (JLabel) comboBoxPanel.add(new JLabel(getString("ComboBoxDemo.eyes_description")));
|
||||
l.setAlignmentX(JLabel.LEFT_ALIGNMENT);
|
||||
eyesCB = (JComboBox) comboBoxPanel.add(createEyesComboBox());
|
||||
eyesCB = createEyesComboBox();
|
||||
eyesCB.setAlignmentX(JComboBox.LEFT_ALIGNMENT);
|
||||
l.setLabelFor(eyesCB);
|
||||
comboBoxPanel.add(eyesCB);
|
||||
comboBoxPanel.add(Box.createRigidArea(VGAP15));
|
||||
|
||||
l = (JLabel) comboBoxPanel.add(new JLabel(getString("ComboBoxDemo.mouth_description")));
|
||||
l.setAlignmentX(JLabel.LEFT_ALIGNMENT);
|
||||
mouthCB = (JComboBox) comboBoxPanel.add(createMouthComboBox());
|
||||
mouthCB = (JComboBox<?>) comboBoxPanel.add(createMouthComboBox());
|
||||
mouthCB.setAlignmentX(JComboBox.LEFT_ALIGNMENT);
|
||||
l.setLabelFor(mouthCB);
|
||||
comboBoxPanel.add(Box.createRigidArea(VGAP15));
|
||||
@@ -217,36 +220,36 @@ public class ComboBoxDemo extends DemoModule implements ActionListener {
|
||||
return face;
|
||||
}
|
||||
|
||||
JComboBox createHairComboBox() {
|
||||
JComboBox cb = new JComboBox();
|
||||
JComboBox<String> createHairComboBox() {
|
||||
JComboBox<String> cb = new JComboBox<>();
|
||||
fillComboBox(cb);
|
||||
cb.addActionListener(this);
|
||||
return cb;
|
||||
}
|
||||
|
||||
JComboBox createEyesComboBox() {
|
||||
JComboBox cb = new JComboBox();
|
||||
JComboBox<String> createEyesComboBox() {
|
||||
JComboBox<String> cb = new JComboBox<>();
|
||||
fillComboBox(cb);
|
||||
cb.addActionListener(this);
|
||||
return cb;
|
||||
}
|
||||
|
||||
JComboBox createNoseComboBox() {
|
||||
JComboBox cb = new JComboBox();
|
||||
JComboBox<String> createNoseComboBox() {
|
||||
JComboBox<String> cb = new JComboBox<>();
|
||||
fillComboBox(cb);
|
||||
cb.addActionListener(this);
|
||||
return cb;
|
||||
}
|
||||
|
||||
JComboBox createMouthComboBox() {
|
||||
JComboBox cb = new JComboBox();
|
||||
JComboBox<String> createMouthComboBox() {
|
||||
JComboBox<String> cb = new JComboBox<>();
|
||||
fillComboBox(cb);
|
||||
cb.addActionListener(this);
|
||||
return cb;
|
||||
}
|
||||
|
||||
JComboBox createPresetComboBox() {
|
||||
JComboBox cb = new JComboBox();
|
||||
JComboBox<String> createPresetComboBox() {
|
||||
JComboBox<String> cb = new JComboBox<>();
|
||||
cb.addItem(getString("ComboBoxDemo.preset1"));
|
||||
cb.addItem(getString("ComboBoxDemo.preset2"));
|
||||
cb.addItem(getString("ComboBoxDemo.preset3"));
|
||||
@@ -261,7 +264,7 @@ public class ComboBoxDemo extends DemoModule implements ActionListener {
|
||||
return cb;
|
||||
}
|
||||
|
||||
void fillComboBox(JComboBox cb) {
|
||||
void fillComboBox(JComboBox<String> cb) {
|
||||
cb.addItem(getString("ComboBoxDemo.brent"));
|
||||
cb.addItem(getString("ComboBoxDemo.georges"));
|
||||
cb.addItem(getString("ComboBoxDemo.hans"));
|
||||
@@ -279,15 +282,15 @@ public class ComboBoxDemo extends DemoModule implements ActionListener {
|
||||
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if(e.getSource() == hairCB) {
|
||||
String name = (String) parts.get((String) hairCB.getSelectedItem());
|
||||
String name = (String) parts.get(hairCB.getSelectedItem());
|
||||
face.setHair((ImageIcon) parts.get(name + "hair"));
|
||||
faceLabel.repaint();
|
||||
} else if(e.getSource() == eyesCB) {
|
||||
String name = (String) parts.get((String) eyesCB.getSelectedItem());
|
||||
String name = (String) parts.get(eyesCB.getSelectedItem());
|
||||
face.setEyes((ImageIcon) parts.get(name + "eyes"));
|
||||
faceLabel.repaint();
|
||||
} else if(e.getSource() == mouthCB) {
|
||||
String name = (String) parts.get((String) mouthCB.getSelectedItem());
|
||||
String name = (String) parts.get(mouthCB.getSelectedItem());
|
||||
face.setMouth((ImageIcon) parts.get(name + "mouth"));
|
||||
faceLabel.repaint();
|
||||
} else if(e.getSource() == presetCB) {
|
||||
|
||||
@@ -51,7 +51,7 @@ import java.net.*;
|
||||
*
|
||||
* @author Jeff Dinkins
|
||||
*/
|
||||
public class DemoModule extends JApplet {
|
||||
public class DemoModule extends JFrame {
|
||||
|
||||
// The preferred size of the demo
|
||||
private int PREFERRED_WIDTH = 680;
|
||||
@@ -190,7 +190,7 @@ public class DemoModule extends JApplet {
|
||||
frame.getContentPane().add(getDemoPanel(), BorderLayout.CENTER);
|
||||
getDemoPanel().setPreferredSize(new Dimension(PREFERRED_WIDTH, PREFERRED_HEIGHT));
|
||||
frame.pack();
|
||||
frame.show();
|
||||
frame.setVisible(true);
|
||||
}
|
||||
|
||||
public JPanel createHorizontalPanel(boolean threeD) {
|
||||
|
||||
@@ -92,9 +92,9 @@ public class DirectionPanel extends JPanel {
|
||||
}
|
||||
|
||||
public void setSelection( String selection ) {
|
||||
Enumeration e = group.getElements();
|
||||
Enumeration<AbstractButton> e = group.getElements();
|
||||
while( e.hasMoreElements() ) {
|
||||
JRadioButton b = (JRadioButton)e.nextElement();
|
||||
AbstractButton b = e.nextElement();
|
||||
if( b.getActionCommand().equals(selection) ) {
|
||||
b.setSelected(true);
|
||||
}
|
||||
@@ -147,10 +147,7 @@ public class DirectionPanel extends JPanel {
|
||||
getAccessibleContext().setAccessibleName(direction);
|
||||
getAccessibleContext().setAccessibleDescription(description);
|
||||
setSelected(selected);
|
||||
}
|
||||
|
||||
public boolean isFocusTraversable() {
|
||||
return false;
|
||||
setFocusable(false);
|
||||
}
|
||||
|
||||
public void setBorder(Border b) {
|
||||
|
||||
@@ -59,9 +59,9 @@ import java.util.Hashtable;
|
||||
* @author Jeff Dinkins
|
||||
*/
|
||||
public class ExampleFileView extends FileView {
|
||||
private Hashtable icons = new Hashtable(5);
|
||||
private Hashtable fileDescriptions = new Hashtable(5);
|
||||
private Hashtable typeDescriptions = new Hashtable(5);
|
||||
private Hashtable<String, Icon> icons = new Hashtable<>(5);
|
||||
private Hashtable<File, String> fileDescriptions = new Hashtable<>(5);
|
||||
private Hashtable<String, String> typeDescriptions = new Hashtable<>(5);
|
||||
|
||||
/**
|
||||
* The name of the file. Do nothing special here. Let
|
||||
@@ -85,7 +85,7 @@ public class ExampleFileView extends FileView {
|
||||
* @see FileView#getDescription
|
||||
*/
|
||||
public String getDescription(File f) {
|
||||
return (String) fileDescriptions.get(f);
|
||||
return fileDescriptions.get(f);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -111,7 +111,7 @@ public class ExampleFileView extends FileView {
|
||||
* @see FileView#getTypeDescription
|
||||
*/
|
||||
public String getTypeDescription(File f) {
|
||||
return (String) typeDescriptions.get(getExtension(f));
|
||||
return typeDescriptions.get(getExtension(f));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -149,7 +149,7 @@ public class ExampleFileView extends FileView {
|
||||
Icon icon = null;
|
||||
String extension = getExtension(f);
|
||||
if(extension != null) {
|
||||
icon = (Icon) icons.get(extension);
|
||||
icon = icons.get(extension);
|
||||
}
|
||||
return icon;
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ public class FileChooserDemo extends DemoModule {
|
||||
dialog.getContentPane().add(custom, BorderLayout.CENTER);
|
||||
dialog.pack();
|
||||
dialog.setLocationRelativeTo(getDemoPanel());
|
||||
dialog.show();
|
||||
dialog.setVisible(true);
|
||||
}
|
||||
};
|
||||
return createButton(a);
|
||||
|
||||
@@ -59,9 +59,9 @@ public class InternalFrameDemo extends DemoModule {
|
||||
ImageIcon icon1, icon2, icon3, icon4;
|
||||
ImageIcon smIcon1, smIcon2, smIcon3, smIcon4;
|
||||
|
||||
public Integer FIRST_FRAME_LAYER = new Integer(1);
|
||||
public Integer DEMO_FRAME_LAYER = new Integer(2);
|
||||
public Integer PALETTE_LAYER = new Integer(3);
|
||||
public Integer FIRST_FRAME_LAYER = Integer.valueOf(1);
|
||||
public Integer DEMO_FRAME_LAYER = Integer.valueOf(2);
|
||||
public Integer PALETTE_LAYER = Integer.valueOf(3);
|
||||
|
||||
public int FRAME0_X = 15;
|
||||
public int FRAME0_Y = 280;
|
||||
|
||||
@@ -104,7 +104,7 @@ public class LayoutControlPanel extends JPanel implements SwingConstants {
|
||||
// Make sure the controls' text position and label alignment match
|
||||
// the initial value of the associated direction panel.
|
||||
for(int i = 0; i < demo.getCurrentControls().size(); i++) {
|
||||
Component c = (Component) demo.getCurrentControls().elementAt(i);
|
||||
Component c = demo.getCurrentControls().elementAt(i);
|
||||
setPosition(c, RIGHT, CENTER);
|
||||
setAlignment(c,CENTER,CENTER);
|
||||
}
|
||||
@@ -173,7 +173,7 @@ public class LayoutControlPanel extends JPanel implements SwingConstants {
|
||||
}
|
||||
|
||||
for(int i = 0; i < demo.getCurrentControls().size(); i++) {
|
||||
Component c = (Component) demo.getCurrentControls().elementAt(i);
|
||||
Component c = demo.getCurrentControls().elementAt(i);
|
||||
int hPos, vPos, hAlign, vAlign;
|
||||
if( c instanceof AbstractButton ) {
|
||||
hPos = ((AbstractButton)c).getHorizontalTextPosition();
|
||||
@@ -228,7 +228,7 @@ public class LayoutControlPanel extends JPanel implements SwingConstants {
|
||||
hPos = RIGHT; vPos = BOTTOM;
|
||||
}
|
||||
for(int i = 0; i < demo.getCurrentControls().size(); i++) {
|
||||
Component c = (Component) demo.getCurrentControls().elementAt(i);
|
||||
Component c = demo.getCurrentControls().elementAt(i);
|
||||
setPosition(c, hPos, vPos);
|
||||
}
|
||||
demo.invalidate();
|
||||
@@ -267,7 +267,7 @@ public class LayoutControlPanel extends JPanel implements SwingConstants {
|
||||
hPos = RIGHT; vPos = BOTTOM;
|
||||
}
|
||||
for(int i = 0; i < demo.getCurrentControls().size(); i++) {
|
||||
Component c = (Component) demo.getCurrentControls().elementAt(i);
|
||||
Component c = demo.getCurrentControls().elementAt(i);
|
||||
setAlignment(c,hPos,vPos);
|
||||
c.invalidate();
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ import java.net.*;
|
||||
* @author Jeff Dinkins
|
||||
*/
|
||||
public class ListDemo extends DemoModule {
|
||||
JList list;
|
||||
JList<String> list;
|
||||
|
||||
JPanel prefixList;
|
||||
JPanel suffixList;
|
||||
@@ -69,7 +69,7 @@ public class ListDemo extends DemoModule {
|
||||
|
||||
GeneratedListModel listModel;
|
||||
|
||||
Vector checkboxes = new Vector();
|
||||
Vector<JCheckBox> checkboxes = new Vector<>();
|
||||
|
||||
/**
|
||||
* main method allows us to run as a standalone demo.
|
||||
@@ -103,7 +103,7 @@ public class ListDemo extends DemoModule {
|
||||
centerPanel.add(Box.createRigidArea(HGAP30));
|
||||
|
||||
// Create the list
|
||||
list = new JList();
|
||||
list = new JList<>();
|
||||
list.setCellRenderer(new CompanyLogoListCellRenderer());
|
||||
listModel = new GeneratedListModel(this);
|
||||
list.setModel(listModel);
|
||||
@@ -293,12 +293,12 @@ public class ListDemo extends DemoModule {
|
||||
}
|
||||
|
||||
|
||||
class GeneratedListModel extends AbstractListModel {
|
||||
class GeneratedListModel extends AbstractListModel<String> {
|
||||
ListDemo demo;
|
||||
Permuter permuter;
|
||||
|
||||
public Vector prefix = new Vector();
|
||||
public Vector suffix = new Vector();
|
||||
public Vector<String> prefix = new Vector<>();
|
||||
public Vector<String> suffix = new Vector<>();
|
||||
|
||||
public GeneratedListModel (ListDemo demo) {
|
||||
this.demo = demo;
|
||||
@@ -337,7 +337,7 @@ public class ListDemo extends DemoModule {
|
||||
return prefix.size() * suffix.size();
|
||||
}
|
||||
|
||||
public Object getElementAt(int index) {
|
||||
public String getElementAt(int index) {
|
||||
if(permuter == null) {
|
||||
update();
|
||||
}
|
||||
@@ -363,7 +363,7 @@ public class ListDemo extends DemoModule {
|
||||
|
||||
class CompanyLogoListCellRenderer extends DefaultListCellRenderer {
|
||||
public Component getListCellRendererComponent(
|
||||
JList list,
|
||||
JList<?> list,
|
||||
Object value,
|
||||
int index,
|
||||
boolean isSelected,
|
||||
|
||||
@@ -163,7 +163,7 @@ public class OptionPaneDemo extends DemoModule {
|
||||
message[0] = getString("OptionPaneDemo.componentmessage");
|
||||
message[1] = new JTextField(getString("OptionPaneDemo.componenttextfield"));
|
||||
|
||||
JComboBox cb = new JComboBox();
|
||||
JComboBox<String> cb = new JComboBox<>();
|
||||
cb.addItem(getString("OptionPaneDemo.component_cb1"));
|
||||
cb.addItem(getString("OptionPaneDemo.component_cb2"));
|
||||
cb.addItem(getString("OptionPaneDemo.component_cb3"));
|
||||
|
||||
@@ -164,7 +164,9 @@ public class SliderDemo extends DemoModule {
|
||||
s.setPaintLabels( true );
|
||||
s.setSnapToTicks( true );
|
||||
|
||||
s.getLabelTable().put(new Integer(11), new JLabel(new Integer(11).toString(), JLabel.CENTER));
|
||||
@SuppressWarnings("unchecked")
|
||||
Dictionary<Object, Object> labelTable = s.getLabelTable();
|
||||
labelTable.put(Integer.valueOf(11), new JLabel(Integer.valueOf(11).toString(), JLabel.CENTER));
|
||||
s.setLabelTable( s.getLabelTable() );
|
||||
|
||||
s.getAccessibleContext().setAccessibleName(getString("SliderDemo.minorticks"));
|
||||
|
||||
@@ -165,7 +165,7 @@ public class SplitPaneDemo extends DemoModule {
|
||||
JLabel label;
|
||||
|
||||
divSize = new JTextField();
|
||||
divSize.setText(new Integer(splitPane.getDividerSize()).toString());
|
||||
divSize.setText(Integer.toString(splitPane.getDividerSize()));
|
||||
divSize.setColumns(5);
|
||||
divSize.getAccessibleContext().setAccessibleName(getString("SplitPaneDemo.divider_size"));
|
||||
divSize.addActionListener(new ActionListener() {
|
||||
|
||||
@@ -71,12 +71,7 @@ public class SwingSet2 extends JPanel {
|
||||
|
||||
void loadDemos() {
|
||||
for(int i = 0; i < demos.length;) {
|
||||
if(isApplet() && demos[i].equals("FileChooserDemo")) {
|
||||
// don't load the file chooser demo if we are
|
||||
// an applet
|
||||
} else {
|
||||
loadDemo(demos[i]);
|
||||
}
|
||||
loadDemo(demos[i]);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
@@ -126,9 +121,6 @@ public class SwingSet2 extends JPanel {
|
||||
// Used only if swingset is an application
|
||||
private JFrame frame = null;
|
||||
|
||||
// Used only if swingset is an applet
|
||||
private SwingSet2Applet applet = null;
|
||||
|
||||
// To debug or not to debug, that is the question
|
||||
private boolean DEBUG = true;
|
||||
private int debugCounter = 0;
|
||||
@@ -151,27 +143,21 @@ public class SwingSet2 extends JPanel {
|
||||
|
||||
private boolean dragEnabled = false;
|
||||
|
||||
public SwingSet2(SwingSet2Applet applet) {
|
||||
this(applet, null);
|
||||
public SwingSet2() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* SwingSet2 Constructor
|
||||
*/
|
||||
public SwingSet2(SwingSet2Applet applet, GraphicsConfiguration gc) {
|
||||
|
||||
// Note that applet may be null if this is started as an application
|
||||
this.applet = applet;
|
||||
|
||||
public SwingSet2(GraphicsConfiguration gc) {
|
||||
String lafClassName = UIManager.getLookAndFeel().getClass().getName();
|
||||
lookAndFeelData = getInstalledLookAndFeelData();
|
||||
currentLookAndFeel = Arrays.stream(lookAndFeelData)
|
||||
.filter(laf -> lafClassName.equals(laf.className))
|
||||
.findFirst().get();
|
||||
|
||||
if (!isApplet()) {
|
||||
frame = createFrame(gc);
|
||||
}
|
||||
frame = createFrame(gc);
|
||||
|
||||
// set the layout
|
||||
setLayout(new BorderLayout());
|
||||
@@ -198,7 +184,7 @@ public class SwingSet2 extends JPanel {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
// Create SwingSet on the default monitor
|
||||
UIManager.put("swing.boldMetal", Boolean.FALSE);
|
||||
SwingSet2 swingset = new SwingSet2(null, GraphicsEnvironment.
|
||||
SwingSet2 swingset = new SwingSet2(GraphicsEnvironment.
|
||||
getLocalGraphicsEnvironment().
|
||||
getDefaultScreenDevice().
|
||||
getDefaultConfiguration());
|
||||
@@ -218,11 +204,7 @@ public class SwingSet2 extends JPanel {
|
||||
|
||||
menuBar = createMenus();
|
||||
|
||||
if (isApplet()) {
|
||||
applet.setJMenuBar(menuBar);
|
||||
} else {
|
||||
frame.setJMenuBar(menuBar);
|
||||
}
|
||||
|
||||
// creates popup menu accessible via keyboard
|
||||
popupMenu = createPopupMenu();
|
||||
@@ -309,13 +291,11 @@ public class SwingSet2 extends JPanel {
|
||||
"FileMenu.save_as_accessible_description", null);
|
||||
|
||||
|
||||
if(!isApplet()) {
|
||||
fileMenu.addSeparator();
|
||||
fileMenu.addSeparator();
|
||||
|
||||
createMenuItem(fileMenu, "FileMenu.exit_label", "FileMenu.exit_mnemonic",
|
||||
"FileMenu.exit_accessible_description", new ExitAction(this)
|
||||
);
|
||||
}
|
||||
createMenuItem(fileMenu, "FileMenu.exit_label", "FileMenu.exit_mnemonic",
|
||||
"FileMenu.exit_accessible_description", new ExitAction(this)
|
||||
);
|
||||
|
||||
// Create these menu items for the first SwingSet only.
|
||||
if (numSSs == 0) {
|
||||
@@ -431,7 +411,6 @@ public class SwingSet2 extends JPanel {
|
||||
|
||||
|
||||
// ***** create the multiscreen menu, if we have multiple screens
|
||||
if (!isApplet()) {
|
||||
GraphicsDevice[] screens = GraphicsEnvironment.
|
||||
getLocalGraphicsEnvironment().
|
||||
getScreenDevices();
|
||||
@@ -449,7 +428,6 @@ public class SwingSet2 extends JPanel {
|
||||
createMultiscreenMenuItem(multiScreenMenu, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return menuBar;
|
||||
}
|
||||
@@ -578,7 +556,7 @@ public class SwingSet2 extends JPanel {
|
||||
|
||||
// register key binding to activate popup menu
|
||||
InputMap map = getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
|
||||
map.put(KeyStroke.getKeyStroke(KeyEvent.VK_F10, InputEvent.SHIFT_MASK),
|
||||
map.put(KeyStroke.getKeyStroke(KeyEvent.VK_F10, InputEvent.SHIFT_DOWN_MASK),
|
||||
"postMenuAction");
|
||||
map.put(KeyStroke.getKeyStroke(KeyEvent.VK_CONTEXT_MENU, 0), "postMenuAction");
|
||||
getActionMap().put("postMenuAction", new ActivatePopupMenuAction(this, popup));
|
||||
@@ -659,37 +637,34 @@ public class SwingSet2 extends JPanel {
|
||||
|
||||
|
||||
/**
|
||||
* Bring up the SwingSet2 demo by showing the frame (only
|
||||
* applicable if coming up as an application, not an applet);
|
||||
* Bring up the SwingSet2 demo by showing the frame
|
||||
*/
|
||||
public void showSwingSet2() {
|
||||
if(!isApplet() && getFrame() != null) {
|
||||
// put swingset in a frame and show it
|
||||
JFrame f = getFrame();
|
||||
f.setTitle(getString("Frame.title"));
|
||||
f.getContentPane().add(this, BorderLayout.CENTER);
|
||||
f.pack();
|
||||
// put swingset in a frame and show it
|
||||
JFrame f = getFrame();
|
||||
f.setTitle(getString("Frame.title"));
|
||||
f.getContentPane().add(this, BorderLayout.CENTER);
|
||||
f.pack();
|
||||
|
||||
Rectangle screenRect = f.getGraphicsConfiguration().getBounds();
|
||||
Insets screenInsets = Toolkit.getDefaultToolkit().getScreenInsets(
|
||||
f.getGraphicsConfiguration());
|
||||
Rectangle screenRect = f.getGraphicsConfiguration().getBounds();
|
||||
Insets screenInsets = Toolkit.getDefaultToolkit().getScreenInsets(
|
||||
f.getGraphicsConfiguration());
|
||||
|
||||
// Make sure we don't place the demo off the screen.
|
||||
int centerWidth = screenRect.width < f.getSize().width ?
|
||||
screenRect.x :
|
||||
screenRect.x + screenRect.width/2 - f.getSize().width/2;
|
||||
int centerHeight = screenRect.height < f.getSize().height ?
|
||||
screenRect.y :
|
||||
screenRect.y + screenRect.height/2 - f.getSize().height/2;
|
||||
// Make sure we don't place the demo off the screen.
|
||||
int centerWidth = screenRect.width < f.getSize().width ?
|
||||
screenRect.x :
|
||||
screenRect.x + screenRect.width/2 - f.getSize().width/2;
|
||||
int centerHeight = screenRect.height < f.getSize().height ?
|
||||
screenRect.y :
|
||||
screenRect.y + screenRect.height/2 - f.getSize().height/2;
|
||||
|
||||
centerHeight = centerHeight < screenInsets.top ?
|
||||
screenInsets.top : centerHeight;
|
||||
centerHeight = centerHeight < screenInsets.top ?
|
||||
screenInsets.top : centerHeight;
|
||||
|
||||
f.setLocation(centerWidth, centerHeight);
|
||||
f.show();
|
||||
numSSs++;
|
||||
swingSets.add(this);
|
||||
}
|
||||
f.setLocation(centerWidth, centerHeight);
|
||||
f.setVisible(true);
|
||||
numSSs++;
|
||||
swingSets.add(this);
|
||||
}
|
||||
|
||||
// *******************************************************
|
||||
@@ -703,8 +678,8 @@ public class SwingSet2 extends JPanel {
|
||||
setStatus(getString("Status.loading") + getString(classname + ".name"));
|
||||
DemoModule demo = null;
|
||||
try {
|
||||
Class demoClass = Class.forName(classname);
|
||||
Constructor demoConstructor = demoClass.getConstructor(new Class[]{SwingSet2.class});
|
||||
Class<?> demoClass = Class.forName(classname);
|
||||
Constructor<?> demoConstructor = demoClass.getConstructor(new Class[]{SwingSet2.class});
|
||||
demo = (DemoModule) demoConstructor.newInstance(new Object[]{this});
|
||||
addDemo(demo);
|
||||
} catch (Exception e) {
|
||||
@@ -712,21 +687,6 @@ public class SwingSet2 extends JPanel {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if this is an applet or application
|
||||
*/
|
||||
public boolean isApplet() {
|
||||
return (applet != null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the applet instance
|
||||
*/
|
||||
public SwingSet2Applet getApplet() {
|
||||
return applet;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the frame instance
|
||||
*/
|
||||
@@ -763,8 +723,6 @@ public class SwingSet2 extends JPanel {
|
||||
if(contentPane == null) {
|
||||
if(getFrame() != null) {
|
||||
contentPane = getFrame().getContentPane();
|
||||
} else if (getApplet() != null) {
|
||||
contentPane = getApplet().getContentPane();
|
||||
}
|
||||
}
|
||||
return contentPane;
|
||||
@@ -886,15 +844,11 @@ public class SwingSet2 extends JPanel {
|
||||
}
|
||||
|
||||
private void updateThisSwingSet() {
|
||||
if (isApplet()) {
|
||||
SwingUtilities.updateComponentTreeUI(getApplet());
|
||||
JFrame frame = getFrame();
|
||||
if (frame == null) {
|
||||
SwingUtilities.updateComponentTreeUI(this);
|
||||
} else {
|
||||
JFrame frame = getFrame();
|
||||
if (frame == null) {
|
||||
SwingUtilities.updateComponentTreeUI(this);
|
||||
} else {
|
||||
SwingUtilities.updateComponentTreeUI(frame);
|
||||
}
|
||||
SwingUtilities.updateComponentTreeUI(frame);
|
||||
}
|
||||
|
||||
SwingUtilities.updateComponentTreeUI(popupMenu);
|
||||
@@ -909,12 +863,8 @@ public class SwingSet2 extends JPanel {
|
||||
public void updateLookAndFeel() {
|
||||
try {
|
||||
UIManager.setLookAndFeel(currentLookAndFeel.className);
|
||||
if (isApplet()) {
|
||||
updateThisSwingSet();
|
||||
} else {
|
||||
for (SwingSet2 ss : swingSets) {
|
||||
ss.updateThisSwingSet();
|
||||
}
|
||||
for (SwingSet2 ss : swingSets) {
|
||||
ss.updateThisSwingSet();
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
System.out.println("Failed loading L&F: " + currentLookAndFeel);
|
||||
@@ -1142,12 +1092,8 @@ public class SwingSet2 extends JPanel {
|
||||
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
boolean dragEnabled = ((JCheckBoxMenuItem)e.getSource()).isSelected();
|
||||
if (isApplet()) {
|
||||
setDragEnabled(dragEnabled);
|
||||
} else {
|
||||
for (SwingSet2 ss : swingSets) {
|
||||
ss.setDragEnabled(dragEnabled);
|
||||
}
|
||||
for (SwingSet2 ss : swingSets) {
|
||||
ss.setDragEnabled(dragEnabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1208,12 +1154,8 @@ public class SwingSet2 extends JPanel {
|
||||
button.addActionListener(new OkAction(aboutBox));
|
||||
}
|
||||
aboutBox.pack();
|
||||
if (isApplet()) {
|
||||
aboutBox.setLocationRelativeTo(getApplet());
|
||||
} else {
|
||||
aboutBox.setLocationRelativeTo(getFrame());
|
||||
}
|
||||
aboutBox.show();
|
||||
aboutBox.setLocationRelativeTo(getFrame());
|
||||
aboutBox.setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1231,13 +1173,13 @@ public class SwingSet2 extends JPanel {
|
||||
getScreenDevices();
|
||||
if (screen == ALL_SCREENS) {
|
||||
for (int i = 0; i < gds.length; i++) {
|
||||
SwingSet2 swingset = new SwingSet2(null,
|
||||
SwingSet2 swingset = new SwingSet2(
|
||||
gds[i].getDefaultConfiguration());
|
||||
swingset.setDragEnabled(dragEnabled);
|
||||
}
|
||||
}
|
||||
else {
|
||||
SwingSet2 swingset = new SwingSet2(null,
|
||||
SwingSet2 swingset = new SwingSet2(
|
||||
gds[screen].getDefaultConfiguration());
|
||||
swingset.setDragEnabled(dragEnabled);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user