Compare commits

..

372 Commits

Author SHA1 Message Date
John Jiang
60fae77974 8237977: Further update javax/net/ssl/compatibility/Compatibility.java
Reviewed-by: rhalade
2020-03-26 07:09:36 +08:00
Jonathan Gibbons
ffe5e84644 8241544: update stylesheet for *-page CSS class rename and hyphenated naming
Reviewed-by: prappo, hannesw
2020-03-25 15:03:39 -07:00
Anthony Scarpino
b0245c2b54 8237219: Disable native SunEC implementation by default
Reviewed-by: weijun, mullan
2020-03-25 12:41:14 -07:00
Naoto Sato
b8f2b3264c 8241311: Move some charset mapping tests from closed to open
Reviewed-by: iris, joehw, itakiguchi, amlu
2020-03-25 09:21:46 -07:00
Aleksey Shipilev
7fc31eadf3 8241583: Shenandoah: turn heap lock asserts into macros
Reviewed-by: rkennke
2020-03-25 17:20:58 +01:00
Ivan Gerasimov
d1b506597f 8237599: Greedy matching against supplementary chars fails to respect the region
Reviewed-by: rriggs
2020-03-25 08:46:31 -07:00
Christian Hagedorn
c01e986cc9 8237859: C2: Crash when loads float above range check
Fix control edges of predicates to data nodes when creating pre/main/post loops.

Reviewed-by: neliasso, thartmann, roland
2020-03-25 14:41:52 +01:00
Claes Redestad
9a6038fbf3 8241584: Remove unused classLoader perf counters
Reviewed-by: hseigel
2020-03-25 13:38:31 +01:00
Aleksey Shipilev
27ef185bae 8241500: FieldLayout/OldLayoutCheck.java fails in 32-bit VMs
Reviewed-by: fparain, dholmes
2020-03-25 07:58:17 +01:00
Vladimir Ivanov
7753422909 8241433: x86: Add VBMI CPU feature detection
Reviewed-by: kvn
2020-03-25 00:10:22 +03:00
Tom Rodriguez
d743518243 8241458: [JVMCI] add mark value to expose CodeOffsets::Frame_Complete
Reviewed-by: kvn
2020-03-24 13:12:19 -07:00
Aleksey Shipilev
3059f593ab 8241545: Shenandoah: purge root work overwrites counters after JDK-8228818
Reviewed-by: zgu
2020-03-24 20:18:45 +01:00
Aleksey Shipilev
7afa57a37e 8241445: Fix copyright in test/jdk/tools/launcher/ArgFileSyntax.java
Reviewed-by: psandoz
2020-03-24 18:46:48 +01:00
Aleksey Shipilev
6694402d3d 8241462: StripNativeDebugSymbols jlink plugin allocates huge arrays
Reviewed-by: alanb, sgehwolf
2020-03-24 18:46:48 +01:00
Aleksey Shipilev
643f5b5350 8241534: Shenandoah: region status should include update watermark
Reviewed-by: rkennke
2020-03-24 18:46:48 +01:00
Aleksey Shipilev
cb1632e8e3 8241520: Shenandoah: simplify region sequence numbers handling
Reviewed-by: rkennke
2020-03-24 18:46:48 +01:00
Thomas Stuefe
40173c5042 8241395: Factor out platform independent code for os::xxx_memory_special()
Reviewed-by: mbaesken, mdoerr, lucy
2020-03-24 18:41:07 +01:00
Daniel D. Daugherty
b5897fe4ed 8241532: ProblemList tests from 8241530 on OSX
Reviewed-by: ctornqvi
2020-03-24 13:08:54 -04:00
Tobias Hartmann
ca85500615 8240905: assert(mem == (Node*)1 || mem == mem2) failed: multiple Memories being matched at once?
Stop recursion if there are multiple loads with different memory inputs in the tree.

Reviewed-by: kvn, vlivanov
2020-03-24 17:39:52 +01:00
Vladimir Kozlov
d01f67193f 8237497: vmStructs_jvmci.cpp does not check that the correct field type is specified
Add missed checks for declarations in vmStructs_jvmci.cpp

Reviewed-by: iklam, thartmann
2020-03-24 09:34:39 -07:00
Andrew Dinn
5110de6c1f 8241144: Javadoc is not generated for new module jdk.nio.mapmode
Jdk.nio.mapmode is not present in DOCS_MODULES defined by Modules.gmk

Reviewed-by: erikj, ihse
2020-03-19 17:26:11 +00:00
Aditya Mandaleeka
32d496507b 8241067: Shenandoah: improve ShenandoahNMethod::has_cset_oops arguments
Reviewed-by: shade
2020-03-24 06:13:39 +01:00
Claes Redestad
23d6a788b4 8241371: Refactor and consolidate package_from_name
Reviewed-by: iklam, lfoltan
2020-03-23 23:18:42 +01:00
Jonathan Gibbons
7dc952ec20 8241292: Interactive Search results are not highlighted as they used to be
Reviewed-by: prappo
2020-03-23 14:11:52 -07:00
Ioi Lam
81353a56f9 8241244: CDS dynamic dump asserts in ArchivePtrBitmapCleaner::do_bit
Reviewed-by: minqi, coleenp
2020-03-23 13:27:22 -07:00
Jonathan Gibbons
f0ba0dc6dc 8241190: Fix name clash for constants-summary CSS class
Reviewed-by: hannesw
2020-03-23 12:48:35 -07:00
Aleksey Shipilev
b6783320ca 8241139: Shenandoah: distribute mark-compact work exactly to minimize fragmentation
Reviewed-by: rkennke
2020-03-23 19:14:01 +01:00
Aleksey Shipilev
fe533725ae 8241435: Shenandoah: avoid disabling pacing with "aggressive"
Reviewed-by: rkennke
2020-03-23 19:14:01 +01:00
Aleksey Shipilev
f37149b1c5 8241351: Shenandoah: fragmentation metrics overhaul
Reviewed-by: rkennke
2020-03-23 19:14:01 +01:00
Poonam Bajaj
edb6783a21 8231779: crash HeapWord*ParallelScavengeHeap::failed_mem_allocate
Reviewed-by: dlong, tschatzl, pliden
2020-03-23 17:57:13 +00:00
Sandhya Viswanathan
398ce2948c 8240248: Extend superword reduction optimizations for x86
Add support for and, or, xor reduction

Co-authored-by: Shravya Rukmannagari <shravya.rukmannagari@intel.com>
Reviewed-by: vlivanov, thartmann
2020-03-23 10:26:40 -07:00
Mandy Chung
75a8b7fa83 8240975: Extend NativeLibraries to support explicit unloading
Reviewed-by: alanb, mcimadamore
2020-03-23 09:05:39 -07:00
Daniel Fuchs
b66c680885 8241443: Problem list some java.net tests failing with NoRouteToHostException on macOS with special network configuration
Reviewed-by: alanb
2020-03-23 14:22:18 +00:00
Kelvin Nilsen
ed28a27490 8241068: Shenandoah: improve ShenandoahTraversalGC constructor arguments
Reviewed-by: shade
2020-03-23 10:37:44 +01:00
Magnus Ihse Bursie
901029355f 8241271: Make hotspot build reproducible
Reviewed-by: erikj, stefank, jwilhelm
2020-03-23 10:29:04 +01:00
Magnus Ihse Bursie
e04080bd0f 8241310: Fix warnings in jdk buildtools
Reviewed-by: erikj, forax
2020-03-23 10:26:13 +01:00
Pengfei Li
618bacec2e 8241091: AArch64: "bad AD file" with VM option "-XX:-UsePopCountInstruction"
Reviewed-by: aph
2020-03-23 08:37:45 +08:00
Xue-Lei Andrew Fan
36af90acc0 8215712: Parsing extension failure may alert decode_error
Reviewed-by: jnimeh
2020-03-22 09:30:16 -07:00
Prasanta Sadhukhan
ef335c75e3 Merge 2020-03-22 09:46:15 +05:30
Phil Race
602d98a72c 8232634: Problem List ICMColorDataTest.java
Reviewed-by: serb, psadhukhan
2020-03-20 22:52:40 -07:00
Prasanta Sadhukhan
672f3a1857 8241291: JCK test javax_swing/text/DefaultStyledDocument/ElementSpec/ESpecCtor.html fails
Reviewed-by: prr
2020-03-21 09:46:44 +05:30
Leonid Mesnik
f778ad2f4b 8241319: WB_GetCodeBlob doesn't have ResourceMark
Reviewed-by: iignatyev, thartmann
2020-03-20 17:37:52 -07:00
Pavel Rappo
17ff85d4ad 8241014: Miscellaneous typos in documentation comments
Reviewed-by: igerasim, prappo, psandoz, rriggs, weijun
2020-03-20 20:54:56 +00:00
Rahul Yadav
c5a7490809 8240921: Minor correction to HttpResponse.BodySubscribers example
The fix updates the incorrect example of the usage of the class java.net.http.HttpResponse.BodySubscribers.

Reviewed-by: chegar, dfuchs, jboes, pconcannon
2020-03-20 20:16:34 +00:00
Yumin Qi
37b7a23317 8241009: CommandLineFlagComboNegative.java fails after JDK-8240563
Jtreg turned off UseCompressedOops and messed up vm flag options of children processes.

Reviewed-by: dholmes, stefank
2020-03-20 09:40:30 -07:00
Xue-Lei Andrew Fan
f67868d917 8219989: Retire the com.sun.net.ssl.internal.ssl.Provider name
Remove the provider name in JDK

Reviewed-by: mullan
2020-03-20 09:27:06 -07:00
Xue-Lei Andrew Fan
d243e40f7b 8241039: Retire the deprecated SSLSession.getPeerCertificateChain() method
Reviewed-by: mullan, alanb, dfuchs
2020-03-20 09:15:00 -07:00
Andrew Haley
2288788e03 Merge 2020-03-20 13:08:20 +00:00
Sergey Bylokhov
b4a3809eaa 8240786: [TESTBUG] The test java/awt/Window/GetScreenLocation/GetScreenLocationTest.java fails on HiDPI screen
Reviewed-by: jdv, pbansal
2020-03-19 22:22:39 -07:00
Andrew Haley
34ae46e2bc 8241296: Segfault in JNIHandleBlock::oops_do()
Reviewed-by: stefank
2020-03-19 14:53:57 +00:00
Jamsheed Mohammed C M
136a1574ec 8237894: CTW: C1 compilation fails with assert(x->type()->tag() == f->type()->tag()) failed: should have same type
Field access instructions hash decalred_type in addition, indexed access instructions hash value type of the instruction in addition.

Reviewed-by: thartmann, shade
2020-03-20 05:19:56 -07:00
Coleen Phillimore
6dffcf7533 8241320: The ClassLoaderData::_is_unsafe_anonymous field is unused in the SA
Remove unused code that is changing in Hotspot for hidden classes.

Reviewed-by: lfoltan, dholmes, sspitsyn
2020-03-20 07:30:52 -04:00
Jia Huang
95d2830361 8240222: [TESTBUG] gtest/jfr/test_networkUtilization.cpp failed when the number of tests is greater than or equal to 2
Reviewed-by: egahlin, mgronlun
2020-03-20 18:52:31 +08:00
Thomas Schatzl
cc83c45595 8240590: Add MemRegion::destroy_array to complement introduced create_array
Reviewed-by: lkorinth, sjohanss
2020-03-20 11:17:45 +01:00
Leonid Mesnik
e7204cbc52 8241123: Refactor vmTestbase stress framework to use j.u.c and make creation of threads more flexible
Reviewed-by: iignatyev, sspitsyn
2020-03-20 00:24:08 -07:00
Kim Barrett
333a832cea 8241001: Improve logging in the ConcurrentGCBreakpoint mechanism
Demoted most breakpoint logging to trace level.

Reviewed-by: pliden, sjohanss
2020-03-20 01:20:37 -04:00
Chris Plummer
104927e514 8241335: ProblemList serviceability/sa/ClhsdbPstack.java due to JDK-8240956
Reviewed-by: mikael
2020-03-19 21:32:57 -07:00
Chris Yin
7ded8b1e30 8241130: com.sun.jndi.ldap.EventSupport.removeDeadNotifier: java.lang.NullPointerException
Reviewed-by: dfuchs
2020-03-20 10:24:46 +08:00
Patricio Chilano Mateo
3f698242a8 8240902: JDI shared memory connector can use already closed Handles
Add refcount to keep track of connection access

Reviewed-by: dholmes, dcubed, sspitsyn
2020-03-20 00:32:29 +00:00
Kim Barrett
b8a2b201b5 8139652: Mutator refinement processing should take the oldest dirty card buffer
Changed mutator refinement to take from queue rather than in-place and reuse.

Reviewed-by: tschatzl, sjohanss
2020-03-19 18:11:52 -04:00
Dean Long
4f629193a9 8241231: Update Graal
Reviewed-by: kvn
2020-03-19 12:29:59 -07:00
Roger Riggs
caa0884400 8241073: Pre-generated Stubs for javax.management, Activation, Naming
Reviewed-by: erikj, ihse, alanb, dfuchs
2020-03-19 15:34:34 -04:00
Phil Race
0f7f181d60 8241233: Typo in problem listing of UIDefaultKeySizeTest.java
Reviewed-by: jdv
2020-03-18 22:27:31 -07:00
Prasanta Sadhukhan
7143a9c581 8241078: OOM error parsing HTML with large <pre> Tag text
Reviewed-by: serb, aivanov
2020-03-19 09:22:37 +05:30
Prasanta Sadhukhan
3340e6f980 8226230: Test javax/swing/JInternalFrame/8020708/bug8020708.java fails on Ubuntu
Reviewed-by: serb
2020-03-19 09:20:06 +05:30
Phil Race
9874e698b8 8241229: Problem list jdk/javax/swing/UIDefaults/8146330/UIDefaultKeySizeTest.java
Reviewed-by: aivanov, serb
2020-03-18 15:48:53 -07:00
Tejpal Rebari
1e217e7b8b 8146330: [macosx] UIDefaults.keys() different size than UIDefaults.keySet()
Reviewed-by: pbansal, serb, jdv
2020-03-18 11:38:33 +05:30
Phil Race
c1f7fa2ece 8223935: PIT: java/awt/font/WindowsIndicFonts.java fails on windows10
Reviewed-by: serb, jdv
2020-03-17 17:38:27 -07:00
Evgeny Nikitin
66c8794c81 8168304: Make all of DependencyContext_test available in product mode
Enable the utility inspection function `DependencyContext::is_dependent_method` and therefore the test in the product mode.

Reviewed-by: eosterlund, thartmann
2020-03-17 21:35:26 +01:00
Jonathan Gibbons
32cba67284 8240476: SystemPropertiesWriter does not conform to standard page layout
Reviewed-by: prappo
2020-03-19 11:25:05 -07:00
Chris Plummer
029fea432a 8240543: Update problem list entry for serviceability/sa/TestRevPtrsForInvokeDynamic.java to reference JDK-8241235
Reviewed-by: dholmes
2020-03-19 10:20:45 -07:00
Magnus Ihse Bursie
9dc15f17ea 8241254: Simplify usage of UTIL_DEPRECATED_ARG_ENABLE
Reviewed-by: erikj
2020-03-19 17:17:49 +01:00
Stefan Karlsson
d3bf915030 8241263: JFR: Bump native events limit
Reviewed-by: mgronlun, egahlin
2020-03-19 14:18:27 +01:00
Stefan Karlsson
5695e59a72 8240818: Remove colon from "JFR: Shutdown Hook" thread name
Reviewed-by: mgronlun
2020-03-19 14:17:20 +01:00
Stefan Karlsson
b4e85913bf 8240819: Assign a name to the JfrThreadSampler thread
Reviewed-by: mgronlun
2020-03-19 14:16:28 +01:00
Stefan Karlsson
e2947fe9e8 8240773: JFR: Non-Java threads are not serialized
Reviewed-by: mgronlun
2020-03-19 14:15:29 +01:00
Sergey Bylokhov
72b251d372 8226806: [macOS 10.14] Methods of Java Robot should be called from appropriate thread
Reviewed-by: psadhukhan, prr
2020-03-16 17:33:52 -07:00
Prasanta Sadhukhan
bca2465c94 8236635: JTabbedPane preferred size calculation is wrong for SCROLL_TAB_LAYOUT
Reviewed-by: serb, pbansal
2020-03-16 12:49:08 +05:30
Ambarish Rapte
3a7389f564 8226253: JAWS reports wrong number of radio buttons when buttons are hidden
Reviewed-by: kizune, pbansal
2020-03-15 00:43:54 +05:30
Kiran Sidhartha Ravikumar
fa069be2f2 8161558: ListIterator should not discard cause on exception
Reviewed-by: smarks
2020-03-13 18:38:07 +00:00
Alexander Scherbatiy
cd7d175001 8240604: Rewrite sun/management/jmxremote/bootstrap/CustomLauncherTest.java test to make binaries from source file
Reviewed-by: iignatyev
2020-03-19 14:58:04 +03:00
Roland Westrelin
c9faf88cb7 8240795: [REDO] 8238384 CTW: C2 compilation fails with "assert(store != load->find_exact_control(load->in(0))) failed: dependence cycle found"
Reviewed-by: kvn, thartmann
2020-03-13 16:32:51 +01:00
Phil Race
23fda7e41b 8240977: ProblemList failing jtreg tests on macos
Reviewed-by: serb
2020-03-12 17:53:08 -07:00
Sergey Bylokhov
b4863f9dd8 8240633: Memory leaks in the implementations of FileChooserUI
Reviewed-by: pbansal, psadhukhan
2020-03-12 10:00:23 +01:00
Sergey Bylokhov
4f1fabd8d0 8238075: [OGL] Delete unused properties
Reviewed-by: kizune
2020-03-11 21:58:16 -07:00
Marc Hoffmann
afe70e6985 8237746: Fixing compiler warnings in src/demo/share/jfc
Reviewed-by: kizune, aivanov
2020-03-12 03:26:04 +01:00
Sergey Bylokhov
f3ef97263f 8040630: Popup menus and tooltips flicker with previous popup contents when first shown
Reviewed-by: kizune, pbansal
2020-03-10 13:58:46 -07:00
Sergey Bylokhov
40f6d697d2 8233573: Toolkit.getScreenInsets(GraphicsConfiguration) may throw ClassCastException
Reviewed-by: prr, jdv
2020-03-10 11:30:33 -07:00
Jayathirth D V
bd78beae15 6532025: GIF reader throws misleading exception with truncated images
Reviewed-by: prr, bpb
2020-03-10 16:07:58 +05:30
Toshio Nakamura
15a838d312 8240518: Incorrect JNU_ReleaseStringPlatformChars in Windows Print
Reviewed-by: serb, pbansal, psadhukhan
2020-03-09 15:07:11 +05:30
Alexander Zuev
315635ea09 8176040: Documentation of java.awt.Rectangle.add(java.awt.Point) is wrong
Reviewed-by: serb, prr
2020-03-09 00:18:23 +03:00
Sergey Bylokhov
bce81496ce 8219578: No associated icon for the leaf node of JTree
Reviewed-by: prr, jdv
2020-03-06 14:41:35 -08:00
Claes Redestad
cc9470ece1 8241095: x86: Improve prefix handling in Assembler
Reviewed-by: kvn, thartmann
2020-03-05 16:07:17 +01:00
Christian Hagedorn
a51dd58f38 8240227: Loop predicates should be copied to unswitched loops
Copy loop range check predicates to unswitched loops and update their control edges.

Reviewed-by: kvn, neliasso, thartmann, roland
2020-03-19 10:15:28 +01:00
Jie Fu
dd63eec6e5 8241232: -XX:+BootstrapJVMCI is not compatible with TieredStopAtLevel < CompLevel_full_optimization
Reviewed-by: kvn, thartmann
2020-03-19 16:34:01 +08:00
Matthias Baesken
cadfc3d570 8241064: JFR related tests TestMetaspaceAllocationFailure.java and TestEventInstrumentation.java miss requires tag
Reviewed-by: mseledtsov, mgronlun
2020-03-16 15:11:02 +01:00
Igor Veresov
f1c919f28f 8230290: [JVMCI] Remove unused API entry points
Remove VirtualObject.setIsAutoBox()

Reviewed-by: kvn
2020-03-18 21:49:35 -07:00
Chris Yin
599af2ac26 8202117: com/sun/jndi/ldap/RemoveNamingListenerTest.java fails intermittently: Connection reset
Reviewed-by: dfuchs, vtewari
2020-03-19 11:07:36 +08:00
Jesper Wilhelmsson
c7c8623ed6 Added tag jdk-15+15 for changeset 82b7c62cf4cc 2020-03-19 03:03:55 +01:00
Matthias Neugschwandtner
99546049b3 8235908: omit ThreadPriorityPolicy warning when value is set from image
Reviewed-by: dholmes, clanger, kvn
2020-03-18 15:59:07 -07:00
Andrew M Leonard
44eca823aa 8241097: java/math/BigInteger/largeMemory/SymmetricRangeTests.java requires -XX:+CompactStrings
Reviewed-by: bpb, bchristi
2020-03-17 14:14:27 +00:00
Rafael Winterhalter
9d7f8bc9a0 8202469: (ann) Type annotations on type variable bounds that are also type variables are lost
Reviewed-by: jfranck
2020-03-18 17:07:42 -04:00
Jonathan Gibbons
af28093ed8 Merge 2020-03-18 13:29:02 -07:00
Chris Plummer
9fe762d3c5 8241162: ProblemList serviceability/sa/TestHeapDumpForInvokeDynamic.java on OSX
Reviewed-by: dcubed
2020-03-18 13:24:59 -07:00
Jonathan Gibbons
ea367322f2 8241030: rename HtmlTag to TagName
Reviewed-by: prappo
2020-03-18 13:20:13 -07:00
Doug Simon
34b9ac2287 8236285: [JVMCI] improve TranslatedException traces
Reviewed-by: never, kvn
2020-03-18 13:11:09 -07:00
Vicente Romero
bf54c47471 8240970: Some tests fail when run with JCov
Reviewed-by: jjg
2020-03-18 14:33:05 -04:00
Aleksey Shipilev
700f50f287 8241128: x86_32 build failure after JDK-8241042
Reviewed-by: redestad, kvn
2020-03-18 19:24:42 +01:00
Daniil Titov
b70ef0d2e2 8240711: TestJstatdPort.java failed due to "ExportException: Port already in use:"
Reviewed-by: amenkov
2020-03-18 11:05:11 -07:00
Chris Plummer
c6cec8a8ea 8227340: Modify problem list entry for javax/management/remote/mandatory/connection/MultiThreadDeadLockTest.java
Reviewed-by: dholmes
2020-03-18 10:42:32 -07:00
Chris Plummer
1170981e93 8240906: Update ZGC ProblemList for serviceability/sa/TestJmapCoreMetaspace.java
Reviewed-by: stefank
2020-03-18 10:14:46 -07:00
Mikhailo Seledtsov
0ee7497937 8241033: Create test library utility for getting JFR streaming repository
New method to get JFR streaming repo path

Reviewed-by: egahlin, mgronlun
2020-03-18 09:45:20 -07:00
Tony Printezis
f2fb5c54ae 8239497: SEGV in EdgeUtils::field_name_symbol(Edge const&)
Reviewed-by: egahlin, tonyp
2020-03-18 12:00:19 +01:00
Jesper Wilhelmsson
efb25e5127 Merge 2020-03-18 10:41:26 +01:00
Jesper Wilhelmsson
abc5619317 Added tag jdk-14-ga for changeset bc54620a3848 2020-03-18 10:34:13 +01:00
Ichiroh Takiguchi
d76b0cf705 8232161: Align some one-way conversion in MS950 charset with Windows
MS950 charset encoder's conversion table is changed

Reviewed-by: naoto
2020-03-18 18:04:51 +09:00
Ivan Gerasimov
1d4a4fed43 8214245: Case insensitive matching doesn't work correctly for some character classes
Reviewed-by: rriggs, darcy
2020-03-18 01:04:22 -07:00
Aleksey Shipilev
e827f4ae1c 8241093: Shenandoah: editorial changes in flag descriptions
Reviewed-by: rkennke
2020-03-18 06:28:50 +01:00
Naoto Sato
e5e24ad080 8241082: Upgrade IANA Language Subtag Registry data to 03-16-2020 version
Reviewed-by: joehw
2020-03-17 19:11:10 -07:00
Hai-May Chao
0c9f8e472f 8186143: keytool -ext option doesn't accept wildcards for DNS subject alternative names
Reviewed-by: jnimeh, weijun, mullan
2020-03-18 09:23:57 +08:00
Chris Plummer
a147636157 8238268: Many SA tests are not running on OSX because they do not attempt to use sudo when available
Reviewed-by: sspitsyn, iignatyev
2020-03-17 18:04:59 -07:00
David Holmes
94a6149de5 8241124: Aarch64 build broken by JDK-8239593
Reviewed-by: mikael
2020-03-17 20:54:50 -04:00
David Holmes
f959b01203 8239593: Bogus warning "Re-registering of platform native method" for a JVMTI agent
Reviewed-by: dcubed, alanb, hseigel
2020-03-17 19:57:58 -04:00
Charlie Gracie
c003fffd84 8241122: Remove unimplemented InlineTree constructor definition from parse.hpp
Reviewed-by: kvn
2020-03-17 14:05:12 -07:00
Vladimir Kozlov
6083173f9b 8237045: JVM uses excessive memory with -XX:+EnableJVMCI -XX:JVMCICounterSize=2147483648
Limit JVMCICounterSize flag's value range to 1M

Reviewed-by: thartmann, redestad
2020-03-17 12:42:48 -07:00
Claes Redestad
176192499f 8241042: x86_64: Improve Assembler generation
Reviewed-by: vlivanov, kvn
2020-03-05 16:07:17 +01:00
Vladimir Kozlov
ec5bd02186 8240976: [JVMCI] MethodProfileWidth flag is broken
Remove JVMCI code which is not used

Reviewed-by: thartmann, redestad
2020-03-17 10:38:40 -07:00
Andrew Haley
1a0995981c Merge 2020-03-17 14:13:52 +00:00
Roman Kennke
035100cc89 8241081: Shenandoah: Do not modify update-watermark concurrently
Reviewed-by: shade
2020-03-17 11:49:25 +01:00
Claes Redestad
dbd0f0dc3b 8241077: x86_64: Minor Assembler improvements
Reviewed-by: kvn
2020-03-17 09:36:46 +01:00
Matthias Baesken
6f7a103abc 8240824: enhance print_full_memory_info on Linux by THP related information
Reviewed-by: dholmes, stuefe
2020-03-17 08:53:29 +01:00
Andrew Haley
195361216c 8241018: 32-bit integer log2 functions return the wrong value for negative arguments on 64-bit machines
Reviewed-by: kvn
2020-03-16 17:10:26 +00:00
Naoto Sato
2b4b3d9efc 8240626: Some of the java.time.chrono.Eras return empty display name for some styles and locales
Reviewed-by: joehw
2020-03-16 09:26:01 -07:00
Jie Fu
e746891f96 8241034: Fix a configuring error with "-Xmx2048M: command not found"
Reviewed-by: mikael, erikj
2020-03-16 22:43:44 +08:00
Erik Österlund
21cd75cb98 8240363: Refactor Compile::Output() to its own Phase
Reviewed-by: kvn, vlivanov
2020-03-16 12:27:42 +00:00
Jan Lahoda
6ddb0f2b2c 8240964: Compilation error thrown when long literal used with yield
Ensuring yield followed by a long literal is recognized as a yield statement.

Reviewed-by: mcimadamore
2020-03-16 13:06:35 +01:00
David Holmes
95898e86a1 8241043: Expand assertions to identify thread with errant _stack_base
Reviewed-by: mikael
2020-03-16 02:16:49 -04:00
Nick Gasson
4b978533ca 8240353: AArch64: missing support for -XX:+ExtendedDTraceProbes in C1
Reviewed-by: aph
2020-03-16 10:51:01 +08:00
Vicente Romero
f819e417f9 8235339: test TargetAnnoCombo.java is failing after new target RECORD_COMPONENT was added
Reviewed-by: darcy
2020-03-14 17:08:25 -04:00
Joe Darcy
b019469232 8240130: Improve and update discussion of visitor evolution warnings
Reviewed-by: jjg
2020-03-14 09:53:43 -07:00
Kim Barrett
6ead90568f 8239825: G1: Simplify threshold test for mutator refinement
Compute refinement threshold when values change, not on each use.

Reviewed-by: tschatzl, sangheki
2020-03-13 15:36:50 -04:00
Alex Menkov
3aeb2d1a51 8217441: Failure of ::realloc() should be handled correctly in sawindbg.cpp
Reviewed-by: cjplummer, sspitsyn
2020-03-13 12:25:25 -07:00
Joe Wang
c7e4b2afe2 8240982: Incorrect copyright header in BCEL 6.4.1 sources
Reviewed-by: naoto, lancea
2020-03-13 19:15:32 +00:00
Jonathan Gibbons
afa54b7ed5 8240916: Convert to using hyphenated naming for CSS classes
Reviewed-by: hannesw
2020-03-13 10:57:41 -07:00
Claes Redestad
2b465b1ebf 8241010: Unnecessarily resolving some well-known classes
Reviewed-by: coleenp
2020-03-13 18:43:11 +01:00
Claes Redestad
37629673e7 8241006: Cleanup TemplateInterpreter initialization
Reviewed-by: coleenp
2020-03-13 15:59:27 +01:00
Vicente Romero
afbe2286e2 8239447: compiler error for annotations applied to record components with target METHOD
Reviewed-by: mcimadamore
2020-03-13 10:29:03 -04:00
Per Lidén
9e94572078 8240714: ZGC: TestSmallHeap.java failed due to OutOfMemoryError
Reviewed-by: eosterlund
2020-03-13 14:26:38 +01:00
Weijun Wang
9d502f648c 8240983: Incorrect copyright header in Apache Santuario files
Reviewed-by: mullan
2020-03-13 21:32:27 +08:00
Aditya Mandaleeka
5ed80778bc 8231668: Remove ForceDynamicNumberOfGCThreads
Reviewed-by: shade, tschatzl
2020-03-13 13:22:39 +01:00
Ivan Walulya
5a68ba1339 8240591: G1HeapSizingPolicy attempts to compute expansion_amount even when at full capacity
Reviewed-by: sjohanss, tschatzl
2020-03-13 11:54:47 +01:00
Weijun Wang
05c539c9b4 8240980: Backout JDK-8240261
Reviewed-by: dholmes
2020-03-13 17:45:55 +08:00
Roland Westrelin
2a35bc5aee 8240854: [REDO] some jaotc failures of fastdebug build with specific flags
Reviewed-by: vlivanov, kvn, thartmann
2020-03-11 10:32:07 +01:00
Jie Fu
a8b4801859 8240846: Zero VM is broken after JDK-8238681: UseSSE not defined
Reviewed-by: shade, rehn, vlivanov
2020-03-13 17:01:16 +08:00
Calvin Cheung
38940d166a 8238000: Crash in ClassLoader::record_result while dynamic dumping netty
Make a copy of the _shared_path_table for use during dynamic CDS dump.

Reviewed-by: iklam, minqi
2020-03-12 16:05:07 -07:00
Valerie Peng
0610992a8f 8238566: java.security.Provider$Service.supportsParameter() is racy
Use double-checked-locking pattern inside the hasKeyAttributes() method

Reviewed-by: xuelei
2020-03-12 22:11:49 +00:00
Jonathan Gibbons
2eaeb20697 8240555: Using env of JAVA_TOOL_OPTIONS and _JAVA_OPTIONS breaks QuietOption.java test
Reviewed-by: shurailine, prappo
2020-03-12 14:14:29 -07:00
Jonathan Gibbons
5bc78c438b 8240971: Fix CSS styles in some doc comments
Reviewed-by: mchung
2020-03-12 13:56:55 -07:00
Junyuan Zheng
e30b89e138 8240972: macOS codesign fail on macOS 10.13.5 or older
Reviewed-by: erikj, ihse
2020-03-12 12:55:19 -07:00
Mandy Chung
e9494f2155 8240242: improve the javadoc for Lookup::dropLookupModes w.r.t. dropping UNCONDITIONAL
Reviewed-by: chegar, rriggs
2020-03-12 11:56:49 -07:00
Mandy Chung
d5d6dc0caa 8228336: Refactor native library loading implementation
Reviewed-by: alanb, dholmes
2020-03-12 11:54:11 -07:00
Magnus Ihse Bursie
36fac8c332 8240950: Missing AC_SUBST after JDK-82408
Reviewed-by: erikj
2020-03-12 19:43:09 +01:00
Magnus Ihse Bursie
ed8c11e0d1 8149110: Introduce DISABLED_WARNINGS for Java compilation
Reviewed-by: erikj
2020-03-12 19:42:06 +01:00
Magnus Ihse Bursie
3aceb74ac9 8240947: Change conflicting JVM features from warning to error
Reviewed-by: erikj
2020-03-12 19:40:44 +01:00
Daniel Fuchs
58337b12f8 8059309: network tests fail with "java.net.SocketException: Couldn't obtain phys addr" when run as "root"
The solaris specific code is changed to use the fallback mechanism if the DLPI interface returns an error indicating that the operation is unsupported. In addition, NetworkInterface::getHardwareAddress is changed to always return null for the loopback interface.

Reviewed-by: alanb
2020-03-12 18:31:49 +00:00
Aleksey Shipilev
3ee99ca1d7 8240948: Shenandoah: cleanup not-forwarded-objects paths after JDK-8240868
Reviewed-by: rkennke
2020-03-12 18:50:18 +01:00
Patrick Concannon
de5208e3c0 Merge 2020-03-12 17:20:55 +00:00
Zhengyu Gu
71e1277fb3 8240917: Shenandoah: Avoid scanning thread code roots twice in all root scanner
Reviewed-by: rkennke
2020-03-12 13:08:40 -04:00
Patrick Concannon
0ed44d0aee 8239355: (dc) Initial value of SO_SNDBUF should allow sending large datagrams (macOS)
Updates DatagramChannel so that the SO_SNDBUF is set to a minimum value of 65527 for IPv6 sockets and 65507 for IPv4 sockets on macOS.

Reviewed-by: alanb, dfuchs
2020-03-12 17:08:09 +00:00
Roman Kennke
e5ab701157 8240873: Shenandoah: Short-cut arraycopy barriers
Reviewed-by: shade
2020-03-12 17:52:47 +01:00
Roman Kennke
70e730fd5c 8240872: Shenandoah: Avoid updating new regions from start of evacuation
Reviewed-by: shade
2020-03-12 17:52:10 +01:00
Yumin Qi
90a39195c1 8240563: [TESTBUG] WB_IsCDSIncludedInVmBuild should support uncompressed oops/klasses
With 8232069, CDS works with uncompressed oops/kalsses, detecting CDS code no longer bases on the two flags.

Reviewed-by: iklam
2020-03-12 09:07:11 -07:00
Roger Riggs
c68e15c0c3 8240957: Clarify BadAttributeValueExpException readObject method
Reviewed-by: bpb
2020-03-12 11:57:35 -04:00
Roger Riggs
fee69babbd 8240704: CheckHandles.java failed "AssertionError: Handle use increased by more than 10 percent."
Reviewed-by: dfuchs
2020-03-12 11:54:39 -04:00
Naoto Sato
eeaafbe141 8216332: Grapheme regex does not work with emoji sequences
Reviewed-by: rriggs
2020-03-12 08:31:26 -07:00
Pankaj Bansal
e70ee3dcf7 8231042: [macos] JFileChooser creates new folder on ESC
Reviewed-by: serb, psadhukhan
2020-03-03 18:26:57 +05:30
Pankaj Bansal
23def435d4 8239902: Remove direct usage of JSlider, JProgressBar classes in CAccessible class
Reviewed-by: serb
2020-03-03 17:49:58 +05:30
Pankaj Bansal
c2867d6577 8204161: [TESTBUG] auto failed with the "Applet thread threw exception: java.lang.UnsupportedOperationException" exception
Reviewed-by: serb
2020-03-03 17:37:04 +05:30
Prasanta Sadhukhan
6b45504934 Merge 2020-03-03 14:45:47 +05:30
Prasanta Sadhukhan
26a7b0dddd Merge 2020-03-03 13:31:33 +05:30
Sergey Bylokhov
9d0a4875d7 8238936: The crash in XRobotPeer when the custom GraphicsDevice is used
Reviewed-by: kizune
2020-03-03 03:46:11 +00:00
David Holmes
c42de93347 8238676: jni crashes on accessing it from process exit hook
Reviewed-by: fparain, gziemski
2020-03-02 19:49:42 -05:00
Sergey Bylokhov
70e2c013d7 8235153: [TESTBUG] [macos 10.15] java/awt/Graphics/DrawImageBG/SystemBgColorTest.java fails
Reviewed-by: aivanov
2020-03-02 23:35:50 +00:00
Mikhailo Seledtsov
35ee1cb2b3 8236938: [TESTBUG] JFR event MetaspaceAllocationFailure is not tested
New test for MetaspaceAllocationFailure

Reviewed-by: hseigel, stuefe
2020-03-02 12:16:18 -08:00
Christoph Langer
78d35f1435 8239149: Cleanups in SunFontManager.java and TrueTypeFont.java
Reviewed-by: prr
2020-03-02 21:04:48 +01:00
Kim Barrett
96b61b8f4b 8240246: Avoid cast_to_oop from char*
Change type of gtest object from char[] to unsigned char[].

Reviewed-by: dholmes
2020-03-02 14:45:52 -05:00
Lois Foltan
c280d98e80 8237766: Enhance signature API to include ResolvingSignatureStream
New ResolvingSignatureStream class provides the capability to easily walk through the differing parts of a signature while resolving or querying its underlying types.

Co-authored-by: John Rose <john.r.rose@oracle.com>
Reviewed-by: coleenp, fparain, hseigel
2020-03-02 18:42:22 +00:00
Patrick Concannon
e455d382e7 8234812: Add micros for DatagramChannel send/receive
Benchmarks for the DatagramChannel::send and DatagramChannel::receive methods

Reviewed-by: alanb, chegar
2020-03-02 16:47:51 +00:00
Harold Seigel
6bb0536293 8239568: [TESTBUG] LoadLibraryTest.java fails with RuntimeException
Throw jtreg.SkippedException instead of failing if shared library isn't unloaded

Reviewed-by: coleenp, lmesnik
2020-03-02 16:10:01 +00:00
Prasanta Sadhukhan
65bf61852f Merge 2020-03-02 10:50:33 +05:30
Ioi Lam
0532bd23cd 8240267: VM fails to start with CDS enabled but JVMTI disabled
Reviewed-by: dholmes
2020-03-01 17:36:03 -08:00
Sergey Bylokhov
5e912fbec5 8240202: A few client tests leave mouse buttons pressed
Reviewed-by: prr
2020-02-28 16:49:10 -08:00
Sergey Bylokhov
55768aa45d 8239583: [AIX] simplify the native references in X input methods
Reviewed-by: clanger, itakiguchi
2020-02-27 09:49:33 +00:00
Kun Wang
742bdf003e 8239915: Zero VM crashes when handling dynamic constant
Reviewed-by: dholmes
2020-02-26 17:32:04 +08:00
Lin Zang
0a820d6d21 8239916: SA: delete dead code in jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java
Reviewed-by: stefank
2020-02-29 14:43:09 +08:00
Yumin Qi
5bfb8146e9 8240258: SystemDictionary::quick_resolve need guarded by INCLUDE_CDS
Supplemental fix for 8236604 to guard SystemDictionary::quick_resolve with CDS

Reviewed-by: iklam, ccheung
2020-02-28 19:29:11 -08:00
Jie Fu
f176fae840 8240254: Build is broken when cds is disabled after JDK-8236604
Reviewed-by: redestad
2020-02-29 09:38:12 +08:00
Yumin Qi
add146cc8b 8236604: Optimize SystemDictionary::resolve_well_known_classes for CDS
Serialize SystemDictionary::_well_known_classes into CDS and quickly resolve them at runtime in vm startup stage.

Reviewed-by: iklam, coleenp
2020-02-28 15:30:29 -08:00
Leonid Mesnik
b247e6d908 8203239: [TESTBUG] remove vmTestbase/vm/gc/kind/parOld test
Reviewed-by: lkorinth, shade
2020-02-28 13:21:01 -08:00
Jonathan Gibbons
1be89d9640 8240136: Cleanup/simplify HTML/CSS for definition lists
Reviewed-by: prappo
2020-02-28 12:46:58 -08:00
Volker Simonis
b38f3cf3bd 8240226: DeflateIn_InflateOut.java test incorrectly assumes size of compressed file
Reviewed-by: martin, alanb
2020-02-28 19:49:39 +01:00
Aleksey Shipilev
8a79f26795 8240217: Shenandoah: remove ShenandoahEvacAssist
Reviewed-by: rkennke
2020-02-28 17:59:52 +01:00
Aleksey Shipilev
6ad1db40d8 8240216: Shenandoah: remove ShenandoahTerminationTrace
Reviewed-by: zgu
2020-02-28 17:59:51 +01:00
Aleksey Shipilev
5afeeed5b2 8240215: Shenandoah: remove ShenandoahAllocationTrace
Reviewed-by: rkennke
2020-02-28 17:59:50 +01:00
Lutz Schmidt
637795e0a7 8239931: [win][x86] vtable stub generation: assert failure (code size estimate) follow-up
Reviewed-by: mdoerr
2020-02-28 16:36:47 +01:00
Peter Tribble
0cd6d13b24 8240231: Build failure on illumos after 8238988
Add missing cast

Reviewed-by: dcubed, shade
2020-02-28 10:16:44 -05:00
Christian Hagedorn
bd25c0e01a 8239852: java/util/concurrent tests fail with -XX:+VerifyGraphEdges: assert(!VerifyGraphEdges) failed: verification should have failed
Remove an assertion which was too strong for some valid IRs when running with -XX:+VerifyGraphEdges

Reviewed-by: neliasso, thartmann
2020-02-28 15:33:44 +01:00
Magnus Ihse Bursie
290c21f067 8239799: Cross-compilation ARM32/AARCH clientvm builds fails after JDK-8239450
Reviewed-by: erikj
2020-02-28 09:53:18 +01:00
Xue-Lei Andrew Fan
0ab5b968fb 8240193: loadLibrary("osxsecurity") should not be removed
Reviewed-by: ascarpino
2020-02-27 21:14:59 -08:00
Chris Plummer
511501048c 8193237: SA: ClhsdbLauncher should show the command being executed
Reviewed-by: sspitsyn, amenkov
2020-02-27 13:57:33 -08:00
Chris Plummer
3a5ee7b422 8239379: ProblemList serviceability/sa/sadebugd/DebugdConnectTest.java on OSX
Reviewed-by: sspitsyn
2020-02-27 13:52:49 -08:00
Chris Plummer
518f1f9a6e 8240142: Fix copyright in ThreadGroupReferenceImpl.h
Reviewed-by: dholmes
2020-02-27 13:51:04 -08:00
Jonathan Gibbons
39d75e894b 8239804: Cleanup/simplify HTML/CSS for general block tags
Reviewed-by: prappo, hannesw
2020-02-27 12:16:03 -08:00
Bradford Wetmore
4a951001b5 8239815: Update ECC legal file
Reviewed-by: mullan
2020-02-27 11:48:18 -08:00
Joe Darcy
ed62024978 8225495: Note whether returned annotations are declaration annotations or type annotations
Reviewed-by: jjg
2020-02-27 10:30:08 -08:00
Zhengyu Gu
efdc0037b8 8239354: Shenandoah: minor enhancements to traversal GC
Reviewed-by: rkennke
2020-02-27 12:17:31 -05:00
Daniel D. Daugherty
882633a738 8239873: [TESTBUG] FieldLayout/OldLayoutCheck.java fails after the fix for JDK-8239503
Don't run the test with -XX:-UseCompressedOops.

Reviewed-by: fparain, hseigel
2020-02-27 11:34:48 -05:00
Zhengyu Gu
5551d3d888 8237632: Shenandoah: accept NULL fwdptr to cooperate with JVMTI and JFR
Reviewed-by: shade, rkennke
2020-02-26 15:32:25 -05:00
Harold Seigel
a1e9328367 8235225: Replace CHECK_0 with CHECK_NULL for non-integer returning methods
Change CHECK_0 to CHECK_NULL and CHECK_false where appropriate

Reviewed-by: mikael, dholmes, coleenp
2020-02-27 13:00:05 +00:00
Nils Eliasson
2ba0575cea 8239878: Bug in PrintEliminateAllocations code causes TestClhsdbJstackLock.java to fail
Reviewed-by: shade
2020-02-27 13:11:06 +01:00
Rahul Raghavan
c8ed0128c2 8235995: Remove src/jdk.internal.vm.compiler/.mx.graal directory
Removed src/jdk.internal.vm.compiler/.mx.graal directory and files

Reviewed-by: dlong
2020-02-27 16:06:43 +05:30
Amy Lu
67ba91ba52 8239979: sun/security/tools/keytool/ExtOptionCamelCase.java is not run
Reviewed-by: rhalade
2020-02-27 12:19:24 +08:00
David Holmes
eef5ef88b3 8240141: Incorrect copyright header in src/hotspot/os_cpu/linux_sparc/os_linux_sparc.cpp
Reviewed-by: iignatyev
2020-02-26 23:10:57 -05:00
Jesper Wilhelmsson
52fe584c5a Added tag jdk-15+12 for changeset 2ec0ff304263 2020-02-27 03:10:23 +01:00
Daniel D. Daugherty
530d53f84e 8240135: ProblemList vmTestbase/vm/mlvm/meth/stress/compiler/deoptimize/Test.java#id1
Reviewed-by: iignatyev, dholmes
2020-02-26 19:41:39 -05:00
Daniel D. Daugherty
cea9a9b8ce 8240134: ProblemList javax/script/Test7.java
Reviewed-by: dholmes
2020-02-26 19:39:32 -05:00
Daniel D. Daugherty
be1007cfaf 8240132: ProblemList com/sun/jdi/InvokeHangTest.java
Reviewed-by: mikael
2020-02-26 19:33:14 -05:00
Sergei Tsypanov
f729514ebd 8240094: Optimize empty substring handling
Reviewed-by: redestad, igerasim, jlaskey
2020-02-26 21:24:02 +01:00
Alexey Ivanov
fa7f53ee93 8235147: Release HDC from passiveDCList sooner
Reviewed-by: serb, jdv
2020-02-25 20:00:24 +00:00
Zhengyu Gu
b4ff6abe63 8239926: Shenandoah: Shenandoah needs to mark nmethod's metadata
Reviewed-by: rkennke, shade
2020-02-25 12:01:35 -05:00
Erik Österlund
8b73900222 8241074: JDK-8240363 broke the build on AArch64
Reviewed-by: shade
2020-03-16 17:13:56 +00:00
Severin Gehwolf
add18914fb 8239785: Cgroups: Incorrect detection logic on old systems in hotspot
Return NULL subsystem if no cgroup controllers are mounted.

Reviewed-by: bobv, mbaesken
2020-02-25 12:17:26 +01:00
Vladimir Ivanov
48c48b7a85 8238696: x86: Enumerate all detected CPU features in VM_Version feature string
Reviewed-by: dholmes, kvn
2020-03-12 16:42:03 +03:00
Zhengyu Gu
1f189228b6 8240915: Shenandoah: Remove unused fields in init mark tasks
Reviewed-by: rkennke
2020-03-12 09:25:08 -04:00
Yudi Zheng
21d3eaf587 8240831: [JVMCI] Export missing vmStructs entries used by JVMCI compilers
Reviewed-by: kvn, thartmann
2020-03-12 13:20:53 +01:00
Claes Redestad
d49cf17db0 8240669: Devirtualize Relocation::type
Reviewed-by: rbackman, thartmann
2020-03-05 16:07:17 +01:00
Claes Redestad
7fe46b2464 8240772: x86_64: Pre-generate Assembler::popa, pusha and vzeroupper
Reviewed-by: iklam, kvn
2020-03-12 13:07:21 +01:00
Richard Reingruber
c5bd0d7934 8234146: compiler/jsr292/ContinuousCallSiteTargetChange.java times out on SPARC
Reviewed-by: vlivanov, thartmann
2020-03-12 11:51:00 +01:00
Weijun Wang
0368e41c12 8240261: Use make/templates/gpl-cp-header in FieldGen.java
Reviewed-by: erikj
2020-03-12 18:21:59 +08:00
Kelvin Nilsen
19e02810db 8225216: gc/logging/TestMetaSpaceLog.java doesn't work for Shenandoah
Reviewed-by: shade
2020-03-12 06:47:17 +01:00
Ioi Lam
b0f32c4431 8240548: [TESTBUG] CDS NoClassToArchive.java fails with Graal
Reviewed-by: dholmes, mchung
2020-03-11 21:37:45 -07:00
Jesper Wilhelmsson
92686e1add Added tag jdk-15+14 for changeset 1d6ceb13e142 2020-03-12 03:10:32 +01:00
Yasumasa Suenaga
069d9e792e 8234624: jstack mixed mode should refer DWARF
Reviewed-by: sspitsyn, kevinw
2020-03-12 09:23:05 +09:00
Jonathan Gibbons
5b9a09cb9c 8240138: Cleanup HtmlTree
Reviewed-by: prappo
2020-03-11 15:46:17 -07:00
Magnus Ihse Bursie
6b487c3cfe 8240866: Typo in JDK-8240820 messes up configure --help
Reviewed-by: erikj
2020-03-11 22:25:18 +01:00
Alex Menkov
5531199db4 8240340: java/lang/management/ThreadMXBean/Locks.java is buggy
Reviewed-by: dholmes, sspitsyn
2020-03-11 13:39:27 -07:00
Serguei Spitsyn
db69852ac2 8240881: [BACKOUT] 8222489 jcmd VM.system_properties gives unusable paths on Windows
Undo the 8222489 changeset

Reviewed-by: dcubed, iklam
2020-03-11 20:28:43 +00:00
Pavel Rappo
8c6649dea0 8239487: Better links generation for system properties found in HTML files
8239485: Define behavior of the System Properties page when no system properties are available

Reviewed-by: jjg
2020-03-11 17:09:10 +00:00
Adam Sotona
5b323a8656 8230117: Remove unused JAR tool classes
Reviewed-by: lancea, clanger
2020-03-11 12:30:23 -04:00
Alexey Bakhtin
14e37ba3df 8239798: SSLSocket closes socket both socket endpoints on a SocketTimeoutException
Reviewed-by: xuelei
2020-03-11 19:14:08 +03:00
Andrew Haley
6275aee690 Merge 2020-03-11 15:02:09 +00:00
Aleksey Shipilev
eb974fad6d 8240868: Shenandoah: remove CM-with-UR piggybacking cycles
Reviewed-by: rkennke, zgu
2020-03-11 14:17:52 +01:00
Vipin Sharma
d778097371 8240524: Remove explicit type argument in test jdk/java/lang/Boolean/MakeBooleanComparable.java
Reviewed-by: clanger, vtewari
2020-03-11 13:50:13 +01:00
Andrew Haley
0992e17b97 8240829: Use a fast O(1) algorithm for exact_log2
Reviewed-by: jrose, redestad
2020-03-11 12:38:57 +00:00
Andrew Haley
661c073594 8240615: is_power_of_2() has Undefined Behaviour and is inconsistent
Reviewed-by: jrose, redestad
2020-03-10 10:49:01 -04:00
Stefan Karlsson
534331f0a1 8240532: heap inspection prints trailing @ after name of module without version
Reviewed-by: lfoltan
2020-03-04 18:08:09 +01:00
Stefan Karlsson
43e0fc04b0 8240529: CheckUnhandledOops breaks NULL check in Modules::define_module
Reviewed-by: coleenp, lfoltan, hseigel
2020-03-04 15:50:49 +01:00
Stefan Karlsson
593a05c93a 8240530: CheckUnhandledOops breaks BacktraceBuilder::set_has_hidden_top_frame
Reviewed-by: coleenp, dholmes
2020-03-04 15:50:51 +01:00
Erik Helin
1c1acb4757 8237566: FindTests.gmk should only include existing TEST.ROOT files
Reviewed-by: erikj
2020-03-10 16:58:29 +01:00
Magnus Ihse Bursie
441e16e2db 8240820: Replace AC_ARG_ENABLE with UTIL_ARG_ENABLE
Reviewed-by: erikj
2020-03-11 08:34:14 +01:00
Yasumasa Suenaga
99b28daf56 8240725: Some functions might not work with CJK character
Reviewed-by: naoto
2020-03-11 13:14:40 +09:00
Weijun Wang
80ca356e7e 8239928: ec/ECDSAJavaVerify.java failed due to timeout
Reviewed-by: valeriep
2020-03-11 10:33:33 +08:00
Chihiro Ito
08c3b1fc8f 8222489: jcmd VM.system_properties gives unusable paths on Windows
Reviewed-by: sspitsyn, ysuenaga
2020-03-07 23:08:33 +09:00
Adam Sotona
5eef59d22d 8235216: typo in test filename
Renamed MutliReleaseModuleInfoTest.java to MultiReleaseModuleInfoTest.java

Reviewed-by: jjg
2020-03-10 17:33:37 +01:00
Jonathan Gibbons
0fd2ac701f 8240697: convert builders to high-level Content blocks
Reviewed-by: prappo
2020-03-10 14:46:28 -07:00
Vladimir Kozlov
39ab073173 8240830: [BACKOUT] 8240195: some jaotc failures of fastdebug build with specific flags
Reviewed-by: dcubed
2020-03-10 14:39:39 -07:00
Yumin Qi
53c6887a3d 8240840: Rollback whitebox.cpp in push 8240691
Whitebox.cpp should not change in 8240691, which is accidentally included.

Reviewed-by: iklam, ccheung
2020-03-10 14:37:37 -07:00
Yudi Zheng
75632a6df2 8240610: [JVMCI] Export VMVersion::_has_intel_jcc_erratum to JVMCI compiler
Reviewed-by: kvn, thartmann
2020-03-10 21:48:43 +01:00
Yumin Qi
0e3529ad10 8240691: ClhsdbCDSJstackPrintAll incorrectly thinks CDS is in use
Fix by checking "UseSharedSpaces = false" for CDS enabled.

Reviewed-by: iklam
2020-03-10 11:52:53 -07:00
Vladimir Ivanov
02916dbb0b 8239009: C2: Don't use PSHUF to load scalars from memory on x86
Reviewed-by: kvn, dlong
2020-03-10 20:51:09 +03:00
Vladimir Ivanov
1dcd3d2c50 8239008: C2: Simplify Replicate support for sub-word types on x86
Reviewed-by: kvn
2020-03-10 20:51:08 +03:00
Vladimir Ivanov
072cfd2e48 8238681: Make -XX:UseSSE flag x86-specific
Reviewed-by: dholmes, kvn
2020-03-10 20:51:07 +03:00
Erik Gahlin
8208b9ce32 8240778: JFR: Create timer task lazily
Reviewed-by: mgronlun, mseledtsov
2020-03-10 18:39:16 +01:00
Roland Westrelin
42ff13ab82 8240195: some jaotc failures of fastdebug build with specific flags
Reviewed-by: kvn, thartmann
2020-03-09 09:42:30 +01:00
Dongbo He
f4b5488181 8240734: ModuleHashes attribute not reproducible between builds
Reviewed-by: alanb
2020-03-09 18:21:58 +08:00
Markus Grönlund
aac5b27b6a 8238180: RunThese30M failed "assert(t->jfr_thread_local()->shelved_buffer() == __null) failed: invariant"
Reviewed-by: egahlin
2020-03-10 15:44:59 +01:00
John Jiang
edaf548beb 8238740: java/net/httpclient/whitebox/FlowTestDriver.java would not specify a TLS protocol
Reviewed-by: dfuchs
2020-03-10 21:43:46 +08:00
Ivan Walulya
d49eb0d9a7 8240668: G1 list of all PerRegionTable does not have to be a double linkedlist any more
Reviewed-by: kbarrett, tschatzl
2020-03-10 10:19:34 +01:00
Roland Westrelin
43e0165eea 8240794: [BACKOUT] 8238384 CTW: C2 compilation fails with "assert(store != load->find_exact_control(load->in(0))) failed: dependence cycle found"
Reviewed-by: thartmann
2020-03-10 10:45:01 +01:00
Aditya Mandaleeka
d112950b5b 8230853: Shenandoah: replace leftover assert(is_in(...)) with rich asserts
Reviewed-by: shade
2020-03-09 22:41:11 +01:00
Aleksey Shipilev
9722dfc9bc 8240750: Shenandoah: remove leftover files and mentions of ShenandoahAllocTracker
Reviewed-by: rkennke
2020-03-09 22:41:04 +01:00
Aleksey Shipilev
2ba5ed53d6 8240749: Shenandoah: refactor ShenandoahUtils
Reviewed-by: rkennke
2020-03-09 22:40:55 +01:00
Erik Gahlin
f09cda2c70 8239584: EventStream::close should state that stream will be stopped
Reviewed-by: mgronlun, mseledtsov
2020-03-09 21:43:01 +01:00
Erik Gahlin
672992f6ac 8222000: JFR: Process start event
Reviewed-by: mgronlun, rriggs
2020-03-09 21:25:38 +01:00
Naoto Sato
123ac07064 8239836: ZoneRules.of() doesn't check transitionList/standardOffsetTL arguments validity
Reviewed-by: rriggs, joehw, scolebourne
2020-03-09 13:20:45 -07:00
Daniel Fuchs
5c8f935641 8240754: Instrument FlowTest.java to provide more debug traces
Reviewed-by: chegar
2020-03-09 17:48:40 +00:00
Henry Jen
dc17821807 8240629: argfiles parsing broken for argfiles with comment cross 4096 bytes chunk
Reviewed-by: alanb, mchung
2020-03-06 13:48:16 -08:00
Dongbo He
aa2be1141d 8240576: JVM crashes after transformation in C2 IdealLoopTree::merge_many_backedges
Reviewed-by: kvn
2020-03-09 22:31:12 +08:00
Mario Torre
e0fec43a9b 8240738: nested comment in JVM.java and other minor formatting errors
Reviewed-by: egahlin
2020-03-09 14:57:41 +01:00
Kevin Walls
a11912ca06 8240295: hs_err elapsed time in seconds is not accurate enough
Reviewed-by: dholmes, sspitsyn
2020-03-09 12:54:53 +00:00
Aditya Mandaleeka
3ff8eff804 8220503: Move ShenandoahTerminatorTerminator::should_exit_termination out of header
Reviewed-by: rkennke
2020-03-09 12:29:13 +01:00
Roland Westrelin
b58c8601bb 8239335: C2: assert((Value(phase) == t) || (t != TypeInt::CC_GT && t != TypeInt::CC_EQ)) failed: missing Value() optimization
Reviewed-by: kvn, thartmann
2020-03-05 15:56:49 +01:00
Kim Barrett
1c1fb44ac1 8240722: [BACKOUT] G1DirtyCardQueue destructor has useless flush
Backout JDK-8240133

Reviewed-by: sjohanss
2020-03-09 04:06:37 -04:00
Rajan Halade
ba2e4178ce 8240686: 70 security tests are failing on Windows due to "Fetch artifact failed"
Reviewed-by: xuelei
2020-03-09 00:45:01 -07:00
Ioi Lam
046dcdc0bc 8240613: InstanceKlass::set_init_state failed with assert(good_state || state == allocated)
Reviewed-by: dcubed
2020-03-08 15:06:27 -07:00
Kim Barrett
7806ca1477 8240133: G1DirtyCardQueue destructor has useless flush
Removed useless call to flush.

Reviewed-by: tschatzl, sjohanss
2020-03-08 17:33:48 -04:00
Ichiroh Takiguchi
3d9dddd658 8239965: XMLEncoder/Test4625418.java fails due to "Error: Cp943 - can't read properly"
Cp943 and x-IBM943 should skip on XMLEncoder/Test4625418.java

Reviewed-by: naoto
2020-03-08 15:15:38 +09:00
Boris Ulasevich
d0e44e5bb4 8239514: Build for arm-linux-gnueabihf fails with undefined reference read_polling_page
Reviewed-by: dsamersoff, dholmes
2020-03-07 16:27:00 +03:00
Vyom Tewari
ff8e7d4087 8238579: HttpsURLConnection drops the timeout and hangs forever in read
HttpsURLConnection drops the timeout and hangs forever in read

Reviewed-by: dfuchs
2020-03-07 18:35:20 +05:30
Jie Fu
f222cb8b8c 8240695: Build is broken when cds is disabled after JDK-8232081
Reviewed-by: iklam
2020-03-07 14:42:55 +08:00
Jonathan Gibbons
c46623d071 8240137: Support chained use of Content.add
Reviewed-by: hannesw
2020-03-06 18:03:09 -08:00
Mikael Vidstedt
c203cebcdf 8240535: Add additional linux-aarch64 jib profiles
Reviewed-by: erikj
2020-03-06 17:33:07 -08:00
Kim Barrett
9f334a1640 8240239: Replace ConcurrentGCPhaseManager
Replace ConcurrentGCPhaseManager with ConcurrentGCBreakpoints

Co-authored-by: Per Liden <per.liden@oracle.com>
Reviewed-by: kbarrett, pliden, sangheki
2020-03-06 18:42:13 -05:00
Calvin Cheung
9e2ab1e363 8232081: Try to link all classes during dynamic CDS dump
During CDS dynamic dump, link all classes loaded by the builtin class loaders in JVM_BeforeHalt() and JavaThread::invoke_shutdown_hooks().

Reviewed-by: iklam, dholmes
2020-03-06 15:33:13 -08:00
Roman Kennke
8c1204de6b 8240315: Shenandoah: Rename ShLBN::get_barrier_strength()
Reviewed-by: shade
2020-03-06 21:51:32 +01:00
Roger Riggs
375d0c1325 8239893: Windows handle Leak when starting processes using ProcessBuilder
Reviewed-by: bpb, naoto
2020-03-06 13:52:35 -05:00
Brian Burkhalter
e2f4319171 4617266: (se spec) SelectionKey.OP_READ/OP_WRITE documentation errors
Reviewed-by: lancea, alanb, darcy
2020-03-06 10:34:31 -08:00
Sean Mullan
f87ebd9e5d 8240684: ProblemList 70 security tests that are failing on Windows due to "Fetch artifact failed"
Reviewed-by: xuelei, stsmirno, dcubed
2020-03-06 13:17:03 -05:00
Aleksey Shipilev
d8bded6fb4 8240671: Shenandoah: refactor ShenandoahPhaseTimings
Reviewed-by: rkennke, zgu
2020-03-06 17:03:42 +01:00
Severin Gehwolf
c92adf4158 8240189: [TESTBUG] Some cgroup tests are failing after JDK-8231111
Reviewed-by: mbaesken, bobv
2020-02-24 19:03:34 +01:00
Ralf Schmelter
14c098610a 8240440: Implement get_safepoint_workers() for parallel GC
Reviewed-by: tschatzl, kbarrett
2020-03-06 16:19:32 +01:00
Ivan Walulya
f0cd9dd5c4 8240592: HeapRegionManager::rebuild_free_list logs 0s for the estimated free regions before
Reviewed-by: sjohanss, kbarrett
2020-03-06 14:10:41 +01:00
Aditya Mandaleeka
95a497ae9f 8236981: Remove ShenandoahTraversalUpdateRefsClosure
Reviewed-by: shade, rkennke
2020-03-06 13:41:14 +01:00
Ivan Walulya
25d2db06c4 8240589: OtherRegionsTable::_num_occupied not updated correctly
Reviewed-by: tschatzl, sjohanss
2020-03-06 11:40:03 +01:00
Martin Doerr
3adad5a645 8239856: [ntintel] asserts about copying unaligned array element
Reviewed-by: stuefe, sspitsyn
2020-03-06 11:04:31 +01:00
Matthias Baesken
f10fd7a78e 8240603: Windows 32bit compile error after 8238676
Reviewed-by: clanger, dholmes
2020-03-05 13:12:51 +01:00
Ramkumar Sunderbabu
9c6a769618 8153430: jdk regression test MletParserLocaleTest, ParserInfiniteLoopTest reduce default timeout
Removed timeout=5 from the tests so that default timeout is used

Reviewed-by: cjplummer
2020-03-06 10:27:24 +05:30
Doug Simon
f456f151cc 8240538: [JVMCI] add test for JVMCI ConstantPool class
Reviewed-by: kvn, iignatyev
2020-03-05 16:32:52 -08:00
Joe Darcy
001b8056c8 8240624: Note mapping of RoundingMode constants to equivalent IEEE 754-2019 attribute
Reviewed-by: bpb
2020-03-05 15:07:20 -08:00
Vicente Romero
4a32eda417 8240454: incorrect error message: as of release 13, 'record' is a restricted type name
Reviewed-by: jlahoda
2020-03-05 16:46:24 -05:00
Lance Andersen
3607ddd55a 8211917: Zip FS should add META-INF/MANIFEST.FS at the start of the Zip/JAR
Reviewed-by: clanger, jpai
2020-03-05 13:56:40 -05:00
Alexandre Iline
db91be2ee1 8240241: Add support for JCov DiffCoverage to make files
Reviewed-by: erikj, ihse
2020-03-05 09:51:03 -08:00
Markus Grönlund
d75e62e16b 8239376: JFR: assert(!cld->is_unsafe_anonymous()) failed: invariant
Reviewed-by: coleenp, lfoltan, hseigel
2020-03-05 17:55:53 +01:00
Claes Redestad
78982f7c11 8240528: OopMap cleanup
Reviewed-by: kvn, thartmann
2020-03-05 13:14:31 +01:00
Erik Österlund
3ddd7b86c8 8240370: Provide Intel JCC Erratum opt-out
Reviewed-by: redestad, vlivanov, thartmann
2020-03-05 11:12:51 +00:00
Yasumasa Suenaga
3490262a6b 8240197: Cannot start JVM when $JAVA_HOME includes CJK characters
Reviewed-by: iklam, stuefe, rschmelter
2020-03-05 19:46:07 +09:00
Ravi Reddy
b2f1f73e75 8183369: RFC unconformity of HttpURLConnection with proxy
HttpURLConnection retried with proxy if the connection fails on first attempt as per RFC

Reviewed-by: chegar, dfuchs, vtewari
2020-03-05 03:27:17 -05:00
Qi Feng
d1818942b0 8240286: [TESTBUG] Test command error in hotspot/jtreg/compiler/loopopts/superword/SumRedAbsNeg_Float.java
Reviewed-by: kvn, thartmann
2020-03-05 14:51:41 +08:00
Ioi Lam
7ba18fc015 8240244: Avoid calling resolve_super_or_fail in SystemDictionary::load_shared_class
Reviewed-by: redestad, lfoltan, minqi
2020-03-04 22:26:48 -08:00
Yumin Qi
6cb2e02af6 8240546: runtime/cds/appcds/TestZGCWithCDS.java fails with Graal
Test failed since Graal does not work with ZGC, fixed in test to skip Graal if ZGC.

Reviewed-by: ccheung
2020-03-04 21:29:14 -08:00
Jesper Wilhelmsson
10b09c7982 Added tag jdk-15+13 for changeset 1c06a8ee8aca 2020-03-05 02:02:05 +01:00
Calvin Cheung
5229896f4f 8240481: Remove CDS usage of InstanceKlass::is_in_error_state
Track the classes which fail verification during CDS dumping in DumpTimeSharedClassInfo.

Reviewed-by: iklam, minqi
2020-03-04 15:34:53 -08:00
Jonathan Gibbons
edb59b58b9 8239817: Eliminate use of contentContainer and friends
Reviewed-by: hannesw
2020-03-04 12:58:13 -08:00
Aleksey Shipilev
01ef6d791f 8240534: Shenandoah: ditch debug safepoint timeout adjustment
Reviewed-by: rkennke
2020-03-04 19:23:13 +01:00
Volker Simonis
ff843fabec 8240333: jmod incorrectly updates .jar and .jmod files during hashing
Reviewed-by: martin, alanb, lancea
2020-03-04 14:55:43 +01:00
Andy Herrick
128f083359 8238692: MacOS runtime Installer issue
Reviewed-by: kizune, asemenyuk, almatvee
2020-03-03 18:10:15 -05:00
Andy Herrick
ef4053ee41 8237966: Creating runtime pkg requires --mac-package-identifier
Reviewed-by: kizune, asemenyuk, almatvee
2020-03-03 18:07:11 -05:00
Andy Herrick
aa54795965 8237967: No proper error message when --runtime-image points to non-existent path
Reviewed-by: kizune, asemenyuk, almatvee
2020-03-03 17:58:41 -05:00
Jan Lahoda
e44dcf09c0 8234896: Tab completion does not work for method references in jshell
Reviewed-by: rfield
2020-03-04 13:43:28 +01:00
Jan Lahoda
0c9983887d 8228451: NPE in Attr.java when -XDshould-stop.ifError=FLOW
Avoiding parsing of compound assignment as a type.

Reviewed-by: jjg, vromero
2020-03-04 13:43:27 +01:00
Jan Lahoda
9d57eefe6e 8239575: javadoc triggers javac AssertionError for annos on modules
Ensure ModuleSymbols are implicitly loaded only once in the javadoc context.

Reviewed-by: jjg
2020-03-04 13:43:25 +01:00
Aleksey Shipilev
b3666b94a3 8240511: Shenandoah: parallel safepoint workers count should be ParallelGCThreads
Reviewed-by: rkennke
2020-03-04 11:50:28 +01:00
Alexey Bakhtin
8e74ed46df 8239787: AArch64: String.indexOf may incorrectly handle empty strings
Reviewed-by: aph, lmesnik, yan
2020-03-03 13:06:50 +03:00
Pankaj Bansal
f916df3b0e 8238985: [TESTBUG] The arrow image is blue instead of green
Reviewed-by: serb, psadhukhan
2020-02-21 17:09:01 +05:30
Pankaj Bansal
b5e162200b 8153090: TAB key cannot change input focus after the radio button in the Color Selection dialog
Reviewed-by: serb, psadhukhan
2020-02-21 17:00:23 +05:30
Pankaj Bansal
b5fdcb0851 8216329: Cannot resize CheckBoxItemMenu in Synth L&F with setHorizontalTextPosition
Reviewed-by: serb, psadhukhan
2020-02-21 16:31:45 +05:30
Roland Westrelin
86ad195099 8238384: CTW: C2 compilation fails with "assert(store != load->find_exact_control(load->in(0))) failed: dependence cycle found"
Reviewed-by: vlivanov, thartmann
2020-02-20 16:41:05 +01:00
Roland Westrelin
1e796eae8f 8239367: RunThese30M.java failed due to "assert(false) failed: graph should be schedulable"
Reviewed-by: thartmann, vlivanov, neliasso
2020-02-21 15:01:22 +01:00
Xue-Lei Andrew Fan
89448a83d9 8233619: SSLEngine handshake status immediately after the handshake can be NOT_HANDSHAKING rather than FINISHED with TLSv1.3
Reviewed-by: jnimeh
2020-03-03 15:57:01 -08:00
Mikhailo Seledtsov
467ee78a52 8235206: JFR TestCrossProcessStreaming - validate that data can be consumed while it is being produced
Updated test to validate concurrent produce/consume

Reviewed-by: egahlin
2020-03-03 12:43:55 -08:00
Fairoz Matte
ea55699f34 8239055: Wrong implementation of VMState.hasListener
Correct the VMState.hasListener implementation to return WeakReference<VMListener> type

Reviewed-by: sspitsyn, poonam
2020-02-27 19:33:07 -08:00
Coleen Phillimore
3ca275fb91 8225760: oop::raw_set_obj isn't needed
Reviewed-by: hseigel, rkennke
2020-03-03 11:19:35 -05:00
Harold Seigel
cf89ff7a4b 8240324: Improve is_boot_class_loader_data() by adding simple check
Check if cld is the null_cld before looking at the class loader oop

Reviewed-by: coleenp
2020-03-03 15:50:20 +00:00
Claes Redestad
52cfd292cc 8240263: Assertion-only call in Method::link_method affecting product builds
Reviewed-by: shade, dcubed, iklam
2020-03-03 12:41:12 +01:00
Claes Redestad
3fdf26d8dc 8240302: x64: Assembler::reachable redundantly call Relocation::type() more than once
Reviewed-by: kvn, iklam, thartmann
2020-03-03 11:40:53 +01:00
Volker Simonis
2a79146791 8240235: jdk.test.lib.util.JarUtils updates jar files incorrectly
Reviewed-by: martin, clanger, lancea
2020-03-03 11:24:20 +01:00
Nils Eliasson
908a933131 8238759: Clones should always keep the base pointer
Reviewed-by: rkennke, thartmann
2020-03-03 10:29:05 +01:00
Prasanta Sadhukhan
3c72042627 8239334: Tab Size does not work correctly in JTextArea with setLineWrap on
Reviewed-by: serb, pbansal
2020-02-20 14:49:20 +05:30
Alexander Zuev
c6e9d209c5 8237221: [macos] java/awt/MenuBar/SeparatorsNavigation/SeparatorsNavigation.java fails
Reviewed-by: serb
2020-02-17 20:04:31 +03:00
Phil Race
80f5a47b4a 8239091: Reversed arguments in call to strstr in freetype "debug" code
Reviewed-by: bpb
2020-02-14 10:44:30 -08:00
Phil Race
e6915ff175 8238942: Rendering artifacts with LCD text and fractional metrics
Reviewed-by: serb, jdv
2020-02-14 09:10:43 -08:00
Sergey Bylokhov
5705a55161 8233827: Enable screenshots in the enhanced failure handler on Linux/macOS
Reviewed-by: iignatyev
2020-02-13 13:23:31 -08:00
Sergey Bylokhov
784e575134 8238741: java.awt.Robot(GraphicsDevice) constructor does not follow the spec
Reviewed-by: aivanov
2020-02-13 13:21:21 -08:00
Sergey Bylokhov
8d2aa62bd9 8221823: Requested JDialog width is ignored
Reviewed-by: aivanov
2020-02-13 13:19:55 -08:00
Sergey Bylokhov
7af366a7e1 8238738: AudioSystem.getMixerInfo() takes about 30 sec to report a gone audio device
Reviewed-by: prr
2020-02-13 13:17:16 -08:00
Phil Race
ff55c4903b 8238842: AIOOBE in GIFImageReader.initializeStringTable
Reviewed-by: serb, bpb
2020-02-12 14:45:10 -08:00
Martin Balao
84f3e86749 8238555: Allow Initialization of SunPKCS11 with NSS when there are external FIPS modules in the NSSDB
Reviewed-by: mullan, valeriep
2020-02-05 12:20:36 -03:00
Stefan Karlsson
1491340708 8240223: Use consistent predicate order in and with PhaseIdealLoop::find_predicate
Reviewed-by: thartmann, neliasso, chagedorn
2020-03-02 12:30:59 +01:00
Stefan Karlsson
ac60e4b98e 8240220: IdealLoopTree::dump_head predicate printing is broken
Reviewed-by: thartmann, neliasso, chagedorn
2020-03-02 12:30:57 +01:00
Christian Hagedorn
d7b122ed69 8238438: SuperWord::co_locate_pack picks memory state of first instead of last load
Fix selection of first and last memory state in SuperWord::co_locate_pack

Reviewed-by: thartmann, kvn
2020-03-02 10:23:08 +01:00
Claes Redestad
ebadfaeb2e 8196334: Optimize UUID#fromString
Co-authored-by: Andriy Plokhotnyuk <plokhotnyuk@gmail.com>
Co-authored-by: Jon Chambers <jon.chambers@gmail.com>
Reviewed-by: igerasim, alanb
2020-03-02 08:22:48 +01:00
Rajan Halade
751de03704 8225130: Add exception for expiring Comodo roots to VerifyCACerts test
Reviewed-by: weijun
2020-03-01 23:04:02 -08:00
1398 changed files with 782833 additions and 24834 deletions

View File

@@ -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

View File

@@ -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>

View File

@@ -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

View File

@@ -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, \
))

View File

@@ -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 \

View File

@@ -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)

View File

@@ -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

View File

@@ -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 \

View File

@@ -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 := \

View File

@@ -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)&amp;id=homepage

View File

@@ -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))

View File

@@ -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 \

View File

@@ -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

View File

@@ -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 ; \

View File

@@ -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)

View File

@@ -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

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)
])

View File

@@ -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

View File

@@ -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])

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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.

View File

@@ -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

View File

@@ -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 \

View File

@@ -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

View File

@@ -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, \
))

View File

@@ -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);

View File

@@ -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)

View File

@@ -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

View File

@@ -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: Peanos 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

View File

@@ -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 *

View File

@@ -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)

View File

@@ -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), \
))

View File

@@ -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), \
))

View File

@@ -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

View File

@@ -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}"

View File

@@ -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;

View File

@@ -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("@.*", ""))

View File

@@ -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);

View File

@@ -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;
}

View File

@@ -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();

View File

@@ -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"),

View File

@@ -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]));
}
}
}

View File

@@ -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.*;

View File

@@ -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);

View File

@@ -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);
}

View File

@@ -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++;
}

View File

@@ -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();

View File

@@ -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;

View File

@@ -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>"

View File

@@ -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;

View File

@@ -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;

View File

@@ -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);

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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
################################################################################

View File

@@ -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"

View File

@@ -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), \

View File

@@ -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), \
))

View File

@@ -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, \
))

View File

@@ -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

View File

@@ -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

View File

@@ -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);
}
}

View File

@@ -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,

View File

@@ -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();
}
}

View File

@@ -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;
}

View File

@@ -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);
}
}

View File

@@ -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);

View File

@@ -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);

View File

@@ -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) {

View File

@@ -151,7 +151,6 @@ public class Areas extends ControlsSurface {
Areas demo;
JToolBar toolbar;
JComboBox combo;
public DemoControls(Areas demo) {
super(demo.name);

View File

@@ -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';
}
}

View File

@@ -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);

View File

@@ -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");

View File

@@ -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);

View File

@@ -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");

View File

@@ -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");

View File

@@ -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");

View File

@@ -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();

View File

@@ -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) {

View File

@@ -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;
}
}

View File

@@ -128,7 +128,7 @@ public class ColorChooserDemo extends DemoModule {
okListener,
null);
dialog.show();
dialog.setVisible(true);
if(e.getSource() == outerColorButton) {
bezAnim.setOuterColor(chosen);

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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;

View File

@@ -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();
}

View File

@@ -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,

View File

@@ -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"));

View File

@@ -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"));

View File

@@ -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() {

View File

@@ -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