Compare commits

..

272 Commits

Author SHA1 Message Date
Vitaly Provodin
9182819b00 update exclude list on results of 21.37 test runs 2023-03-18 14:26:49 +04:00
Vitaly Provodin
ee8b0d6e1d JBR-5194 move jbr-api.jar into test artefact 2023-03-17 18:45:55 +04:00
Sergey Shelomentsev
07c91bbd3b Don't trigger workflow on push 2023-03-16 16:03:02 +02:00
Sergey Shelomentsev
30564b5f80 JBR-5253 Use new JBR API for custom decorations 2023-03-16 16:03:02 +02:00
Sergey Shelomentsev
171b12a1cb JBR-5318 add Github workflow usage for pull requests pre-commit testing 2023-03-16 16:03:02 +02:00
Maxim Kartashev
3cebc05ae8 README.md moved to the root directory and updated 2023-03-16 10:08:15 +04:00
Sergey Shelomentsev
952b2615ed fix controls width calculation 2023-03-16 03:22:31 +02:00
Sergey Shelomentsev
d13c3629cc split ActionListenerTest 2023-03-16 03:22:28 +02:00
Sergey Shelomentsev
23fedcf940 JBR-5345 native controls detection and scale fixes 2023-03-16 00:03:22 +02:00
Nikita Gubarkov
5c962ccb98 JBR-5285 Add doPrivileged for WFramePeer#WIN11_OR_NEWER os.name & os.version check. 2023-03-15 23:23:29 +02:00
Nikita Gubarkov
7dd7110aca JBR-5284 Do not reset custom title bar controls state in WmMouseMove. 2023-03-15 23:23:28 +02:00
Nikita Tsarev
79445591f5 JBR-5369: Update failing tests list in response to macOS keyboard support rewrite 2023-03-15 14:18:52 +01:00
Nikita Tsarev
ad3d6aed23 JBR-5295: Fix wrong keycodes for non-letter keys that lack a corresponding VK_ constant on macOS 2023-03-15 14:18:02 +01:00
Alexey Ushakov
8ba48b30d7 JBR-5330 Blank Welcome screen after moving to another display
Initialize currentDisplayID on AWTWindow creation

(cherry picked from commit 2c39a86f76)
2023-03-14 18:01:11 +01:00
Vitaly Provodin
b5841511a3 update exclude list on results of 21_b28.1 test runs 2023-03-11 04:19:43 +07:00
Yi-Fan Tsai
cdb9263935 8302783: Improve CRC32C intrinsic with crypto pmull on AArch64
Reviewed-by: simonis, phh
(cherry picked from commit f3abc4063d)
2023-03-05 08:36:01 +07:00
Justin Lu
6d1fc9e235 8303405: fix @returnss typo in ReflectionFactory
Reviewed-by: jpai, mchung, martin, iris, lancea, naoto
(cherry picked from commit 45d8a175b1)
2023-03-05 08:36:01 +07:00
Xue-Lei Andrew Fan
612d900a12 8302495: update for deprecated sprintf for java.desktop
Reviewed-by: prr
(cherry picked from commit e7113dc8a5)
2023-03-05 08:36:01 +07:00
Daniel Jeliński
5dda0a7aa6 8303442: Clean up w2k_lsa_auth linker parameters
Reviewed-by: erikj
(cherry picked from commit 843d632ad4)
2023-03-05 08:36:01 +07:00
Andrey Turbanov
f2fffcd720 8303267: Prefer ArrayList to LinkedList in ConcurrentLocksPrinter
Reviewed-by: cjplummer, sspitsyn
(cherry picked from commit d4dcba0463)
2023-03-05 08:36:01 +07:00
Mikhailo Seledtsov
f3978b9968 8303411: JFR problem list entry for JDK-8247776 should be removed
Reviewed-by: lmesnik
(cherry picked from commit 2c7d2c0ea9)
2023-03-05 08:36:01 +07:00
Naoto Sato
53532a3bf4 8303039: Utilize coverageLevels.txt
Reviewed-by: iris, joehw
(cherry picked from commit 0b63557941)
2023-03-05 08:36:00 +07:00
Mandy Chung
56e75b0566 8303476: Add the runtime version in the release file of a JDK image
Reviewed-by: erikj
(cherry picked from commit 32247c336a)
2023-03-05 08:36:00 +07:00
Chris Plummer
63e1b66691 8302516: Do some cleanup of nsk/share/jdi/EventHandler.java
Reviewed-by: amenkov, kevinw, lmesnik
(cherry picked from commit 0926d0cbce)
2023-03-05 08:36:00 +07:00
Matthias Baesken
9d4d4439dc 8303354: addCertificatesToKeystore in KeystoreImpl.m needs CFRelease call in early potential CHECK_NULL return
Reviewed-by: clanger, mdoerr, weijun
(cherry picked from commit b51ea4204e)
2023-03-05 08:36:00 +07:00
Saint Wesonga
a64dbc71e6 8303409: Add Windows AArch64 ABI support to the Foreign Function & Memory API
Reviewed-by: jvernee
(cherry picked from commit fb13063943)
2023-03-05 08:36:00 +07:00
Thomas Stuefe
74d232aeb3 8302820: Remove costs for NMTPreInit when NMT is off
Reviewed-by: jsjolen, adinn
(cherry picked from commit c9afd55ed6)
2023-03-05 08:36:00 +07:00
Jaikiran Pai
2d56703166 8303457: Introduce convenience test library APIs for creating test servers for tests in test/jdk/java/net/httpclient
Reviewed-by: dfuchs
(cherry picked from commit 72de24e59a)
2023-03-05 08:36:00 +07:00
Kim Barrett
4a99661c66 8303418: Improve parameter and variable names in BitMap
Reviewed-by: tschatzl, aboldtch
(cherry picked from commit 3091744fff)
2023-03-05 08:35:59 +07:00
Jan Lahoda
cfcd38f023 8303355: The Depend plugin does fully recompile when primitive type changes
Reviewed-by: erikj, vromero
(cherry picked from commit dbb562d3b1)
2023-03-05 08:35:59 +07:00
Jan Lahoda
fa5050232e 8297587: Upgrade JLine to 3.22.0
Reviewed-by: vromero
(cherry picked from commit 4619e8bae8)
2023-03-05 08:35:59 +07:00
Emanuel Peter
8c11fbd82d 8302144: Move ZeroTLABTest.java to tier3
Reviewed-by: thartmann, kvn
(cherry picked from commit 99f5687eb1)
2023-03-05 08:35:59 +07:00
Tyler Steele
cd7d386977 8303186: Missing Classpath exception from Continuation.c
Reviewed-by: dholmes, jpai
(cherry picked from commit dc08216f0e)
2023-03-05 08:35:59 +07:00
Erik Gahlin
9ae1ec4c3c 8303077: JFR: Add example usage to jdk.jfr
Reviewed-by: mgronlun
(cherry picked from commit d10d40a5b2)
2023-03-05 08:35:59 +07:00
Valerie Peng
1a0eaaee9e 8295425: Match the default priv exp length between SunPKCS11 and other JDK providers
Reviewed-by: weijun
(cherry picked from commit 394eac850c)
2023-03-05 08:35:58 +07:00
David Holmes
841ce9c38a 8303070: Memory leak in DCmdArgument<char*>::parse_value
Reviewed-by: fparain, jcking, jsjolen, eosterlund, coleenp
(cherry picked from commit 6e19387f29)
2023-03-05 08:35:58 +07:00
Eirik Bjorsnos
a6a194dd39 8303401: Add a Vector API equalsIgnoreCase micro benchmark
Reviewed-by: ecaspole, sviswanathan, psandoz
(cherry picked from commit 9fc518ff8c)
2023-03-05 08:35:58 +07:00
Justin Lu
348c14b8b8 8303232: java.util.Date.parse(String) and java.util.Date(String) don't declare thrown IllegalArgumentException
Reviewed-by: jpai, lancea, naoto
(cherry picked from commit 05faa7321b)
2023-03-05 08:35:58 +07:00
Justin King
abb786db96 8303183: Memory leak in Arguments::init_shared_archive_paths
Reviewed-by: jsjolen, ccheung, dholmes
(cherry picked from commit 4c985e527a)
2023-03-05 08:35:58 +07:00
Albert Mingkun Yang
bc0735befe 8303362: Serial: Move CardTableRS to serial directory
Reviewed-by: tschatzl, kbarrett
(cherry picked from commit 6af17c1b7d)
2023-03-05 08:35:58 +07:00
Ivan Walulya
83ea15a83e 8303252: G1: Return early from Full-GC if no regions are selected for compaction.
Reviewed-by: tschatzl, ayang

(cherry picked from commit c1e77e0564)
2023-03-05 08:35:58 +07:00
Thomas Schatzl
92dfd0e641 8303344: After JDK-8302760, G1 heap verification does not exit VM after errors
Reviewed-by: iwalulya, ayang
(cherry picked from commit 8b86e1ee11)
2023-03-05 08:35:57 +07:00
Thomas Schatzl
05d56b61c6 8303013: Always do remembered set verification during G1 Full GC
Reviewed-by: ayang, iwalulya
(cherry picked from commit 4c5d9cfc64)
2023-03-05 08:35:57 +07:00
Doug Simon
2cf4a934ba 8303357: [JVMCI] thread is _thread_in_vm when committing JFR compilation event
Reviewed-by: never, kvn
(cherry picked from commit 2451c5a462)
2023-03-05 08:35:57 +07:00
Kim Barrett
11541fdad8 8302798: Refactor -XX:+UseOSErrorReporting for noreturn crash reporting
Reviewed-by: coleenp, stuefe
(cherry picked from commit 539a4951ee)
2023-03-05 08:35:57 +07:00
Roland Westrelin
a16859ab4b 8301630: C2: 8297933 broke type speculation in some cases
Reviewed-by: chagedorn, thartmann
(cherry picked from commit 6b07243f56)
2023-03-05 08:35:57 +07:00
Leonid Mesnik
53e14e4b61 8303421: [BACKOUT] 8303133: Update ProcessTools.startProcess(...) to exit early if process exit before linePredicate is printed.
Reviewed-by: dholmes
(cherry picked from commit 3aeefbf1de)
2023-03-05 08:35:57 +07:00
Leonid Mesnik
99075cb564 8303133: Update ProcessTools.startProcess(...) to exit early if process exit before linePredicate is printed.
Reviewed-by: dholmes, rriggs
(cherry picked from commit 1fdaf252b6)
2023-03-05 08:35:56 +07:00
Mikael Vidstedt
ef1683ef8c 8303412: Update linux_x64-to-linux_aarch64 cross compilation devkit at Oracle
Reviewed-by: dholmes
(cherry picked from commit 65da2c5d2d)
2023-03-05 08:35:56 +07:00
Justin Lu
bdd41cd1a7 8282319: java.util.Locale method to stream available Locales
Reviewed-by: stsypanov, naoto, lancea, rriggs
(cherry picked from commit 7e47d51e10)
2023-03-05 08:35:56 +07:00
Andrey Turbanov
56669e9e09 8303216: Prefer ArrayList to LinkedList in sun.net.httpserver.ServerImpl
Reviewed-by: jpai, vtewari, stsypanov, dfuchs
(cherry picked from commit 881517586d)
2023-03-05 08:35:56 +07:00
Dmitry Markov
5e661ed623 8303130: Document required Accessibility permissions on macOS
Reviewed-by: erikj, aivanov, prr, serb
(cherry picked from commit a10d5ac61b)
2023-03-05 08:35:56 +07:00
Julian Waters
9f272ec7b9 8303227: JniObjWithEnv should be NullablePointer compliant
Reviewed-by: asemenyuk
(cherry picked from commit 50dc041ee6)
2023-03-05 08:35:56 +07:00
Joe Darcy
8d1afac841 8302040: Port fdlibm sqrt to Java
Reviewed-by: bpb, thartmann, aturbanov
(cherry picked from commit 61e8867591)
2023-03-05 08:35:56 +07:00
Erik Gahlin
1f6f2c09c4 8303261: JFR: jdk/jfr/api/consumer/streaming/TestJVMCrash.java doesn't retry
Reviewed-by: mgronlun
(cherry picked from commit 6423065b7d)
2023-03-05 08:35:55 +07:00
Pavel Rappo
2ac7969c38 8303350: Fix mistyped {@code}
Reviewed-by: jpai
(cherry picked from commit dc5ea6aeb5)
2023-03-05 08:35:55 +07:00
Jie Fu
d4f14f8854 8303351: [IR Framework] Add missing cpu feature avx512bw after JDK-8302681
Reviewed-by: epeter, thartmann
(cherry picked from commit 4a415ad584)
2023-03-05 08:35:55 +07:00
Albert Mingkun Yang
5b3d6e7dc6 8303250: Call ct_max_alignment_constraint using the base class
Reviewed-by: kbarrett, tschatzl
(cherry picked from commit 30302d185a)
2023-03-05 08:35:55 +07:00
Lutz Schmidt
a19b914dcb 8299817: [s390] AES-CTR mode intrinsic fails with multiple short update() calls
Reviewed-by: mbaesken, mdoerr
(cherry picked from commit e144783eb2)
2023-03-05 08:35:55 +07:00
Darragh Clarke
a513ce31b2 8301701: java/net/DatagramSocket/DatagramSocketMulticasting.java should be hardened
Reviewed-by: dfuchs
(cherry picked from commit 5feb13b55d)
2023-03-05 08:35:55 +07:00
Archie L. Cobbs
304fa73195 8026369: javac potentially ambiguous overload warning needs an improved scheme
Reviewed-by: vromero
(cherry picked from commit 1e3c9fd67e)
2023-03-05 08:35:54 +07:00
Kim Barrett
639400089a 8302124: HotSpot Style Guide should permit noreturn attribute
Reviewed-by: dcubed, iveresov, dholmes, tschatzl, jwaters, kvn
(cherry picked from commit 14a014d430)
2023-03-05 08:35:54 +07:00
Erik Gahlin
5765538d66 8303249: JFR: Incorrect description of dumponexit
Reviewed-by: mgronlun
(cherry picked from commit bca60f4767)
2023-03-05 08:35:54 +07:00
David Holmes
99c43ed87d 8303068: Memory leak in DwarfFile::LineNumberProgram::run_line_number_program
Reviewed-by: jsjolen, tschatzl, chagedorn
(cherry picked from commit f7f10367b2)
2023-03-05 08:35:54 +07:00
Ian Graves
32d5ea9c87 8293667: Align jlink's --compress option with jmod's --compress option
Reviewed-by: mchung
(cherry picked from commit 784f7b1462)
2023-03-05 08:35:54 +07:00
Erik Gahlin
1206116021 8303208: JFR: 'jfr print' displays incorrect timestamps
Reviewed-by: mgronlun
(cherry picked from commit 54603aa1b7)
2023-03-05 08:35:54 +07:00
Roger Riggs
9bb83fd912 8303253: Remove unnecessary calls to super() in java.time value based classes
Reviewed-by: naoto, mchung, lancea
(cherry picked from commit 4c169d2d7c)
2023-03-05 08:35:54 +07:00
David M. Lloyd
abd6cbf3c9 8292914: Lambda proxies have unstable names
Change the name of generated lambda proxy classes so that they no longer have a numerical suffix.

Reviewed-by: mchung
(cherry picked from commit b527edd338)
2023-03-05 08:35:53 +07:00
Brian Burkhalter
e2e6419537 8029370: (fc) FileChannel javadoc not clear for cases where position == size
Reviewed-by: lancea
(cherry picked from commit 42330d28da)
2023-03-05 08:35:53 +07:00
Naoto Sato
c349ae994f 8301119: Support for GB18030-2022
Reviewed-by: alanb, coffeys, lancea
(cherry picked from commit a253b46021)
2023-03-05 08:35:53 +07:00
Archie L. Cobbs
785021ee61 8302685: Some javac unit tests aren't reliably closing open files
Reviewed-by: darcy, vromero
(cherry picked from commit 55e6bb6b85)
2023-03-05 08:35:53 +07:00
Matias Saavedra Silva
6f8a4d52d6 8262895: [macos_aarch64] runtime/CompressedOops/CompressedClassPointers.java fails with 'Narrow klass base: 0x0000000000000000' missing from stdout/stderr
Reviewed-by: dholmes, coleenp
(cherry picked from commit f5a12768fb)
2023-03-05 08:35:53 +07:00
Julian Waters
a8ef9f0b6d 8303169: Remove Windows specific workaround from libdt
Reviewed-by: cjplummer, sspitsyn, clanger
(cherry picked from commit 2fe4e5f8d7)
2023-03-05 08:35:53 +07:00
Johan Sjölen
021f28427a 8303051: Stop saving 5 chunks in each ChunkPool
Reviewed-by: rehn, coleenp
(cherry picked from commit f2b03f9a2c)
2023-03-05 08:35:52 +07:00
Erik Gahlin
84a849724e 8303135: JFR: Log periodic events using periodic tag
Reviewed-by: mgronlun
(cherry picked from commit fbc036e745)
2023-03-05 08:35:52 +07:00
Prasanta Sadhukhan
c908175dee 8081474: SwingWorker calls 'done' before the 'doInBackground' is finished
Reviewed-by: aivanov, serb
(cherry picked from commit dbb5581eba)
2023-03-05 08:35:52 +07:00
Darragh Clarke
d97685926d 8300792: Refactor examples in java.net.http to use @snippet
Reviewed-by: dfuchs, jpai
(cherry picked from commit 306134dcf9)
2023-03-05 08:35:52 +07:00
Daniel Jeliński
5f86b926c8 8302732: sun/net/www/http/HttpClient/MultiThreadTest.java still failing intermittently
Reviewed-by: dfuchs
(cherry picked from commit a2c5a4ac9e)
2023-03-05 08:35:52 +07:00
Damon Fenacci
d7a996fa99 8292583: Comment for ciArrayKlass::make is wrong
Reviewed-by: thartmann, rcastanedalo
(cherry picked from commit db217c9ad6)
2023-03-05 08:35:52 +07:00
Emanuel Peter
933144a841 8302149: Speed up compiler/jsr292/methodHandleExceptions/TestAMEnotNPE.java
Reviewed-by: kvn, vlivanov
(cherry picked from commit 2613b94f28)
2023-03-05 08:35:51 +07:00
Emanuel Peter
9d39a22a17 8303045: Remove RegionNode::LoopStatus::NeverIrreducibleEntry assert with wrong assumption
Reviewed-by: chagedorn, kvn
(cherry picked from commit d2660a6915)
2023-03-05 08:35:51 +07:00
Emanuel Peter
318dd2f1bd 8302681: [IR Framework] Only allow cpuFeatures from a verified list
Reviewed-by: thartmann, pli, chagedorn, kvn
(cherry picked from commit 1794f49751)
2023-03-05 08:35:51 +07:00
Sergey Bylokhov
b20288a66c 8303102: jcmd: ManagementAgent.status truncates the text longer than O_BUFLEN
Reviewed-by: dholmes
(cherry picked from commit a43931b79c)
2023-03-05 08:35:51 +07:00
Andrey Turbanov
05aa08f5b6 8302268: Prefer ArrayList to LinkedList in XEmbeddedFramePeer
Reviewed-by: serb, dnguyen
(cherry picked from commit 2fb1e3b7e7)
2023-03-05 08:35:51 +07:00
Andrey Turbanov
449a08f473 8301964: Expensive fillInStackTrace operation in HttpURLConnection.getLastModified when no last-modified in response
Reviewed-by: dfuchs, jpai, alanb
(cherry picked from commit 3a9f491caa)
2023-03-05 08:35:51 +07:00
Andrey Turbanov
526a06e7bf 8302120: Prefer ArrayList to LinkedList in AggregatePainter
Reviewed-by: serb
(cherry picked from commit 1dbd18ac63)
2023-03-05 08:35:51 +07:00
Alan Bateman
189ecd876e 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor
Reviewed-by: rriggs, martin, dfuchs, bchristi
(cherry picked from commit 2e78d838a5)
2023-03-05 08:35:50 +07:00
Eirik Bjorsnos
fbab3486a5 8302871: Speed up StringLatin1.regionMatchesCI
Reviewed-by: redestad, martin, alanb
(cherry picked from commit 17e3769ed7)
2023-03-05 08:35:50 +07:00
Leonid Mesnik
980c398d1a 8288912: vmTestbase/nsk/stress/strace/strace002.java fails with Unexpected method name: currentCarrierThread
Reviewed-by: dholmes
(cherry picked from commit b4ea80731c)
2023-03-05 08:35:50 +07:00
Brian Burkhalter
0af7cc9873 8303083: (bf) Remove private DirectByteBuffer(long, int) constructor before JDK 21 GA
Reviewed-by: alanb, lancea
(cherry picked from commit ccf3340e82)
2023-03-05 08:35:50 +07:00
Justin King
37706f7594 8303072: Memory leak in exeNullCallerTest.cpp
Reviewed-by: dholmes
(cherry picked from commit 83d77b1cbb)
2023-03-05 08:35:50 +07:00
Julian Waters
ab508f5c4b 8303131: pandoc.exe mangles all processed html files
Reviewed-by: erikj
(cherry picked from commit 7d8b8ba9c4)
2023-03-05 08:35:50 +07:00
Thomas Stuefe
c9ab82d08f 8302810: NMT gtests don't correctly check for marked ranges
Reviewed-by: gziemski, dholmes
(cherry picked from commit 8f7c4969c2)
2023-03-05 08:35:49 +07:00
Damon Nguyen
1ecdf7e66b 8302173: Button border overlaps with button icon on macOS system LaF
Reviewed-by: honkar, psadhukhan
(cherry picked from commit 1a07871454)
2023-03-05 08:35:49 +07:00
Erik Gahlin
34210543ad 8302677: JFR: Cache label and contentType in EventType and ValueDescriptor
Reviewed-by: mgronlun
(cherry picked from commit 796cdd52f5)
2023-03-05 08:35:49 +07:00
Erik Gahlin
0446bc02f6 8302821: JFR: Periodic task thread spins after recording has stopped
Reviewed-by: mgronlun
(cherry picked from commit 6b24b4a70f)
2023-03-05 08:35:49 +07:00
Evgeny Nikitin
702b511444 8303089: [jittester] Add time limit to IRTree generation
Reviewed-by: iveresov, lmesnik
(cherry picked from commit 4d33fbd582)
2023-03-05 08:35:49 +07:00
Justin Lu
c7ae0495a3 8302512: Update IANA Language Subtag Registry to Version 2023-02-14
Reviewed-by: naoto
(cherry picked from commit f612dcfebe)
2023-03-05 08:35:49 +07:00
Leonid Mesnik
b58027e9bc 8301200: Don't scale timeout stress with timeout factor
Reviewed-by: lkorinth
(cherry picked from commit 6397cb611a)
2023-03-05 08:35:49 +07:00
Mikhailo Seledtsov
c89619366f 8303085: Runtime problem list cleanup
Reviewed-by: lmesnik, dholmes
(cherry picked from commit 71dd7eaf7f)
2023-03-05 08:35:48 +07:00
Erik Gahlin
44d7c145dd 8302883: JFR: Improve periodic events
Reviewed-by: mgronlun
(cherry picked from commit 4b6acad0bd)
2023-03-05 08:35:48 +07:00
Daniel D. Daugherty
dd8bbdad1c 8303125: ProblemList vmTestbase/nsk/jdi/VMOutOfMemoryException/VMOutOfMemoryException001/VMOutOfMemoryException001.java
Reviewed-by: jdv
(cherry picked from commit a2471b37e3)
2023-03-05 08:35:48 +07:00
Christoph Dreis
eaf48fd944 8303078: Reduce allocations when pretty printing JCTree during compilation
Reviewed-by: jjg, vromero
(cherry picked from commit 58ca711a97)
2023-03-05 08:35:48 +07:00
Justin King
fabcc60ba5 8303071: Memory leaks in libjdwp
Reviewed-by: sspitsyn
(cherry picked from commit 2cf8b8607d)
2023-03-05 08:35:48 +07:00
Stefan Karlsson
938e76ad59 8302927: Unproblemlist Fuzz.java from ProblemList-zgc.txt again
Reviewed-by: sjohanss, eosterlund
(cherry picked from commit f113b04ab9)
2023-03-05 08:35:48 +07:00
Claes Redestad
b5de73b78c 8303073: (bf) Temporarily reinstate private DirectByteBuffer(long, int) constructor
Reviewed-by: alanb, bpb
(cherry picked from commit 1bab93b2d0)
2023-03-05 08:35:48 +07:00
Matthias Baesken
a37e124669 8303047: avoid NULL after 8301661
Reviewed-by: mdoerr, kbarrett, dholmes
(cherry picked from commit 221f34634d)
2023-03-05 08:35:47 +07:00
Thomas Stuefe
55e42f436c 8302811: NMT.random_reallocs_vm fails if NMT is off
Reviewed-by: jsjolen, sgehwolf
(cherry picked from commit 23e9d9d3ee)
2023-03-05 08:35:47 +07:00
Joe Darcy
5c12616f29 8302028: Port fdlibm atan2 to Java
Reviewed-by: bpb
(cherry picked from commit fcaf871408)
2023-03-05 08:35:47 +07:00
Albert Mingkun Yang
20ca991114 8303081: Serial: Remove unused VM_MarkSweep
Reviewed-by: tschatzl

(cherry picked from commit 07e976ac26)
2023-03-05 08:35:47 +07:00
Julian Waters
1915e933ce 8302667: Improve message format when failing to load symbols or libraries
Reviewed-by: mchung
(cherry picked from commit 8de841dd19)
2023-03-05 08:35:47 +07:00
Glavo
cdbc468c15 8303024: (fs) WindowsFileSystem.supportedFileAttributeViews can use Set.of
Reviewed-by: bpb
(cherry picked from commit f893d2315d)
2023-03-05 08:35:47 +07:00
Thomas Schatzl
7151464459 8303084: G1 Heap region liveness verification has inverted return value
Reviewed-by: ayang
(cherry picked from commit d7ada66129)
2023-03-05 08:35:46 +07:00
Thomas Schatzl
e2e187858b 8302760: Improve liveness/remembered set verification for G1
Reviewed-by: kbarrett, iwalulya
(cherry picked from commit 5d7e7e28b1)
2023-03-05 08:35:46 +07:00
Albert Mingkun Yang
22ee99e1ce 8303067: G1: Remove unimplemented G1FullGCScope::heap_transition
Reviewed-by: tschatzl
(cherry picked from commit b0e0f37d73)
2023-03-05 08:35:46 +07:00
Thomas Schatzl
45ac40047b 8302880: Fix includes in g1ConcurrentMarkObjArrayProcessor files
Reviewed-by: ayang, kbarrett
(cherry picked from commit 1a62a1229a)
2023-03-05 08:35:46 +07:00
Thomas Schatzl
8c8fa0886f 8302975: Remove redundant mark verification during G1 Full GC
Reviewed-by: ayang, kbarrett
(cherry picked from commit ee37af47cd)
2023-03-05 08:35:46 +07:00
Patricio Chilano Mateo
18491876fd 8300575: JVMTI support when using alternative virtual thread implementation
Reviewed-by: lmesnik, sspitsyn, alanb
(cherry picked from commit 83bea26df4)
2023-03-05 08:35:46 +07:00
Sergey Tsypanov
0dac92c123 8302979: (fs) Files usage of SUPPORTED_CHARSETS could be simplified
Reviewed-by: alanb, jwaters
(cherry picked from commit 25bfed3b12)
2023-03-05 08:35:46 +07:00
Albert Mingkun Yang
ad8f6507ac 8303054: Remove unused variables in GCTraceTimeLoggerImpl::log_end
Reviewed-by: tschatzl
(cherry picked from commit 0d5f7439a4)
2023-03-05 08:35:45 +07:00
Albert Mingkun Yang
ac8349bc9c 8302878: Group cmdline heap size checking together
Reviewed-by: kbarrett, iwalulya
(cherry picked from commit adc29c36e1)
2023-03-05 08:35:45 +07:00
Daniel Fuchs
8044e5e001 8299338: AssertionError in ResponseSubscribers$HttpResponseInputStream::onSubscribe
Reviewed-by: jpai
(cherry picked from commit 575484806c)
2023-03-05 08:35:45 +07:00
Per Minborg
11dd9f0e1e 8302849: SurfaceManager might expose partially constructed object
Reviewed-by: serb
(cherry picked from commit 63ef214328)
2023-03-05 08:35:45 +07:00
Roberto Castañeda Lozano
7b77b2bf3f 8302873: ZGC: dump barrier data in C2 Mach nodes
Reviewed-by: thartmann, kvn
(cherry picked from commit 30b2ac4a28)
2023-03-05 08:35:45 +07:00
Per Minborg
445b14718f 8302858: Polish FlightRecorderMXBeanImpl
Reviewed-by: egahlin
(cherry picked from commit 861eea9bd4)
2023-03-05 08:35:45 +07:00
Per Minborg
2a405294bf 8302856: Typo in FlightRecorderMXBeanImpl
Reviewed-by: kevinw, egahlin
(cherry picked from commit 60a358172a)
2023-03-05 08:35:44 +07:00
Tagir F. Valeev
df28978170 8302815: Use new Math.clamp method in core libraries
Reviewed-by: alanb
(cherry picked from commit 3f3a1f534b)
2023-03-05 08:35:44 +07:00
Kevin Walls
37fa5f420b 8302870: More information needed from failures in vmTestbase ThreadUtils.waitThreadState
Reviewed-by: dholmes, sspitsyn
(cherry picked from commit 5e1d1b7940)
2023-03-05 08:35:44 +07:00
Severin Gehwolf
9641cf935f 8302888: containers/docker/TestJcmd.java fails when run as root under podman
Reviewed-by: dholmes
(cherry picked from commit 7f35389533)
2023-03-05 08:35:44 +07:00
Alan Bateman
446b73523a 8280113: (dc) DatagramSocket.receive does not always throw when the channel is closed
Reviewed-by: jpai, dfuchs
(cherry picked from commit b6ecca1268)
2023-03-05 08:35:44 +07:00
Richard Reingruber
0eeb76c094 8302831: PPC: compiler/codecache/TestStressCodeBuffers.java fails after JDK-8301819
Reviewed-by: mdoerr
(cherry picked from commit f54e1080c5)
2023-03-05 08:35:44 +07:00
Julian Waters
a6b54194be 8302838: jabswitch main() should avoid calling exit explicitly
Reviewed-by: serb
(cherry picked from commit cba817ae59)
2023-03-05 08:35:44 +07:00
Prasanta Sadhukhan
b75f8ff512 8041447: Test javax/swing/dnd/7171812/bug7171812.java fails with java.lang.RuntimeException: Test failed, scroll on drag doesn't work
Reviewed-by: tr, serb
(cherry picked from commit 2c52cf0746)
2023-03-05 08:35:43 +07:00
Martin Doerr
e5b3175b10 8302907: [PPC64] Use more constexpr in class Register
Reviewed-by: rrich
(cherry picked from commit 180b94c73e)
2023-03-05 08:35:43 +07:00
Mikael Vidstedt
b6793fa2fe 8303016: Invalid escapes in grep patterns
Reviewed-by: erikj
(cherry picked from commit f319c92bd0)
2023-03-05 08:35:43 +07:00
Eirik Bjorsnos
b189165e85 8303033: Build failure with the micro bench mark
Reviewed-by: naoto
(cherry picked from commit e950b95486)
2023-03-05 08:35:43 +07:00
Albert Mingkun Yang
99ec8924fb 8302864: Parallel: Remove PSVirtualSpace::pointer_delta
Reviewed-by: tschatzl, kbarrett
(cherry picked from commit dcd773ac5c)
2023-03-05 08:35:43 +07:00
Serguei Spitsyn
1a7c50da9f 8299240: rank of JvmtiVTMSTransition_lock can be safepoint
Reviewed-by: dholmes, coleenp, pchilanomate
(cherry picked from commit 46f25250bd)
2023-03-05 08:35:43 +07:00
Justin King
7a90faa7d0 8303010: Add /DEBUG to LDFLAGS for MSVC with ASan
Reviewed-by: erikj
(cherry picked from commit ce6de37172)
2023-03-05 08:35:42 +07:00
Mikael Vidstedt
168a949582 8303020: Remove carriage return in pandoc version string
Reviewed-by: iris, lancea, erikj
(cherry picked from commit 729c26f70e)
2023-03-05 08:35:42 +07:00
Eirik Bjorsnos
81c88d05f6 8302877: Speed up latin1 case conversions
Reviewed-by: naoto, redestad
(cherry picked from commit ef1f7bd3b8)
2023-03-05 08:35:42 +07:00
Christian Stein
d25373ba65 8302789: (fs) Files.copy should include unsupported copy option in exception message
Reviewed-by: alanb, bpb, lancea
(cherry picked from commit 1ea5f9f7cd)
2023-03-05 08:35:42 +07:00
Joe Darcy
4070fab5f0 8302800: Augment NaN handling tests of FDLIBM methods
Reviewed-by: bpb
(cherry picked from commit dfce4e1943)
2023-03-05 08:35:42 +07:00
Glavo
d185a67394 8302603: Use Set.of in java.nio.charset.Charset
Reviewed-by: stsypanov, alanb, naoto
(cherry picked from commit 5489c821dc)
2023-03-05 08:35:42 +07:00
Roger Riggs
38c44caef8 8301627: System.exit and Runtime.exit debug logging
Reviewed-by: alanb, chegar
(cherry picked from commit 10b4cc9eb4)
2023-03-05 08:35:41 +07:00
Johannes Bechberger
71648e5c4c 8302320: AsyncGetCallTrace obtains too few frames in sanity test
Reviewed-by: jvernee, dholmes, rrich
(cherry picked from commit db483a38a8)
2023-03-05 08:35:41 +07:00
Tobias Holenstein
a3714f45ae 8302846: IGV: Zoom stuck when zooming out on large graphs
Reviewed-by: rcastanedalo, thartmann
(cherry picked from commit 02eb240c71)
2023-03-05 08:35:41 +07:00
Claes Redestad
3329b267c6 8302863: Speed up String::encodeASCII using countPositives
Reviewed-by: alanb
(cherry picked from commit 92dfa1175e)
2023-03-05 08:35:41 +07:00
Pavel Rappo
3b8fa92f59 8302981: Fix a typo in the doc comment for java.lang.Record.equals
Reviewed-by: jpai
(cherry picked from commit 8b20aa919b)
2023-03-05 08:35:41 +07:00
Julian Waters
f652a73ebe 8302837: Kernel32.cpp array memory release invokes undefined behaviour
Reviewed-by: jlahoda
(cherry picked from commit 644fe0a994)
2023-03-05 08:35:41 +07:00
Stefan Karlsson
05d233d5f6 8302977: ZGC: Doesn't support gc/TestVerifySubSet.java
Reviewed-by: tschatzl
(cherry picked from commit 60e6378925)
2023-03-05 08:35:40 +07:00
Stefan Karlsson
5f64946299 8299777: Test runtime/NMT/BaselineWithParameter.java timed out
Reviewed-by: gziemski, iklam, dholmes
(cherry picked from commit fef1910277)
2023-03-05 08:35:40 +07:00
Albert Mingkun Yang
f06f0c2eb2 8302886: Parallel: Remove unimplemented methods in ParCompactionManager
Reviewed-by: tschatzl
(cherry picked from commit 622f5604c1)
2023-03-05 08:35:40 +07:00
Albert Mingkun Yang
f60c58ac91 8302868: Serial: Remove CardTableRS::initialize
Reviewed-by: tschatzl
(cherry picked from commit 9fd77c7b9b)
2023-03-05 08:35:40 +07:00
Albert Mingkun Yang
a769e4f423 8302867: G1: Removing unused variable in G1CardTable::initialize
Reviewed-by: tschatzl
(cherry picked from commit f35cf79b51)
2023-03-05 08:35:40 +07:00
Stefan Karlsson
130899a342 8302741: ZGC: Remove Universe::verify calls
Reviewed-by: ayang, tschatzl
(cherry picked from commit 63a3501273)
2023-03-05 08:35:40 +07:00
Matthias Baesken
51fbf45a15 8301661: Enhance os::pd_print_cpu_info on macOS and Windows
Reviewed-by: ihse, lucy, dholmes
(cherry picked from commit 9145670354)
2023-03-05 08:35:39 +07:00
Jayathirth D V
128ea64fd5 8302151: BMPImageReader throws an exception reading BMP images
Reviewed-by: serb, tr
(cherry picked from commit aa10f0d3ee)
2023-03-05 08:35:39 +07:00
Emanuel Peter
5914be1caf 8302150: Speed up compiler/codegen/Test7100757.java
Reviewed-by: kvn, thartmann
(cherry picked from commit 16a4f02f2d)
2023-03-05 08:35:39 +07:00
Emanuel Peter
33d1a0f76c 8302146: Move TestOverloadCompileQueues.java to tier3
Reviewed-by: kvn, thartmann
(cherry picked from commit 17274c72a9)
2023-03-05 08:35:39 +07:00
Tejesh R
76c7c50b6a 8299522: Incorrect size of Approve button in custom JFileChooser
Reviewed-by: aivanov, abhiscxk, dnguyen
(cherry picked from commit 29f392e434)
2023-03-05 08:35:39 +07:00
Gui Cao
1ef4bd88f0 8302453: RISC-V: Add support for small width vector operations
Co-authored-by: Dingli Zhang <dingli@iscas.ac.cn>
Reviewed-by: yzhu, fyang
(cherry picked from commit 43c71ddf92)
2023-03-05 08:35:39 +07:00
David Holmes
99c3219336 8302905: arm32 Raspberry Pi OS build broken by JDK-8301494
Reviewed-by: mikael, martin
(cherry picked from commit 91a2b5ec6f)
2023-03-05 08:35:38 +07:00
George Adams
90a09c2913 8302879: doc/building.md update link to jtreg builds
Reviewed-by: sgehwolf, clanger
(cherry picked from commit bb3dfd6adb)
2023-03-05 08:35:38 +07:00
sunguoyun
667b88de5d 8302369: Reduce the stack size of the C1 compiler
Reviewed-by: dlong
(cherry picked from commit 36a0822633)
2023-03-05 08:35:38 +07:00
Justin King
9a92bf547a 8302599: Extend ASan support to Microsoft Visual C++
Reviewed-by: erikj, stuefe, ihse
(cherry picked from commit 0bf3a53e01)
2023-03-05 08:35:38 +07:00
ravi.ra.gupta
7a1901ceb3 8302525: Write a test to check various components send Events while mouse and key are used simultaneously
Reviewed-by: serb
(cherry picked from commit c7517b3dec)
2023-03-05 08:35:38 +07:00
Alexey Bakhtin
1837a36cd2 8299234: JMX Repository.query performance
Reviewed-by: dfuchs, kevinw
(cherry picked from commit 9a797228f3)
2023-03-05 08:35:38 +07:00
Severin Gehwolf
7b4f18ebf0 8300658: memory_and_swap_limit() reporting wrong values on systems with swapaccount=0
Reviewed-by: jsjolen, iklam
(cherry picked from commit e47e9ec05b)
2023-03-05 08:35:38 +07:00
Roman Kennke
871ff41acf 8302070: Factor null-check into load_klass() calls
Reviewed-by: phh, coleenp
(cherry picked from commit 7cf7e0a20b)
2023-03-05 08:35:37 +07:00
Prasanta Sadhukhan
5f02471699 8302882: Newly added test javax/swing/JFileChooser/JFileChooserFontReset.java fails with HeadlessException
Reviewed-by: jdv
(cherry picked from commit e731695217)
2023-03-05 08:35:37 +07:00
Johan Sjölen
a9dbc65d8f 8301749: Tracking malloc pooled memory size
Reviewed-by: dholmes, stuefe
(cherry picked from commit b5a7426996)
2023-03-05 08:35:37 +07:00
Vitaly Provodin
2b83bed5a8 JBR-5183 Serial: Refactor oop closures used in Young GC 2023-03-05 08:35:37 +07:00
Albert Mingkun Yang
e1168e317c 8302068: Serial: Refactor oop closures used in Young GC
Reviewed-by: tschatzl, iwalulya
(cherry picked from commit 6ac5e05c58)
2023-03-04 13:33:06 +07:00
Pengfei Li
b553da5f0b 8302518: Add missing Op_RoundDoubleMode in VectorNode::vector_operands()
Reviewed-by: kvn, jbhateja
(cherry picked from commit 71cf7c4409)
2023-03-04 13:33:05 +07:00
Thomas Schatzl
dae28264f9 8302709: Remove explicit remembered set verification in G1
Reviewed-by: ayang, iwalulya
(cherry picked from commit 98716e2b25)
2023-03-04 13:33:05 +07:00
Ludovic Henry
3bc2f10854 8302776: RISC-V: Fix typo CSR_INSTERT to CSR_INSTRET
Reviewed-by: fyang
(cherry picked from commit 303c61f3ca)
2023-03-04 13:33:04 +07:00
Thomas Schatzl
8fdb11cb77 8302312: Make ParGCRareEvent_lock G1 specific
Reviewed-by: sjohanss, kbarrett
(cherry picked from commit 7c40c8af69)
2023-03-04 13:33:04 +07:00
Thomas Schatzl
2481d0a8e6 8302122: Parallelize TLAB retirement in prologue in G1
8297611: G1: Merge tlab and per-thread dirty card log flushing

Reviewed-by: kbarrett, ayang
(cherry picked from commit 593bec685e)
2023-03-04 13:33:03 +07:00
Thomas Schatzl
df73c178b2 8302206: Factor out duplicate G1VerificationClosure
Reviewed-by: kbarrett, ayang
(cherry picked from commit e971f90a0b)
2023-03-04 13:33:03 +07:00
Ivan Walulya
58ca9ecac7 8302215: G1: Last-ditch Full GC should do serial compaction for tail regions in per thread compaction points.
Reviewed-by: ayang, sjohanss, tschatzl

(cherry picked from commit eaae0baeba)
2023-03-04 13:33:02 +07:00
Emanuel Peter
e19c4240c6 8302668: [TESTBUG] Tests require feature sse4_1 which does not exist, should be sse4.1
Reviewed-by: kvn, thartmann
(cherry picked from commit 7e08275cc1)
2023-03-04 13:30:07 +07:00
Emanuel Peter
b26dac8d42 8295979: [IR Framework] Improve IR matching warning
Reviewed-by: thartmann, kvn
(cherry picked from commit 5c0f50bc01)
2023-03-04 13:30:07 +07:00
Tobias Holenstein
41a06866c0 8302656: Missing spaces in output of -XX:+CIPrintMethodCodes
Reviewed-by: kvn, thartmann
(cherry picked from commit 743a85db06)
2023-03-04 13:30:06 +07:00
Prasanta Sadhukhan
6a089dc0b2 6753661: JFileChooser font not reset after Look & Feel change
Reviewed-by: abhiscxk, aivanov, serb
(cherry picked from commit 432cf68c4d)
2023-03-04 13:30:05 +07:00
Richard Reingruber
a161701774 8302462: [REDO] 8297487: G1 Remark: no need to keep alive oop constants of nmethods on stack
Reviewed-by: tschatzl, ayang
(cherry picked from commit 2009dc2b73)
2023-03-04 13:30:05 +07:00
Ioi Lam
f0c672e28d 8302781: CDS archive heap not reproducible after JDK-8296344
Reviewed-by: dcubed
(cherry picked from commit 7abe26935a)
2023-03-04 13:30:04 +07:00
Claes Redestad
ef56815632 8302315: Examine cost of clone of primitive arrays compared to arraycopy
Reviewed-by: alanb
(cherry picked from commit d6716d2e54)
2023-03-04 13:30:04 +07:00
Thomas Stuefe
d2fe0d4496 8302812: JDK-8302455 broke ClassLoaderStatsTest on 32-bit
Reviewed-by: dcubed
(cherry picked from commit 53be5dc486)
2023-03-04 13:30:03 +07:00
Eirik Bjorsnos
e01837a42e 8301873: Avoid string decoding in ZipFile.Source.getEntryPos
Reviewed-by: redestad, lancea
(cherry picked from commit 78f71b4d41)
2023-03-04 13:30:03 +07:00
Jaikiran Pai
cc86e4f23a 8302623: jarsigner - use BufferedOutputStream to improve performance while creating the signed jar
Reviewed-by: weijun
(cherry picked from commit f82385e587)
2023-03-04 13:30:02 +07:00
Jaikiran Pai
72bf1b4562 8302664: Fix several incorrect usages of Preconditions.checkFromIndexSize
Reviewed-by: djelinski, dfuchs, alanb
(cherry picked from commit 43cf8b3d80)
2023-03-04 13:30:02 +07:00
Serguei Spitsyn
5cb828436c 8302615: make JVMTI thread cpu time functions optional for virtual threads
Reviewed-by: alanb
(cherry picked from commit 6b082fb3c6)
2023-03-04 13:30:01 +07:00
Sandhya Viswanathan
5ff6b031f0 8302358: Behavior of adler32 changes after JDK-8300208
Reviewed-by: kvn, jbhateja
(cherry picked from commit 7c60b9c98f)
2023-03-04 13:29:59 +07:00
Calvin Cheung
fb55e1e23b 8301992: Embed SymbolTable CHT node
Co-authored-by: Robbin Ehn <rehn@openjdk.org>
Reviewed-by: coleenp, iklam
(cherry picked from commit 86b9fce980)
2023-03-04 13:29:58 +07:00
Mikhailo Seledtsov
9e086e8405 8294402: Add diagnostic logging to VMProps.checkDockerSupport
Reviewed-by: dholmes, lmesnik
(cherry picked from commit 03d613bbab)
2023-03-04 13:29:57 +07:00
Ioi Lam
18677037ea 8302777: CDS should not relocate heap if mapping fails
Reviewed-by: ccheung
(cherry picked from commit a263f28368)
2023-03-04 13:29:56 +07:00
Archie L. Cobbs
adfd1a5baf 7033677: potential cast error in MemberEnter
Reviewed-by: vromero, jlahoda
(cherry picked from commit a917fb3fcf)
2023-03-04 13:29:56 +07:00
Ludvig Janiuk
b47b04c9a9 8302226: failure_handler native.core should wait for coredump to finish
Reviewed-by: erikj
(cherry picked from commit 6120319afd)
2023-03-04 13:29:55 +07:00
Albert Mingkun Yang
1372db82a3 8302734: Parallel: Remove unused LGRPSpace::_invalid_region
Reviewed-by: tschatzl
(cherry picked from commit fef3eab9bd)
2023-03-04 13:29:53 +07:00
Albert Mingkun Yang
3827b6407d 8302661: Parallel: Remove PSVirtualSpace::is_aligned
Reviewed-by: stefank, tschatzl
(cherry picked from commit ea5bfea333)
2023-03-04 13:29:53 +07:00
Daniel Fuchs
44e2809f9d 8302635: Race condition in HttpBodySubscriberWrapper when cancelling request
Reviewed-by: jpai
(cherry picked from commit edf238b65e)
2023-03-04 13:29:52 +07:00
Tobias Holenstein
1c70c14246 8290822: C2: assert in PhaseIdealLoop::do_unroll() is subject to undefined behavior
Reviewed-by: kvn, thartmann
(cherry picked from commit cd77fcfb5f)
2023-03-04 13:29:51 +07:00
Tobias Holenstein
4b759a63c9 8302335: IGV: Bytecode not showing
Reviewed-by: rcastanedalo, thartmann, xliu
(cherry picked from commit 57c9bc39cd)
2023-03-04 13:29:51 +07:00
Yi-Fan Tsai
fc8f2d72ea 8302113: Improve CRC32 intrinsic with crypto pmull on AArch64
Reviewed-by: simonis
(cherry picked from commit 57fde75b2a)
2023-03-04 13:29:51 +07:00
Richard Reingruber
3faea1a84b 8302158: PPC: test/jdk/jdk/internal/vm/Continuation/Fuzz.java: AssertionError: res: false shouldPin: false
Reviewed-by: goetz, mdoerr
(cherry picked from commit b8c9d6cdf6)
2023-03-04 13:29:50 +07:00
Jan Lahoda
b7b66977c9 8302202: Incorrect desugaring of null-allowed nested patterns
Reviewed-by: vromero
(cherry picked from commit dc55a7fc87)
2023-03-04 13:29:48 +07:00
Johan Sjölen
df173b121c 8301494: Replace NULL with nullptr in cpu/arm
Reviewed-by: dholmes, coleenp
(cherry picked from commit c4ffe4bf63)
2023-03-04 13:29:47 +07:00
Albert Mingkun Yang
77b5b80c38 8302674: Parallel: Remove unused methods in MutableNUMASpace
Reviewed-by: tschatzl
(cherry picked from commit 4f1cffd52c)
2023-03-04 13:29:47 +07:00
Johan Sjölen
1fb4e57197 8301481: Replace NULL with nullptr in os/windows
Reviewed-by: coleenp, dholmes

(cherry picked from commit c91cd2814b)
2023-03-04 13:29:46 +07:00
Damon Fenacci
9d8a402569 8301491: C2: java.lang.StringUTF16::indexOfChar intrinsic called with negative character argument
Reviewed-by: thartmann, kvn
(cherry picked from commit 47ca5773a5)
2023-03-04 13:27:49 +07:00
Ioi Lam
1bd8fe66e8 8296158: Refactor the verification of CDS region checksum
Reviewed-by: ccheung, matsaave
(cherry picked from commit 49eb68ba95)
2023-03-04 13:27:48 +07:00
Joe Darcy
a7d131f0e6 8301444: Port fdlibm hyperbolic transcendental functions to Java
Reviewed-by: bpb
(cherry picked from commit 655a71277d)
2023-03-04 13:27:48 +07:00
David Holmes
073f68edb0 8280419: Remove dead code related to VerifyThread and verify_thread()
Reviewed-by: stuefe, lucy
(cherry picked from commit b242eef93e)
2023-03-04 13:27:47 +07:00
Valerie Peng
693ca15a30 8302225: SunJCE Provider doesn't validate key sizes when using 'constrained' transforms for AES/KW and AES/KWP
Reviewed-by: xuelei
(cherry picked from commit 4ce493f09e)
2023-03-04 13:27:47 +07:00
Magnus Ihse Bursie
c7dae0f76b 8301753: AppendFile/WriteFile has differences between make 3.81 and 4+
Reviewed-by: erikj
(cherry picked from commit a39cf2e3b2)
2023-03-04 13:27:46 +07:00
Vicente Romero
1e75fb8a4c 8296010: AssertionError in annotationTargetType
Reviewed-by: jjg
(cherry picked from commit de80dd9c15)
2023-03-04 13:27:46 +07:00
Julian Waters
be23595d16 8302671: libawt has a memmove decay error
Reviewed-by: serb, prr, kcr
(cherry picked from commit e5042dd483)
2023-03-04 13:27:45 +07:00
Daniel D. Daugherty
17fa431a15 8302678: validate_source fails after JDK-8293313
Reviewed-by: bpb
(cherry picked from commit 574b48c692)
2023-03-04 13:27:45 +07:00
Thomas Stuefe
0ea2e94b73 8293313: NMT: Rework MallocLimit
8293292: Remove MallocMaxTestWords

Reviewed-by: jsjolen, gziemski, lucy, mbaesken

(cherry picked from commit 90e092280f)
2023-03-04 13:27:44 +07:00
Erik Gahlin
1f3ad5c22e 8298276: JFR: Update NMT events to make use of common periodic timestamp feature
Reviewed-by: mgronlun
(cherry picked from commit f558a6c599)
2023-03-04 13:13:06 +07:00
Archie L. Cobbs
75afd724cd 8302514: Misleading error generated when empty class file encountered
Reviewed-by: vromero, jwaters
(cherry picked from commit a58fa6e73e)
2023-03-04 13:13:05 +07:00
Justin King
e5a9e30d10 8302595: use-after-free related to GraphKit::clone_map
Reviewed-by: kvn, thartmann
(cherry picked from commit 3cc459b6c2)
2023-03-04 13:13:04 +07:00
Justin King
b710c970b2 8302594: use-after-free in Node::destruct
Reviewed-by: kvn, thartmann
(cherry picked from commit 2e3cea01da)
2023-03-04 13:13:04 +07:00
Tobias Holenstein
d033368450 8301959: Compile command in compiler.loopopts.TestRemoveEmptyCountedLoop does not work
Reviewed-by: kvn, thartmann
(cherry picked from commit 9b911b492f)
2023-03-04 13:13:03 +07:00
Tobias Holenstein
55a82c3289 8291735: methods_do() always run at exit
Reviewed-by: coleenp, kvn
(cherry picked from commit c29a136787)
2023-03-04 13:13:02 +07:00
Albert Mingkun Yang
b4af29941e 8302464: Parallel: Remove unreachable code in callers of numa_has_static_binding
Reviewed-by: lkorinth, tschatzl
(cherry picked from commit 687a461276)
2023-03-04 13:13:01 +07:00
Tejesh R
ba46211b67 8300549: JFileChooser Approve button tooltip is null in Aqua L&F in CUSTOM_DIALOG mode
Reviewed-by: aivanov, abhiscxk
(cherry picked from commit 84c058bb63)
2023-03-04 13:13:01 +07:00
Tobias Holenstein
c62406108e 8297031: IGV: Copy extracted nodes and layout for cloned graph
Reviewed-by: rcastanedalo, thartmann
(cherry picked from commit e045af4c92)
2023-03-04 13:13:00 +07:00
Severin Gehwolf
7ae82c8286 8300645: Handle julong values in logging of GET_CONTAINER_INFO macros
Reviewed-by: iklam
(cherry picked from commit 53ae4c07fd)
2023-03-04 13:12:59 +07:00
Tobias Hartmann
df9149ec76 8302625: Bad copyright line after JDK-8302385
Reviewed-by: mikael
(cherry picked from commit c77f64420a)
2023-03-04 13:12:59 +07:00
Thomas Stuefe
4390648918 8302385: Remove MetaspaceReclaimPolicy=none
Reviewed-by: iklam, dholmes
(cherry picked from commit 519229db3c)
2023-03-04 13:12:58 +07:00
Thomas Stuefe
3d7bae6121 8302455: VM.classloader_stats memory size values are wrong
Reviewed-by: coleenp, dholmes
(cherry picked from commit 6e2d3c6c45)
2023-03-04 13:12:57 +07:00
Vicente Romero
79d1c4c648 8208470: Type annotations on inner type that is an array component
Co-authored-by: Bernard Blaser <bsrbnd@openjdk.org>
Reviewed-by: jlahoda
(cherry picked from commit 1480d418e3)
2023-03-04 13:12:56 +07:00
Ioi Lam
3506e343bc 8224980: FLAG_SET_ERGO silently ignores invalid values
Reviewed-by: iveresov, dholmes
(cherry picked from commit 573c316c57)
2023-03-04 13:12:55 +07:00
Joe Darcy
24726d7dc6 8302026: Port fdlibm inverse trig functions (asin, acos, atan) to Java
Reviewed-by: bpb
(cherry picked from commit 3ba156082b)
2023-03-04 13:12:55 +07:00
Claes Redestad
aaedc0d821 8302163: Speed up various String comparison methods with ArraysSupport.mismatch
Reviewed-by: stsypanov, rriggs, alanb
(cherry picked from commit 861e302011)
2023-03-04 13:12:54 +07:00
Mandy Chung
051afbb8b7 8301460: Clean up LambdaForm to reference BasicType enums directly
Reviewed-by: jvernee
(cherry picked from commit 50dcc2aec5)
2023-03-04 13:12:53 +07:00
Albert Mingkun Yang
8a95ce02a1 8302127: Remove unused arg in write_ref_field_post
Reviewed-by: phh, kbarrett
(cherry picked from commit 28f5250fa5)
2023-03-04 13:12:52 +07:00
Johan Sjölen
ed6c442762 8301225: Replace NULL with nullptr in share/gc/shenandoah/
Reviewed-by: wkemper, kdnilsen, rkennke
(cherry picked from commit 0c9658446d)
2023-03-04 13:12:51 +07:00
Sean Mullan
fa600bab73 8301700: Increase the default TLS Diffie-Hellman group size from 1024-bit to 2048-bit
Reviewed-by: xuelei
(cherry picked from commit 26b111d714)
2023-03-04 13:12:51 +07:00
Michael McMahon
fd9ca2ec97 8301463: Code in DatagramSocket still refers to resolved JDK-8237352
Reviewed-by: dfuchs
(cherry picked from commit 52388179e6)
2023-03-04 13:12:50 +07:00
Severin Gehwolf
7784841363 8302325: Wrong comment in java.base/share/native/libjimage/imageFile.hpp
Reviewed-by: alanb, jlaskey
(cherry picked from commit 11194e8b82)
2023-03-04 13:12:49 +07:00
Scott Gibbons
5f39d4af08 8300808: Accelerate Base64 on x86 for AVX2
Reviewed-by: jbhateja, redestad, sviswanathan
(cherry picked from commit 33bec20710)
2023-03-04 13:12:49 +07:00
Emanuel Peter
16698ca913 8302147: Speed up compiler/jvmci/compilerToVM/IterateFramesNative.java
Reviewed-by: kvn, thartmann
(cherry picked from commit 46bcc4901e)
2023-03-04 13:12:48 +07:00
Emanuel Peter
c2f77d5943 8302152: Speed up tests with infinite loops, sleep less
Reviewed-by: thartmann, kvn
(cherry picked from commit a9a53f417d)
2023-03-04 13:12:47 +07:00
Justin King
219af25410 8302102: Disable ASan for SafeFetch and os::print_hex_dump
Reviewed-by: dholmes, stuefe

(cherry picked from commit 98a392c4fc)
2023-03-04 13:12:30 +07:00
Thomas Stuefe
db3bb466be 8302129: Make MetaspaceReclaimPolicy a diagnostic switch
Reviewed-by: dholmes, coleenp
(cherry picked from commit 9ccf8ad91f)
2023-03-04 12:35:59 +07:00
Ioi Lam
aac5370065 8296344: Remove dependency on G1 for writing the CDS archive heap
Reviewed-by: ayang, tschatzl, ccheung
(cherry picked from commit bdcbafb219)
2023-03-04 12:35:59 +07:00
Kim Barrett
29ce2d49cc 8302262: Remove -XX:SuppressErrorAt develop option
Reviewed-by: stuefe, dholmes, tschatzl
(cherry picked from commit f1d76fa925)
2023-03-04 12:35:58 +07:00
Mandy Chung
09675a9b9e 8302260: VarHandle.describeConstable() fails to return a nominal descriptor for static public fields
Reviewed-by: alanb, psandoz
(cherry picked from commit 9c202a5a8f)
2023-03-04 12:35:57 +07:00
Vicente Romero
84726c7c84 8301374: NullPointerException in MemberEnter.checkReceiver
Reviewed-by: jlahoda
(cherry picked from commit ca73f7e80f)
2023-03-04 12:35:57 +07:00
Brian Burkhalter
be1001f499 8297632: InputStream.transferTo() method should specify what the return value should be when the number of bytes transfered is larger than Long.MAX_VALUE
Reviewed-by: alanb, lancea
(cherry picked from commit 5b2d430131)
2023-03-04 12:35:56 +07:00
Xue-Lei Andrew Fan
a62ecc6b80 8301274: update for deprecated sprintf for security components
Reviewed-by: ascarpino
(cherry picked from commit f7dee77d73)
2023-03-04 12:35:55 +07:00
Xue-Lei Andrew Fan
bce9d36393 8301279: update for deprecated sprintf for management components
Reviewed-by: kevinw, dholmes
(cherry picked from commit ec901f28c3)
2023-03-04 12:35:55 +07:00
Erik Gahlin
ec07f7e56e 8298278: JFR: Turn MEMFLAGS into a type for use with the NativeMemoryUsage events
Reviewed-by: sjohanss
(cherry picked from commit 8933c2d06a)
2023-03-04 12:35:54 +07:00
Robbin Ehn
6aedcf778d 8302354: InstanceKlass init state/thread should be atomic
Reviewed-by: coleenp, dholmes
(cherry picked from commit 77519e5f4f)
2023-03-04 12:35:53 +07:00
Vicente Romero
eb91a96ff9 8207017: Type annotations on anonymous classes in initializer blocks not written to class file
Reviewed-by: jlahoda
(cherry picked from commit 2ef001e097)
2023-03-04 12:35:52 +07:00
Johan Sjölen
99d435dac0 8295344: Harden runtime/StackGuardPages/TestStackGuardPages.java
Reviewed-by: dholmes, rehn
(cherry picked from commit 8c2c8b3f7f)
2023-03-04 12:35:51 +07:00
Hannes Wallnöfer
2ee996abbc 8302324: Inheritance tree does not show correct type parameters/arguments
Reviewed-by: prappo
(cherry picked from commit 6d4b02b6c9)
2023-03-04 12:35:50 +07:00
Ekaterina Vergizova
8302bd3f80 8301842: JFR: increase checkpoint event size for stacktrace and string pool
Reviewed-by: mgronlun
(cherry picked from commit 7dfe75cf55)
2023-03-04 12:35:50 +07:00
Jie Fu
e68adefd0e 8302368: [ZGC] Client build fails after JDK-8300255
Reviewed-by: fyang, eosterlund
(cherry picked from commit 66742c83d4)
2023-03-04 12:35:49 +07:00
Albert Mingkun Yang
be2cc5614f 8225409: G1: Remove the Hot Card Cache
Reviewed-by: tschatzl, iwalulya
(cherry picked from commit 7c50ab1612)
2023-03-04 12:35:48 +07:00
Conor Cleary
eef2b501bb 8301243: java/net/httpclient/http2/IdleConnectionTimeoutTest.java intermittent failure
Reviewed-by: dfuchs
(cherry picked from commit 92474f13f0)
2023-03-04 12:35:47 +07:00
Severin Gehwolf
315ff06011 8302337: JDK crashes if lib/modules contains non-zero byte containing ATTRIBUTE_END
Reviewed-by: stuefe, jlaskey, alanb
(cherry picked from commit ee5f6e156d)
2023-03-04 12:35:46 +07:00
Erik Österlund
266cc785b0 8301874: BarrierSetC2 should assign barrier data to stores
Reviewed-by: rcastanedalo, kvn
(cherry picked from commit 7f71a1040d)
2023-03-04 12:35:46 +07:00
Eirik Bjorsnos
90c66367c4 8302214: Typo in javadoc of Arrays.compare and Arrays.mismatch
Reviewed-by: jpai
(cherry picked from commit d782125c8f)
2023-03-04 12:35:45 +07:00
Vitaly Provodin
78c0afe4f5 update exclude list on results of 21_b24.2 test runs 2023-03-04 05:17:54 +07:00
Sergey Shelomentsev
81602f10e6 JBR-5350 Separate test for Mac OS 2023-03-02 09:13:24 +02:00
Sergey Shelomentsev
a24b572105 JBR-5350 fix FrameNativeControlTest checks on MacOS 2023-02-28 20:32:04 +02:00
Sergey Shelomentsev
69cad4eb9e JBR-5344 fix incorrectly specified VM options 2023-02-28 20:31:49 +02:00
Sergey Shelomentsev
7a63a54009 JBR-5346 fix MaximizedCustomDecorationsTest test failure (move to the new JBR API) 2023-02-28 16:24:17 +02:00
53 changed files with 1589 additions and 805 deletions

196
.github/README.md vendored
View File

@@ -1,196 +0,0 @@
[![official JetBrains project](http://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
# Welcome to JetBrains Runtime!
JetBrains Runtime is a fork of [OpenJDK](https://github.com/openjdk/jdk) available for Windows, Mac OS X, and Linux.
It includes a number of enhancements in font rendering, ligatures, HiDPI support, windowing/focus subsystems, performance improvements, and bugfixes.
> **_NOTE_**: This is a **development** branch that is periodically synchronized with
> the [OpenJDK master](https://github.com/openjdk/jdk/tree/master) branch.
>
Release builds are based on these branches:
* [jbr11](https://github.com/JetBrains/JetBrainsRuntime/tree/jbr11) (JDK 11)
* [jbr17](https://github.com/JetBrains/JetBrainsRuntime/tree/jbr17) (JDK 17)
Download the latest releases of JetBrains Runtime to use with JetBrains IDEs. The full list
can be found on the [releases page](https://github.com/JetBrains/JetBrainsRuntime/releases).
## Releases based on JDK 17
| IDE Version | Latest JBR | Date Released |
|-------------|--------------------------------------------------------------------------------------------------------|---------------|
| 2023.1 | [17.0.6-b829.1](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.6b829.1) | 14-Feb-2023 |
| 2022.3 | [17.0.6-b653.32](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.6b653.32) | 14-Feb-2023 |
| 2022.2 | [17.0.5-b469.71](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.5b469.71) | 14-Nov-2022 |
## Releases based on JDK 11
| IDE Version | Latest JBR | Date Released |
|-------------|-------------------------------------------------------------------------------------------------------|---------------|
| 2022.1 | [11_0_16-b2043.64](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr11_0_16b2043.64) | 10-Nov-2022 |
| 2021.3 | [11_0_14_1-b1751.46](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr11_0_14_1b1751.46) | 21-Feb-2022 |
| 2021.2 | [11_0_13-b1504.49](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jb11_0_13-b1504.49) | 15-Nov-2021 |
| 2021.1 | [11.0.11+9-b1341.60](https://github.com/JetBrains/JetBrainsRuntime/issues/171#issuecomment-1248891540)| 15-Jun-2021 |
| 2020.3 | [11_0_10-b1145.115](https://github.com/JetBrains/JetBrainsRuntime/issues/171#issuecomment-1249243977) | 21-Jun-2021 |
## Contents
- [Welcome to JetBrains Runtime](#welcome-to-jetbrains-runtime)
- [Products Built on JetBrains Runtime](#products-built-on-jetbrains-runtime)
- [Getting Sources](#getting-sources)
- [macOS, Linux](#macos-linux)
- [Windows](#sources-windows)
- [Configuring the Build Environment](#configuring-the-build-environment)
- [Linux (Docker)](#linux-docker)
- [Ubuntu Linux](#ubuntu-linux)
- [Windows](#build-windows)
- [macOS](#macos)
- [Developing](#developing)
- [Contributing](#contributing)
- [Resources](#resources)
## Products Built on JetBrains Runtime
* [Android Studio](https://developer.android.com/studio). The official IDE for Google's Android operating system.
* [CLion](https://www.jetbrains.com/clion/). A cross-platform IDE for C and C++ from JetBrains.
* [DataGrip](https://www.jetbrains.com/datagrip/). The IDE for Databases and SQL from JetBrains.
* [GoLand](https://www.jetbrains.com/go/). The cross-platform Go IDE from JetBrains.
* [IntelliJ IDEA](https://www.jetbrains.com/idea/). The IDE for JVM from JetBrains.
* [JProfiler](https://www.ej-technologies.com/products/jprofiler/overview.html). The Java profiler.
* [PhpStorm](https://www.jetbrains.com/phpstorm/). The PHP IDE from JetBrains.
* [PyCharm](https://www.jetbrains.com/pycharm/). The Python IDE from JetBrains.
* [Rider](https://www.jetbrains.com/rider/). The cross-platform .NET IDE from JetBrains.
* [RubyMine](https://www.jetbrains.com/ruby/). The Ruby and Rails IDE from JetBrains.
* [Toolbox App](https://www.jetbrains.com/toolbox-app/). JetBrains IDE manager.
* [WebStorm](https://www.jetbrains.com/webstorm/). The JavaScript IDE from JetBrains.
* [YourKit](https://www.yourkit.com/). Java and .NET profilers.
## Getting Sources
### macOS, Linux
```
git config --global core.autocrlf input
git clone git@github.com:JetBrains/JetBrainsRuntime.git
```
### Windows
<a name="sources-windows"></a>
```
git config --global core.autocrlf false
git clone git@github.com:JetBrains/JetBrainsRuntime.git
```
## Configuring the Build Environment
Here are quick per-platform instructions for those who can't wait to get started.
Please refer to [OpenJDK build docs](https://openjdk.java.net/groups/build/doc/building.html) for in-depth
coverage of all the details.
> **_TIP:_** To get a preliminary report of what's missing, run `./configure` and check its output.
> It would usually have meaningful advice on how to solve the problem.
### Linux (Docker)
Create a container:
```
$ cd jb/project/docker
$ docker build .
...
Successfully built 942ea9900054
```
Run these commands in the new container:
```
$ docker run -v `pwd`../../../../:/JetBrainsRuntime -it 942ea9900054
# cd /JetBrainsRuntime
# sh ./configure
# make images CONF=linux-x86_64-normal-server-release
```
### Ubuntu Linux
Install the necessary tools, libraries, and headers with:
```
$ sudo apt-get install autoconf make build-essential libx11-dev libxext-dev libxrender-dev libxtst-dev \
libxt-dev libxrandr-dev libcups2-dev libfontconfig1-dev libasound2-dev
```
Get Java 18 (for instance, [Azul Zulu Builds of OpenJDK 18](https://www.azul.com/downloads/?version=java-18-sts&os=linux&package=jdk)).
Then run the following:
```
$ cd JetBrainsRuntime
$ git checkout main
$ sh ./configure
$ make images
```
This will build the release configuration under `./build/linux-x86_64-server-release/`.
### Windows
<a name="build-windows"></a>
Install the following:
* [Cygwin x64](http://www.cygwin.com/).
Required packages: `autoconf`, `binutils`, `cpio`, `diffutils`, `file`, `gawk`, `gcc-core`, `make`, `m4`, `unzip`, `zip`.
Install those together with Cygwin.
* [Visual Studio compiler toolset](https://visualstudio.microsoft.com/downloads/).
Install with the desktop development kit, which includes Windows SDK and compilers.
Visual Studio 2019 is supported by default.
* Java 18 (for instance, [Azul Zulu Builds of OpenJDK 18](https://www.azul.com/downloads/?version=java-18-sts&os=windows&package=jdk)).
If you have problems while configuring, read [Java tips on Cygwin](http://horstmann.com/articles/cygwin-tips.html).
From the command line:
```
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
"c:\Program_Files\cygwin64\bin\mintty.exe" /bin/bash -l
```
The first command sets up environment variables, the second starts a Cygwin shell with the proper environment.
In the Cygwin shell:
```
$ cd JetBrainsRuntime
$ git checkout main
$ bash configure --with-toolchain-version=2019
$ make images
```
This will build the release configuration under `./build/windows-x86_64-server-release/`.
### macOS
Install the following:
* Xcode command line developer tools and `autoconf` via [Homebrew](https://brew.sh/).
* Java 18 (for instance, [Azul Zulu Builds of OpenJDK 18](https://www.azul.com/downloads/?version=java-18-sts&os=macos&package=jdk)).
From the command line:
```
$ cd JetBrainsRuntime
$ git checkout main
$ sh ./configure
$ make images
```
This will build the release configuration under `./build/macosx-x86_64-server-release/`.
## Developing
You can use [CLion](https://www.jetbrains.com/clion/) to develop native parts of the JetBrains Runtime and
[IntelliJ IDEA](https://www.jetbrains.com/idea/) for the parts written in Java.
Both require projects to be created.
### CLion
Run
```
$ make compile-commands
```
in the git root and open the resulting `build/.../compile_commands.json` file as a project.
Then use `Tools | Compilation Database | Change Project Root` to point to git root of this repository.
See also this detailed step-by-step tutorial for all platforms:
[How to develop OpenJDK with CLion](https://blog.jetbrains.com/clion/2020/03/openjdk-with-clion/).
### IDEA
Run
```
$ sh ./bin/idea.sh
```
in the git root to generate project files (add `--help` for options). If you have multiple
configurations (for example, `release` and `fastdebug`), supply the `--conf <conf_name>` argument.
Then open the git root directory as a project in IDEA.
## Contributing
We are happy to receive your pull requests!
Before you submit one, please sign our [Contributor License Agreement (CLA)](https://www.jetbrains.com/agreements/cla/).
## Resources
* [JetBrains Runtime on GitHub](https://github.com/JetBrains/JetBrainsRuntime).
* [OpenJDK build instructions](https://openjdk.java.net/groups/build/doc/building.html).
* [OpenJDK test instructions](https://htmlpreview.github.io/?https://raw.githubusercontent.com/openjdk/jdk/master/doc/building.html#running-tests).
* [How to develop OpenJDK with CLion](https://blog.jetbrains.com/clion/2020/03/openjdk-with-clion/).

View File

@@ -26,10 +26,6 @@
name: 'OpenJDK GHA Sanity Checks'
on:
push:
branches-ignore:
- master
- pr/*
workflow_dispatch:
inputs:
platforms:
@@ -59,7 +55,8 @@ jobs:
outputs:
linux-x64: ${{ steps.include.outputs.linux-x64 }}
linux-x86: ${{ steps.include.outputs.linux-x86 }}
linux-x64-variants: ${{ steps.include.outputs.linux-x64-variants }}
# additional build options for linux-x64 are disabled
# linux-x64-variants: ${{ steps.include.outputs.linux-x64-variants }}
linux-cross-compile: ${{ steps.include.outputs.linux-cross-compile }}
macos-x64: ${{ steps.include.outputs.macos-x64 }}
macos-aarch64: ${{ steps.include.outputs.macos-aarch64 }}

270
.github/workflows/pr.yml vendored Normal file
View File

@@ -0,0 +1,270 @@
#
# Copyright 2000-2023 JetBrains s.r.o.
# 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.
#
name: 'Build OpenJDK on pull request'
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
###
### Determine platforms to include
###
select:
name: 'Select platforms'
runs-on: ubuntu-22.04
outputs:
linux-x64: ${{ steps.include.outputs.linux-x64 }}
linux-x86: ${{ steps.include.outputs.linux-x86 }}
linux-cross-compile: ${{ steps.include.outputs.linux-cross-compile }}
macos-x64: ${{ steps.include.outputs.macos-x64 }}
macos-aarch64: ${{ steps.include.outputs.macos-aarch64 }}
windows-x64: ${{ steps.include.outputs.windows-x64 }}
windows-aarch64: ${{ steps.include.outputs.windows-aarch64 }}
windows-x86: ${{ steps.include.outputs.windows-x86 }}
steps:
# This function must be inlined in main.yml, or we'd be forced to checkout the repo
- name: 'Check what jobs to run'
id: include
run: |
# Determine which platform jobs to run
# Returns 'true' if the input platform list matches any of the platform monikers given as argument,
# 'false' otherwise.
# arg $1: platform name or names to look for
function check_platform() {
if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
input='${{ github.event.inputs.platforms }}'
elif [[ $GITHUB_EVENT_NAME == push ]]; then
if [[ '${{ !secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/') }}' == 'false' ]]; then
# If JDK_SUBMIT_FILTER is set, and this is not a "submit/" branch, don't run anything
>&2 echo 'JDK_SUBMIT_FILTER is set and not a "submit/" branch'
echo 'false'
return
else
input='${{ secrets.JDK_SUBMIT_PLATFORMS }}'
fi
fi
normalized_input="$(echo ,$input, | tr -d ' ')"
if [[ "$normalized_input" == ",," ]]; then
# For an empty input, assume all platforms should run
echo 'true'
return
else
# Check for all acceptable platform names
for part in $* ; do
if echo "$normalized_input" | grep -q -e ",$part," ; then
echo 'true'
return
fi
done
fi
echo 'false'
}
echo "linux-x64=$(check_platform linux-x64 linux x64)" >> $GITHUB_OUTPUT
echo "linux-x86=$(check_platform linux-x86 linux x86)" >> $GITHUB_OUTPUT
echo "linux-x64-variants=$(check_platform linux-x64-variants variants)" >> $GITHUB_OUTPUT
echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
echo "macos-x64=$(check_platform macos-x64 macos x64)" >> $GITHUB_OUTPUT
echo "macos-aarch64=$(check_platform macos-aarch64 macos aarch64)" >> $GITHUB_OUTPUT
echo "windows-x64=$(check_platform windows-x64 windows x64)" >> $GITHUB_OUTPUT
echo "windows-x86=$(check_platform windows-x86 windows x86)" >> $GITHUB_OUTPUT
echo "windows-aarch64=$(check_platform windows-aarch64 windows aarch64)" >> $GITHUB_OUTPUT
echo "docs=$(check_platform docs)" >> $GITHUB_OUTPUT
###
### Build jobs
###
build-linux-x64:
name: linux-x64
needs: select
uses: ./.github/workflows/build-linux.yml
with:
platform: linux-x64
gcc-major-version: '10'
apt-gcc-version: '10.4.0-4ubuntu1~22.04'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
# The linux-x64 jdk bundle is used as buildjdk for the cross-compile job
if: needs.select.outputs.linux-x64 == 'true' || needs.select.outputs.linux-cross-compile == 'true'
build-linux-x86:
name: linux-x86
needs: select
uses: ./.github/workflows/build-linux.yml
with:
platform: linux-x86
gcc-major-version: '10'
gcc-package-suffix: '-multilib'
apt-gcc-version: '10.4.0-4ubuntu1~22.04'
apt-architecture: 'i386'
# Some multilib libraries do not have proper inter-dependencies, so we have to
# install their dependencies manually.
apt-extra-packages: 'libfreetype6-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libc6-i386'
extra-conf-options: '--with-target-bits=32'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.select.outputs.linux-x86 == 'true'
build-linux-cross-compile:
name: linux-cross-compile
needs:
- select
- build-linux-x64
uses: ./.github/workflows/build-cross-compile.yml
with:
gcc-major-version: '10'
apt-gcc-version: '10.4.0-4ubuntu1~22.04'
apt-gcc-cross-version: '10.4.0-4ubuntu1~22.04cross1'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.select.outputs.linux-cross-compile == 'true'
build-macos-x64:
name: macos-x64
needs: select
uses: ./.github/workflows/build-macos.yml
with:
platform: macos-x64
xcode-toolset-version: '12.5.1'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.select.outputs.macos-x64 == 'true'
build-macos-aarch64:
name: macos-aarch64
needs: select
uses: ./.github/workflows/build-macos.yml
with:
platform: macos-aarch64
xcode-toolset-version: '12.5.1'
extra-conf-options: '--openjdk-target=aarch64-apple-darwin'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.select.outputs.macos-aarch64 == 'true'
build-windows-x64:
name: windows-x64
needs: select
uses: ./.github/workflows/build-windows.yml
with:
platform: windows-x64
msvc-toolset-version: '14.29'
msvc-toolset-architecture: 'x86.x64'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.select.outputs.windows-x64 == 'true'
build-windows-x86:
name: windows-x86
needs: select
uses: ./.github/workflows/build-windows.yml
with:
platform: windows-x86
msvc-toolset-version: '14.29'
msvc-toolset-architecture: 'x86'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.select.outputs.windows-x86 == 'true'
build-windows-aarch64:
name: windows-aarch64
needs: select
uses: ./.github/workflows/build-windows.yml
with:
platform: windows-aarch64
msvc-toolset-version: '14.29'
msvc-toolset-architecture: 'arm64'
make-target: 'hotspot'
extra-conf-options: '--openjdk-target=aarch64-unknown-cygwin'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.select.outputs.windows-aarch64 == 'true'
build-docs:
name: docs
needs: select
uses: ./.github/workflows/build-linux.yml
with:
platform: linux-x64
debug-levels: '[ "debug" ]'
make-target: 'docs-jdk-bundles'
# Make sure we never try to make full docs, since that would require a
# build JDK, and we do not need the additional testing of the graphs.
extra-conf-options: '--disable-full-docs'
gcc-major-version: '10'
apt-gcc-version: '10.4.0-4ubuntu1~22.04'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.select.outputs.docs == 'true'
# Remove bundles so they are not misconstrued as binary distributions from the JDK project
remove-bundles:
name: 'Remove bundle artifacts'
runs-on: ubuntu-22.04
if: always()
needs:
- build-linux-x64
- build-linux-x86
- build-linux-cross-compile
- build-macos-x64
- build-macos-aarch64
- build-windows-x64
- build-windows-aarch64
- build-windows-x86
steps:
# Hack to get hold of the api environment variables that are only defined for actions
- name: 'Get API configuration'
id: api
uses: actions/github-script@v6
with:
script: 'return { url: process.env["ACTIONS_RUNTIME_URL"], token: process.env["ACTIONS_RUNTIME_TOKEN"] }'
- name: 'Remove bundle artifacts'
run: |
# Find and remove all bundle artifacts
ALL_ARTIFACT_URLS="$(curl -s \
-H 'Accept: application/json;api-version=6.0-preview' \
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
'${{ fromJson(steps.api.outputs.result).url }}_apis/pipelines/workflows/${{ github.run_id }}/artifacts?api-version=6.0-preview')"
BUNDLE_ARTIFACT_URLS="$(echo "$ALL_ARTIFACT_URLS" | jq -r -c '.value | map(select(.name|startswith("bundles-"))) | .[].url')"
for url in $BUNDLE_ARTIFACT_URLS; do
echo "Removing $url"
curl -s \
-H 'Accept: application/json;api-version=6.0-preview' \
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
-X DELETE "$url" \
|| echo "Failed to remove bundle"
done

220
README.md
View File

@@ -1,14 +1,216 @@
[![official JetBrains project](http://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
# Welcome to the JDK!
# Welcome to JetBrains Runtime!
For build instructions please see the
[online documentation](https://openjdk.org/groups/build/doc/building.html),
or either of these files:
JetBrains Runtime is a fork of [OpenJDK](https://github.com/openjdk/jdk) available for Windows, Mac OS X, and Linux.
It supports enhanced class redefinition ([DCEVM](https://ssw.jku.at/dcevm/)),
features optional [JCEF](https://github.com/JetBrains/jcef), a framework for embedding Chromium-based browsers,
includes a number of improvements in font rendering, keyboards support,
windowing/focus subsystems, HiDPI, accessibility, and performance, provides better desktop integration
and bugfixes not yet present in OpenJDK.
- [doc/building.html](doc/building.html) (html version)
- [doc/building.md](doc/building.md) (markdown version)
> **_NOTE_**: This is a **development** branch that is periodically synchronized with
> the [OpenJDK master](https://github.com/openjdk/jdk/tree/master) branch.
>
Release builds are based on these branches:
* [jbr11](https://github.com/JetBrains/JetBrainsRuntime/tree/jbr11) (JDK 11)
* [jbr17](https://github.com/JetBrains/JetBrainsRuntime/tree/jbr17) (JDK 17)
Download the latest releases of JetBrains Runtime to use with JetBrains IDEs. The full list
can be found on the [releases page](https://github.com/JetBrains/JetBrainsRuntime/releases).
See <https://openjdk.org/> for more information about the OpenJDK
Community and the JDK and see <https://bugs.openjdk.org> for JDK issue
tracking.
## Releases based on JDK 17
| IDE Version | Latest JBR | Date Released |
|-------------|--------------------------------------------------------------------------------------------------------|---------------|
| 2023.1 | [17.0.6-b829.5](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.6b829.5) | 01-Mar-2023 |
| 2022.3 | [17.0.6-b653.34](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.6b653.34) | 28-Feb-2023 |
| 2022.2 | [17.0.6-b469.82](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.6b469.82) | 06-Mar-2023 |
## Releases based on JDK 11
| IDE Version | Latest JBR | Date Released |
|-------------|-------------------------------------------------------------------------------------------------------|---------------|
| 2022.1 | [11_0_16-b2043.64](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr11_0_16b2043.64) | 10-Nov-2022 |
| 2021.3 | [11_0_14_1-b1751.46](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr11_0_14_1b1751.46) | 21-Feb-2022 |
| 2021.2 | [11_0_13-b1504.49](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jb11_0_13-b1504.49) | 15-Nov-2021 |
| 2021.1 | [11.0.11+9-b1341.60](https://github.com/JetBrains/JetBrainsRuntime/issues/171#issuecomment-1248891540)| 15-Jun-2021 |
| 2020.3 | [11_0_10-b1145.115](https://github.com/JetBrains/JetBrainsRuntime/issues/171#issuecomment-1249243977) | 21-Jun-2021 |
## Contents
- [Welcome to JetBrains Runtime](#welcome-to-jetbrains-runtime)
- [Why Use JetBrains Runtime?](#why-use-jetbrains-runtime)
- [Products Built on JetBrains Runtime](#products-built-on-jetbrains-runtime)
- [Getting Sources](#getting-sources)
- [macOS, Linux](#macos-linux)
- [Windows](#sources-windows)
- [Configuring the Build Environment](#configuring-the-build-environment)
- [Linux (Docker)](#linux-docker)
- [Ubuntu Linux](#ubuntu-linux)
- [Windows](#build-windows)
- [macOS](#macos)
- [Developing](#developing)
- [Contributing](#contributing)
- [Resources](#resources)
## Why Use JetBrains Runtime?
* **Embedded browser**: JetBrains Runtime includes the Java Chromium Embedded Framework ([JCEF](https://github.com/JetBrains/jcef)), which
enables you to embed a Chromium-based browsers in your JVM-based application.
To use it, [download a build with JCEF](https://github.com/JetBrains/JetBrainsRuntime/releases).
* **Enhanced class re-definition** with the [DCEVM](https://ssw.jku.at/dcevm/) technology that makes it easier to reload
changed code without restarting JVM; this feature needs to be explicitly enabled with `-XX:+AllowEnhancedClassRedefinition`.
* **Better FPS performance** for graphics-intensive applications.
* **Improved font rendering**, **keyboard input** (such as shortcuts and multinational keyboards),
**HiDPI** and **accessibility** support.
* **Robust desktop experience**: GUI-related fixes often reach JetBrains Runtime much earlier than the corresponding version of OpenJDK.
## Products Built on JetBrains Runtime
* [Android Studio](https://developer.android.com/studio). The official IDE for Google's Android operating system.
* [CLion](https://www.jetbrains.com/clion/). A cross-platform IDE for C and C++ from JetBrains.
* [DataGrip](https://www.jetbrains.com/datagrip/). The IDE for Databases and SQL from JetBrains.
* [GoLand](https://www.jetbrains.com/go/). The cross-platform Go IDE from JetBrains.
* [IntelliJ IDEA](https://www.jetbrains.com/idea/). The IDE for JVM from JetBrains.
* [JProfiler](https://www.ej-technologies.com/products/jprofiler/overview.html). The Java profiler.
* [PhpStorm](https://www.jetbrains.com/phpstorm/). The PHP IDE from JetBrains.
* [PyCharm](https://www.jetbrains.com/pycharm/). The Python IDE from JetBrains.
* [Rider](https://www.jetbrains.com/rider/). The cross-platform .NET IDE from JetBrains.
* [RubyMine](https://www.jetbrains.com/ruby/). The Ruby and Rails IDE from JetBrains.
* [Toolbox App](https://www.jetbrains.com/toolbox-app/). JetBrains IDE manager.
* [WebStorm](https://www.jetbrains.com/webstorm/). The JavaScript IDE from JetBrains.
* [YourKit](https://www.yourkit.com/). Java and .NET profilers.
## Getting Sources
### macOS, Linux
```
git config --global core.autocrlf input
git clone git@github.com:JetBrains/JetBrainsRuntime.git
cd JetBrainsRuntime
git checkout jbr21
```
### Windows
<a name="sources-windows"></a>
```
git config --global core.autocrlf false
git clone git@github.com:JetBrains/JetBrainsRuntime.git
cd JetBrainsRuntime
git checkout jbr21
```
## Configuring the Build Environment
Here are quick per-platform instructions for those who can't wait to get started.
Please refer to [OpenJDK build docs](https://openjdk.java.net/groups/build/doc/building.html) for in-depth
coverage of all the details.
> **_TIP:_** To get a preliminary report of what's missing, run `./configure` and check its output.
> It would usually have meaningful advice on how to solve the problem.
### Linux (Docker)
Create a container:
```
$ cd jb/project/docker
$ docker build .
...
Successfully built 942ea9900054
```
Run these commands in the new container:
```
$ docker run -v `pwd`../../../../:/JetBrainsRuntime -it 942ea9900054
# cd /JetBrainsRuntime
# sh ./configure
# make images CONF=linux-x86_64-normal-server-release
```
### Ubuntu Linux
Install the necessary tools, libraries, and headers with:
```
$ sudo apt-get install autoconf make build-essential libx11-dev libxext-dev libxrender-dev libxtst-dev \
libxt-dev libxrandr-dev libcups2-dev libfontconfig1-dev libasound2-dev
```
Get Java 19 (for instance, [Azul Zulu Builds of OpenJDK 19](https://www.azul.com/downloads/?version=java-19-sts&os=linux&package=jdk)).
Then run the following:
```
$ cd JetBrainsRuntime
$ git checkout main
$ sh ./configure
$ make images
```
This will build the release configuration under `./build/linux-x86_64-server-release/`.
### Windows
<a name="build-windows"></a>
Install the following:
* [Cygwin x64](http://www.cygwin.com/).
Required packages: `autoconf`, `binutils`, `cpio`, `diffutils`, `file`, `gawk`, `gcc-core`, `make`, `m4`, `unzip`, `zip`.
Install those together with Cygwin.
* [Visual Studio compiler toolset](https://visualstudio.microsoft.com/downloads/).
Install with the desktop development kit, which includes Windows SDK and compilers.
Visual Studio 2019 is supported by default.
* Java 19 (for instance, [Azul Zulu Builds of OpenJDK 19](https://www.azul.com/downloads/?version=java-19-sts&os=windows&package=jdk)).
If you have problems while configuring, read [Java tips on Cygwin](http://horstmann.com/articles/cygwin-tips.html).
From the command line:
```
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
"c:\Program_Files\cygwin64\bin\mintty.exe" /bin/bash -l
```
The first command sets up environment variables, the second starts a Cygwin shell with the proper environment.
In the Cygwin shell:
```
$ cd JetBrainsRuntime
$ git checkout main
$ bash configure --with-toolchain-version=2019
$ make images
```
This will build the release configuration under `./build/windows-x86_64-server-release/`.
### macOS
Install the following:
* Xcode command line developer tools and `autoconf` via [Homebrew](https://brew.sh/).
* Java 19 (for instance, [Azul Zulu Builds of OpenJDK 19](https://www.azul.com/downloads/?version=java-19-sts&os=macos&package=jdk)).
From the command line:
```
$ cd JetBrainsRuntime
$ git checkout main
$ sh ./configure
$ make images
```
This will build the release configuration under `./build/macosx-x86_64-server-release/`.
## Developing
You can use [CLion](https://www.jetbrains.com/clion/) to develop native parts of the JetBrains Runtime and
[IntelliJ IDEA](https://www.jetbrains.com/idea/) for the parts written in Java.
Both require projects to be created.
### CLion
Run
```
$ make compile-commands
```
in the git root and open the resulting `build/.../compile_commands.json` file as a project.
Then use `Tools | Compilation Database | Change Project Root` to point to git root of this repository.
See also this detailed step-by-step tutorial for all platforms:
[How to develop OpenJDK with CLion](https://blog.jetbrains.com/clion/2020/03/openjdk-with-clion/).
### IDEA
Run
```
$ sh ./bin/idea.sh
```
in the git root to generate project files (add `--help` for options). If you have multiple
configurations (for example, `release` and `fastdebug`), supply the `--conf <conf_name>` argument.
Then open the git root directory as a project in IDEA.
## Contributing
We are happy to receive your pull requests!
Before you submit one, please sign our [Contributor License Agreement (CLA)](https://www.jetbrains.com/agreements/cla/).
## Resources
* [JetBrains Runtime on GitHub](https://github.com/JetBrains/JetBrainsRuntime).
* [OpenJDK build instructions](https://openjdk.java.net/groups/build/doc/building.html).
* [OpenJDK test instructions](https://htmlpreview.github.io/?https://raw.githubusercontent.com/openjdk/jdk/master/doc/building.html#running-tests).
* [How to develop OpenJDK with CLion](https://blog.jetbrains.com/clion/2020/03/openjdk-with-clion/).

View File

@@ -174,11 +174,3 @@ function copy_jmods() {
echo "${__mods_list}," | while read -d, mod; do cp $__jmods_from/$mod.jmod $__jmods_to/; done
}
function build_jbr_api() {
make jbr-api || do_exit $?
JBR_API_DIR=build/${RELEASE_NAME}/jbr-api
JBR_API_JAR=jbr-api-b${build_number}.jar
cp "${JBR_API_DIR}/jbr-api.jar" "${JBR_API_JAR}"
}

View File

@@ -154,12 +154,11 @@ if [ $do_maketest -eq 1 ]; then
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-linux-${libc_type_suffix}test-aarch64-b${build_number}
echo Creating "$JBRSDK_TEST" ...
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java
make test-image CONF=$RELEASE_NAME || do_exit $?
make test-image jbr-api CONF=$RELEASE_NAME JBR_API_JBR_VERSION=TEST || do_exit $?
cp "build/${RELEASE_NAME}/jbr-api/jbr-api.jar" "${IMAGES_DIR}/test"
tar -pcf "$JBRSDK_TEST".tar -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
gzip "$JBRSDK_TEST".tar || do_exit $?
fi
build_jbr_api
do_exit 0

View File

@@ -154,12 +154,11 @@ if [ $do_maketest -eq 1 ]; then
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-linux-${libc_type_suffix}test-x64-b${build_number}
echo Creating "$JBRSDK_TEST" ...
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java
make test-image CONF=$RELEASE_NAME || do_exit $?
make test-image jbr-api CONF=$RELEASE_NAME JBR_API_JBR_VERSION=TEST || do_exit $?
cp "build/${RELEASE_NAME}/jbr-api/jbr-api.jar" "${IMAGES_DIR}/test"
tar -pcf "$JBRSDK_TEST".tar -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
gzip "$JBRSDK_TEST".tar || do_exit $?
fi
build_jbr_api
do_exit 0

View File

@@ -134,12 +134,11 @@ if [ $do_maketest -eq 1 ]; then
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-linux-${libc_type_suffix}test-x86-b${build_number}
echo Creating "$JBRSDK_TEST" ...
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java
make test-image CONF=$RELEASE_NAME || do_exit $?
make test-image jbr-api CONF=$RELEASE_NAME JBR_API_JBR_VERSION=TEST || do_exit $?
cp "build/${RELEASE_NAME}/jbr-api/jbr-api.jar" "${IMAGES_DIR}/test"
tar -pcf "$JBRSDK_TEST".tar -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
gzip "$JBRSDK_TEST".tar || do_exit $?
fi
build_jbr_api
do_exit 0

View File

@@ -158,11 +158,10 @@ if [ $do_maketest -eq 1 ]; then
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-osx-test-${architecture}-b${build_number}
echo Creating "$JBRSDK_TEST" ...
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java
make test-image CONF=$RELEASE_NAME || do_exit $?
make test-image jbr-api CONF=$RELEASE_NAME JBR_API_JBR_VERSION=TEST || do_exit $?
cp "build/${RELEASE_NAME}/jbr-api/jbr-api.jar" "${IMAGES_DIR}/test"
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
COPYFILE_DISABLE=1 tar -pczf "$JBRSDK_TEST".tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
fi
build_jbr_api
do_exit 0

View File

@@ -101,13 +101,13 @@ esac
if [ -z "${INC_BUILD:-}" ]; then
do_configure || do_exit $?
if [ $do_maketest -eq 1 ]; then
make LOG=info CONF=$RELEASE_NAME clean images test-image || do_exit $?
make LOG=info CONF=$RELEASE_NAME clean images test-image jbr-api JBR_API_JBR_VERSION=TEST || do_exit $?
else
make LOG=info CONF=$RELEASE_NAME clean images || do_exit $?
fi
else
if [ $do_maketest -eq 1 ]; then
make LOG=info CONF=$RELEASE_NAME images test-image || do_exit $?
make LOG=info CONF=$RELEASE_NAME images test-image jbr-api JBR_API_JBR_VERSION=TEST || do_exit $?
else
make LOG=info CONF=$RELEASE_NAME images || do_exit $?
fi
@@ -145,6 +145,4 @@ if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type
fi
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
build_jbr_api
do_exit 0

View File

@@ -94,13 +94,13 @@ esac
if [ -z "${INC_BUILD:-}" ]; then
do_configure || do_exit $?
if [ $do_maketest -eq 1 ]; then
make LOG=info CONF=$RELEASE_NAME clean images test-image || do_exit $?
make LOG=info CONF=$RELEASE_NAME clean images test-image jbr-api JBR_API_JBR_VERSION=TEST || do_exit $?
else
make LOG=info CONF=$RELEASE_NAME clean images || do_exit $?
fi
else
if [ $do_maketest -eq 1 ]; then
make LOG=info CONF=$RELEASE_NAME images test-image || do_exit $?
make LOG=info CONF=$RELEASE_NAME images test-image jbr-api JBR_API_JBR_VERSION=TEST || do_exit $?
else
make LOG=info CONF=$RELEASE_NAME images || do_exit $?
fi
@@ -138,6 +138,4 @@ if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type
fi
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
build_jbr_api
do_exit 0

View File

@@ -89,13 +89,13 @@ esac
if [ -z "${INC_BUILD:-}" ]; then
do_configure || do_exit $?
if [ $do_maketest -eq 1 ]; then
make LOG=info CONF=$RELEASE_NAME clean images test-image || do_exit $?
make LOG=info CONF=$RELEASE_NAME clean images test-image jbr-api JBR_API_JBR_VERSION=TEST || do_exit $?
else
make LOG=info CONF=$RELEASE_NAME clean images || do_exit $?
fi
else
if [ $do_maketest -eq 1 ]; then
make LOG=info CONF=$RELEASE_NAME images test-image || do_exit $?
make LOG=info CONF=$RELEASE_NAME images test-image jbr-api JBR_API_JBR_VERSION=TEST || do_exit $?
else
make LOG=info CONF=$RELEASE_NAME images || do_exit $?
fi
@@ -128,6 +128,4 @@ if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type
fi
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
build_jbr_api
do_exit 0

View File

@@ -51,6 +51,7 @@ pack_jbr jbrsdk${jbr_name_postfix} jbrsdk
if [ $do_maketest -eq 1 ]; then
JBRSDK_TEST=$JBRSDK_BUNDLE-$JBSDK_VERSION-windows-test-aarch64-b$build_number
cp "build/${RELEASE_NAME}/jbr-api/jbr-api.jar" "${IMAGES_DIR}/test" || do_exit $?
echo Creating $JBRSDK_TEST.tar.gz ...
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
fi

View File

@@ -51,6 +51,7 @@ pack_jbr jbrsdk${jbr_name_postfix} jbrsdk
if [ $do_maketest -eq 1 ]; then
JBRSDK_TEST=$JBRSDK_BUNDLE-$JBSDK_VERSION-windows-test-x64-b$build_number
cp "build/${RELEASE_NAME}/jbr-api/jbr-api.jar" "${IMAGES_DIR}/test" || do_exit $?
echo Creating $JBRSDK_TEST.tar.gz ...
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
fi

View File

@@ -32,6 +32,8 @@ function pack_jbr {
[ "$bundle_type" == "nomod" ] && bundle_type=""
JBRSDK_BUNDLE=jbrsdk
RELEASE_NAME=windows-x86_64-server-release
IMAGES_DIR=build/$RELEASE_NAME/images
BASE_DIR=.
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
@@ -45,6 +47,7 @@ pack_jbr jbrsdk${jbr_name_postfix} jbrsdk
if [ $do_maketest -eq 1 ]; then
JBRSDK_TEST=$JBRSDK_BUNDLE-$JBSDK_VERSION-windows-test-x86-b$build_number
cp "build/${RELEASE_NAME}/jbr-api/jbr-api.jar" "${IMAGES_DIR}/test" || do_exit $?
echo Creating $JBRSDK_TEST.tar.gz ...
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $BASE_DIR --exclude='test/jdk/demos' test || do_exit $?
fi

View File

@@ -64,139 +64,140 @@ static struct _key
{
unsigned short keyCode;
BOOL postsTyped;
BOOL variesBetweenLayouts;
jint javaKeyLocation;
jint javaKeyCode;
}
const keyTable[] =
{
{0x00, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_A},
{0x01, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_S},
{0x02, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_D},
{0x03, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_F},
{0x04, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_H},
{0x05, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_G},
{0x06, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_Z},
{0x07, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_X},
{0x08, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_C},
{0x09, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_V},
{0x0A, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_BACK_QUOTE},
{0x0B, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_B},
{0x0C, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_Q},
{0x0D, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_W},
{0x0E, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_E},
{0x0F, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_R},
{0x10, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_Y},
{0x11, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_T},
{0x12, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_1},
{0x13, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_2},
{0x14, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_3},
{0x15, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_4},
{0x16, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_6},
{0x17, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_5},
{0x18, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_EQUALS},
{0x19, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_9},
{0x1A, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_7},
{0x1B, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_MINUS},
{0x1C, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_8},
{0x1D, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_0},
{0x1E, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_CLOSE_BRACKET},
{0x1F, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_O},
{0x20, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_U},
{0x21, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_OPEN_BRACKET},
{0x22, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_I},
{0x23, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_P},
{0x24, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_ENTER},
{0x25, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_L},
{0x26, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_J},
{0x27, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_QUOTE},
{0x28, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_K},
{0x29, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_SEMICOLON},
{0x2A, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_BACK_SLASH},
{0x2B, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_COMMA},
{0x2C, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_SLASH},
{0x2D, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_N},
{0x2E, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_M},
{0x2F, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_PERIOD},
{0x30, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_TAB},
{0x31, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_SPACE},
{0x32, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_BACK_QUOTE},
{0x33, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_BACK_SPACE},
{0x34, YES, KL_NUMPAD, java_awt_event_KeyEvent_VK_ENTER},
{0x35, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_ESCAPE},
{0x36, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x37, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_META}, // ****
{0x38, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_SHIFT}, // ****
{0x39, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_CAPS_LOCK},
{0x3A, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_ALT}, // ****
{0x3B, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_CONTROL}, // ****
{0x3C, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x3D, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_ALT_GRAPH},
{0x3E, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x3F, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED}, // the 'fn' key on PowerBooks
{0x40, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F17},
{0x41, YES, KL_NUMPAD, java_awt_event_KeyEvent_VK_DECIMAL},
{0x42, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x43, YES, KL_NUMPAD, java_awt_event_KeyEvent_VK_MULTIPLY},
{0x44, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x45, YES, KL_NUMPAD, java_awt_event_KeyEvent_VK_ADD},
{0x46, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x47, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_CLEAR},
{0x48, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x49, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x4A, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x4B, YES, KL_NUMPAD, java_awt_event_KeyEvent_VK_DIVIDE},
{0x4C, YES, KL_NUMPAD, java_awt_event_KeyEvent_VK_ENTER},
{0x4D, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x4E, YES, KL_NUMPAD, java_awt_event_KeyEvent_VK_SUBTRACT},
{0x4F, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F18},
{0x50, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F19},
{0x51, YES, KL_NUMPAD, java_awt_event_KeyEvent_VK_EQUALS},
{0x52, YES, KL_NUMPAD, java_awt_event_KeyEvent_VK_NUMPAD0},
{0x53, YES, KL_NUMPAD, java_awt_event_KeyEvent_VK_NUMPAD1},
{0x54, YES, KL_NUMPAD, java_awt_event_KeyEvent_VK_NUMPAD2},
{0x55, YES, KL_NUMPAD, java_awt_event_KeyEvent_VK_NUMPAD3},
{0x56, YES, KL_NUMPAD, java_awt_event_KeyEvent_VK_NUMPAD4},
{0x57, YES, KL_NUMPAD, java_awt_event_KeyEvent_VK_NUMPAD5},
{0x58, YES, KL_NUMPAD, java_awt_event_KeyEvent_VK_NUMPAD6},
{0x59, YES, KL_NUMPAD, java_awt_event_KeyEvent_VK_NUMPAD7},
{0x5A, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F20},
{0x5B, YES, KL_NUMPAD, java_awt_event_KeyEvent_VK_NUMPAD8},
{0x5C, YES, KL_NUMPAD, java_awt_event_KeyEvent_VK_NUMPAD9},
{0x5D, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_BACK_SLASH}, // This is a combo yen/backslash on JIS keyboards.
{0x5E, YES, KL_NUMPAD, java_awt_event_KeyEvent_VK_UNDERSCORE},
{0x5F, YES, KL_NUMPAD, java_awt_event_KeyEvent_VK_COMMA},
{0x60, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F5},
{0x61, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F6},
{0x62, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F7},
{0x63, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F3},
{0x64, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F8},
{0x65, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F9},
{0x66, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_ALPHANUMERIC},
{0x67, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F11},
{0x68, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_KATAKANA},
{0x69, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F13},
{0x6A, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F16},
{0x6B, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F14},
{0x6C, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x6D, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F10},
{0x6E, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x6F, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F12},
{0x70, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x71, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F15},
{0x72, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_HELP},
{0x73, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_HOME},
{0x74, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_PAGE_UP},
{0x75, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_DELETE},
{0x76, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F4},
{0x77, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_END},
{0x78, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F2},
{0x79, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_PAGE_DOWN},
{0x7A, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F1},
{0x7B, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_LEFT},
{0x7C, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_RIGHT},
{0x7D, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_DOWN},
{0x7E, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_UP},
{0x7F, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x00, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_A},
{0x01, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_S},
{0x02, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_D},
{0x03, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_F},
{0x04, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_H},
{0x05, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_G},
{0x06, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_Z},
{0x07, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_X},
{0x08, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_C},
{0x09, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_V},
{0x0A, YES, YES, KL_STANDARD, 0x1000000 + 0x00A7},
{0x0B, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_B},
{0x0C, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_Q},
{0x0D, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_W},
{0x0E, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_E},
{0x0F, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_R},
{0x10, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_Y},
{0x11, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_T},
{0x12, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_1},
{0x13, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_2},
{0x14, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_3},
{0x15, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_4},
{0x16, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_6},
{0x17, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_5},
{0x18, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_EQUALS},
{0x19, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_9},
{0x1A, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_7},
{0x1B, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_MINUS},
{0x1C, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_8},
{0x1D, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_0},
{0x1E, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_CLOSE_BRACKET},
{0x1F, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_O},
{0x20, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_U},
{0x21, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_OPEN_BRACKET},
{0x22, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_I},
{0x23, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_P},
{0x24, YES, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_ENTER},
{0x25, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_L},
{0x26, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_J},
{0x27, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_QUOTE},
{0x28, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_K},
{0x29, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_SEMICOLON},
{0x2A, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_BACK_SLASH},
{0x2B, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_COMMA},
{0x2C, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_SLASH},
{0x2D, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_N},
{0x2E, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_M},
{0x2F, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_PERIOD},
{0x30, YES, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_TAB},
{0x31, YES, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_SPACE},
{0x32, YES, YES, KL_STANDARD, java_awt_event_KeyEvent_VK_BACK_QUOTE},
{0x33, YES, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_BACK_SPACE},
{0x34, YES, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_ENTER},
{0x35, YES, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_ESCAPE},
{0x36, NO, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x37, NO, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_META}, // ****
{0x38, NO, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_SHIFT}, // ****
{0x39, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_CAPS_LOCK},
{0x3A, NO, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_ALT}, // ****
{0x3B, NO, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_CONTROL}, // ****
{0x3C, NO, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x3D, NO, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_ALT_GRAPH},
{0x3E, NO, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x3F, NO, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED}, // the 'fn' key on PowerBooks
{0x40, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F17},
{0x41, YES, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_DECIMAL},
{0x42, NO, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x43, YES, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_MULTIPLY},
{0x44, NO, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x45, YES, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_ADD},
{0x46, NO, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x47, NO, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_CLEAR},
{0x48, NO, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x49, NO, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x4A, NO, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x4B, YES, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_DIVIDE},
{0x4C, YES, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_ENTER},
{0x4D, NO, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x4E, YES, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_SUBTRACT},
{0x4F, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F18},
{0x50, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F19},
{0x51, YES, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_EQUALS},
{0x52, YES, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_NUMPAD0},
{0x53, YES, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_NUMPAD1},
{0x54, YES, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_NUMPAD2},
{0x55, YES, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_NUMPAD3},
{0x56, YES, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_NUMPAD4},
{0x57, YES, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_NUMPAD5},
{0x58, YES, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_NUMPAD6},
{0x59, YES, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_NUMPAD7},
{0x5A, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F20},
{0x5B, YES, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_NUMPAD8},
{0x5C, YES, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_NUMPAD9},
{0x5D, YES, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_BACK_SLASH}, // This is a combo yen/backslash on JIS keyboards.
{0x5E, YES, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_UNDERSCORE},
{0x5F, YES, NO, KL_NUMPAD, java_awt_event_KeyEvent_VK_COMMA},
{0x60, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F5},
{0x61, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F6},
{0x62, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F7},
{0x63, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F3},
{0x64, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F8},
{0x65, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F9},
{0x66, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_ALPHANUMERIC},
{0x67, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F11},
{0x68, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_KATAKANA},
{0x69, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F13},
{0x6A, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F16},
{0x6B, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F14},
{0x6C, NO, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x6D, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F10},
{0x6E, NO, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x6F, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F12},
{0x70, NO, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
{0x71, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F15},
{0x72, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_HELP},
{0x73, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_HOME},
{0x74, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_PAGE_UP},
{0x75, YES, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_DELETE},
{0x76, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F4},
{0x77, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_END},
{0x78, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F2},
{0x79, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_PAGE_DOWN},
{0x7A, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_F1},
{0x7B, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_LEFT},
{0x7C, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_RIGHT},
{0x7D, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_DOWN},
{0x7E, NO, NO, KL_STANDARD, java_awt_event_KeyEvent_VK_UP},
{0x7F, NO, NO, KL_UNKNOWN, java_awt_event_KeyEvent_VK_UNDEFINED},
};
/*
@@ -488,6 +489,7 @@ NsCharToJavaVirtualKeyCode(unichar ch, BOOL isDeadChar,
unichar *deadChar)
{
static const size_t keyTableSize = sizeof(keyTable) / sizeof(struct _key);
NSInteger offset;
// If the key without modifiers generates a dead char, then this is the character
@@ -517,6 +519,24 @@ NsCharToJavaVirtualKeyCode(unichar ch, BOOL isDeadChar,
}
}
if (key < keyTableSize) {
// US physical key -> character mapping
*postsTyped = keyTable[key].postsTyped;
*keyCode = keyTable[key].javaKeyCode;
*keyLocation = keyTable[key].javaKeyLocation;
if (!keyTable[key].variesBetweenLayouts) {
return;
}
} else {
// Should we report this? This means we've got a keyboard
// we don't know about...
*postsTyped = NO;
*keyCode = java_awt_event_KeyEvent_VK_UNDEFINED;
*keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_UNKNOWN;
return;
}
TISInputSourceRef currentKeyboard = TISCopyCurrentKeyboardInputSource();
// Whether this is a latin-based keyboard layout (English, German, French, etc)
@@ -525,11 +545,17 @@ NsCharToJavaVirtualKeyCode(unichar ch, BOOL isDeadChar,
unichar testLowercaseChar = tolower(ch);
if (useNationalLayouts && asciiCapable) {
if (!useNationalLayouts || asciiCapable) {
// If national layouts are enabled and the current keyboard is latin-based then
// we try to look up a character in a table first, before falling back to looking up
// the virtual key code from macOS's hardware key code, since hardware key codes
// don't respect the specific keyboard layout the user uses.
// The same happens when the national layouts are disabled to be consistent
// with the default behavior of OpenJDK.
// Together with the following two checks (letters and digits) this table
// properly handles all keys that have corresponding VK_ codes.
// Unfortunately not all keys are like that. They are handled separately.
for (const struct CharToVKEntry *map = extraCharToVKTable; map->c != 0; ++map) {
if (map->c == testLowercaseChar) {
@@ -541,62 +567,43 @@ NsCharToJavaVirtualKeyCode(unichar ch, BOOL isDeadChar,
}
}
if ((!useNationalLayouts || asciiCapable) && [[NSCharacterSet letterCharacterSet] characterIsMember:ch]) {
// Let's convert the received letter to a key code.
// If national layouts are enabled, then the letter must be (extended) latin.
// Otherwise, we will look up the key code from the key location further down below.
// key is an alphabetic character
offset = testLowercaseChar - 'a';
if (offset >= 0 && offset <= 25) {
// checking for A-Z characters
*postsTyped = YES;
// do quick conversion
*keyCode = java_awt_event_KeyEvent_VK_A + offset;
*keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_STANDARD;
} else {
// checking for non-english characters
// this value comes from ExtendedKeyCodes.java
offset += 0x01000000;
*postsTyped = YES;
// do quick conversion
// the keyCode is off by 32, so adding it here
*keyCode = java_awt_event_KeyEvent_VK_A + offset + 32;
*keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_STANDARD;
}
if (testLowercaseChar >= 'a' && testLowercaseChar <= 'z') {
// key is a basic latin letter
*postsTyped = YES;
*keyCode = java_awt_event_KeyEvent_VK_A + testLowercaseChar - 'a';
*keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_STANDARD;
return;
}
if ([[NSCharacterSet decimalDigitCharacterSet] characterIsMember:ch]) {
if (ch >= '0' && ch <= '9') {
// key is a digit
// numpad digits are already handled, since they don't vary between layouts
offset = ch - '0';
// make sure in range for decimal digits
if (offset >= 0 && offset <= 9) {
jboolean numpad = ((flags & NSNumericPadKeyMask) &&
(key > 81 && key < 93));
*postsTyped = YES;
if (numpad) {
*keyCode = offset + java_awt_event_KeyEvent_VK_NUMPAD0;
*keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_NUMPAD;
} else {
*keyCode = offset + java_awt_event_KeyEvent_VK_0;
*keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_STANDARD;
}
return;
}
*keyCode = offset + java_awt_event_KeyEvent_VK_0;
*keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_STANDARD;
return;
}
if (key < keyTableSize) {
*postsTyped = keyTable[key].postsTyped;
*keyCode = keyTable[key].javaKeyCode;
*keyLocation = keyTable[key].javaKeyLocation;
} else {
// Should we report this? This means we've got a keyboard
// we don't know about...
*postsTyped = NO;
*keyCode = java_awt_event_KeyEvent_VK_UNDEFINED;
*keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_UNKNOWN;
BOOL isLetter = [[NSCharacterSet letterCharacterSet] characterIsMember:ch];
BOOL needExtendedKeyCodeConversion = useNationalLayouts ? asciiCapable : isLetter;
if (needExtendedKeyCodeConversion) {
// If useNationalLayouts = false, then we only convert the key codes for letters here.
// This is the default behavior in OpenJDK and I don't think it's a good idea to change that.
// If useNationalLayouts = true but the keyboard is not ASCII-capable then this conversion
// doesn't happen, meaning that key codes remain in the US layout.
// Otherwise we also need to report characters other than letters.
// If we ended up in this branch, this means that the character doesn't have its own VK_ code.
// Apart from letters, this is the case for characters like the Section Sign (U+00A7) on the
// US ISO English keyboard or the Left-Pointing Double Angle Quotation Mark (U+00AB) found on the
// Canadian French - PC (ISO) keyboard. I couldn't find examples of ANSI keyboards that have non-letter
// characters that don't have a VK_ code.
*postsTyped = YES;
*keyCode = 0x01000000 + testLowercaseChar;
*keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_STANDARD;
}
}

View File

@@ -533,7 +533,7 @@ AWT_ASSERT_APPKIT_THREAD;
[self setUpCustomTitleBar];
}
self.currentDisplayID = nil;
self.currentDisplayID = [AWTWindow getNSWindowDisplayID_AppKitThread:nsWindow];;
return self;
}
@@ -838,8 +838,7 @@ AWT_ASSERT_APPKIT_THREAD;
}
if (self.currentDisplayID == nil) {
// Do not trigger notification at first appearance
// to avoid flickering on popups
// Do not trigger notification at first initialization
self.currentDisplayID = newDisplayID;
return;
}

View File

@@ -26,6 +26,7 @@
#import "JNIUtilities.h"
#import <ApplicationServices/ApplicationServices.h>
#import <Carbon/Carbon.h>
#import "CRobotKeyCode.h"
#import "LWCToolkit.h"
@@ -324,7 +325,26 @@ Java_sun_lwawt_macosx_CRobot_keyEvent
autoDelay(NO);
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){
CGEventSourceRef source = CGEventSourceCreate(kCGEventSourceStateHIDSystemState);
CGKeyCode keyCode = GetCGKeyCode(javaKeyCode);
CGKeyCode keyCode;
if (javaKeyCode == 0x1000000 + 0x0060) {
// This is a dirty, dirty hack and is only used in tests.
// When receiving this key code, Robot should switch the keyboard type to ISO
// and then send the key code corresponding to VK_BACK_QUOTE.
// find an ISO keyboard type...
// LMGetKbdType() returns Uint8, why don't we just iterate over all the possible values and find one
// that works? It's really sad that macOS doesn't provide a decent API for this sort of thing.
for (UInt32 keyboardType = 0; keyboardType < 0x100; ++keyboardType) {
if (KBGetLayoutType(keyboardType) == kKeyboardISO) {
CGEventSourceSetKeyboardType(source, keyboardType);
break;
}
}
keyCode = OSX_kVK_ANSI_Grave;
} else {
keyCode = GetCGKeyCode(javaKeyCode);
}
CGEventRef event = CGEventCreateKeyboardEvent(source, keyCode, keyPressed);
if (event != NULL) {
// this assumes Robot isn't used to generate Fn key presses

View File

@@ -160,6 +160,11 @@
[NSNumber numberWithInt : OSX_F19], [NSNumber numberWithInt : java_awt_event_KeyEvent_VK_F19],
[NSNumber numberWithInt : OSX_F20], [NSNumber numberWithInt : java_awt_event_KeyEvent_VK_F20],
// There's no VK_ key code for the section key (\u00a7), found on the Standard QWERTY (ABC) ISO layout.
// For consistency, let's use the code returned by getExtendedKeyCodeForChar for this symbol.
// Also see src/java.desktop/share/classes/sun/awt/ExtendedKeyCodes.java
[NSNumber numberWithInt : OSX_kVK_ISO_Section], [NSNumber numberWithInt : 0x1000000 + 0x00A7],
nil];
}

View File

@@ -266,17 +266,20 @@ class WFramePeer extends WWindowPeer implements FramePeer {
}
private static native void updateCustomTitleBar(WWindowPeer peer);
// Used from native
private static final boolean WIN11_OR_NEWER;
static {
if ("Windows 10".equals(System.getProperty("os.name"))) {
WIN11_OR_NEWER = false;
@SuppressWarnings("removal")
private static boolean isWin11OrNewer() {
String osName = AccessController.doPrivileged(new GetPropertyAction("os.name"));
String osVersion = AccessController.doPrivileged(new GetPropertyAction("os.version"));
if ("Windows 10".equals(osName)) {
return false;
} else {
int version = 10;
try {
version = (int) Double.parseDouble(System.getProperty("os.version"));
version = (int) Double.parseDouble(osVersion);
} catch (NullPointerException | NumberFormatException ignored) {}
WIN11_OR_NEWER = version >= 10;
return version >= 10;
}
}
// Used from native
private static final boolean WIN11_OR_NEWER = isWin11OrNewer();
}

View File

@@ -552,7 +552,6 @@ MsgRouting AwtFrame::WmMouseUp(UINT flags, int x, int y, int button) {
}
MsgRouting AwtFrame::WmMouseMove(UINT flags, int x, int y) {
if (customTitleBarControls) customTitleBarControls->Hit(CustomTitleBarControls::HitType::RESET, 0, 0);
/**
* If this Frame is non-focusable then we should implement move and size operation for it by
* ourselfves because we don't dispatch appropriate mouse messages to default window procedure.

View File

@@ -24,12 +24,14 @@
import com.jetbrains.JBR;
import util.CommonAPISuite;
import util.Task;
import util.TaskResult;
import util.TestUtils;
import java.awt.AWTException;
import java.awt.Button;
import java.awt.Robot;
import javax.swing.*;
import java.awt.*;
import java.awt.event.InputEvent;
import java.lang.invoke.MethodHandles;
import java.util.List;
/*
* @test
@@ -48,16 +50,26 @@ import java.awt.event.InputEvent;
public class ActionListenerTest {
public static void main(String... args) {
boolean status = CommonAPISuite.runTestSuite(TestUtils.getWindowCreationFunctions(), actionListener);
TaskResult awtResult = CommonAPISuite.runTestSuite(List.of(TestUtils::createFrameWithCustomTitleBar, TestUtils::createDialogWithCustomTitleBar), actionListenerAWT);
TaskResult swingResult = CommonAPISuite.runTestSuite(List.of(TestUtils::createJFrameWithCustomTitleBar, TestUtils::createJFrameWithCustomTitleBar), actionListenerSwing);
if (!status) {
throw new RuntimeException("ActionListenerTest FAILED");
TaskResult result = awtResult.merge(swingResult);
if (!result.isPassed()) {
final String message = String.format("%s FAILED. %s", MethodHandles.lookup().lookupClass().getName(), result.getError());
throw new RuntimeException(message);
}
}
private static final Task actionListener = new Task("Using of action listener") {
private static final Task actionListenerAWT = new Task("Using of action listener in AWT") {
private Button button;
private boolean actionListenerGotEvent = false;
@Override
protected void init() {
actionListenerGotEvent = false;
}
@Override
public void prepareTitleBar() {
@@ -68,38 +80,76 @@ public class ActionListenerTest {
@Override
public void customizeWindow() {
button = new Button();
button.setBounds(200, 20, 50, 50);
button.setLocation(window.getWidth() / 2, 0);
button.addActionListener(a -> {
System.out.println("Action listener got event");
actionListenerGotEvent = true;
});
window.add(button);
}
@Override
public void test() throws AWTException {
final int initialHeight = window.getHeight();
final int initialWidth = window.getWidth();
doClick(button.getLocationOnScreen(), button.getWidth(), button.getHeight());
System.out.println("Initial bounds: " + window.getBounds());
Robot robot = new Robot();
robot.delay(500);
int x = button.getLocationOnScreen().x + button.getWidth() / 2;
int y = button.getLocationOnScreen().y + button.getHeight() / 2;
System.out.println("Click at (" + x + ", " + y + ")");
robot.mouseMove(x, y);
robot.delay(300);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
robot.delay(2000);
if (window.getHeight() != initialHeight || window.getWidth() != initialWidth) {
passed = false;
System.out.println("Adding of action listener should block native title bar behavior");
if (!actionListenerGotEvent) {
err("button didn't get event by action listener");
}
}
};
private static final Task actionListenerSwing = new Task("Using of action listener in Swing") {
private JButton button;
private boolean actionListenerGotEvent = false;
@Override
protected void init() {
actionListenerGotEvent = false;
}
@Override
public void prepareTitleBar() {
titleBar = JBR.getWindowDecorations().createCustomTitleBar();
titleBar.setHeight(TestUtils.TITLE_BAR_HEIGHT);
}
@Override
public void customizeWindow() {
button = new JButton();
button.setLocation(window.getWidth() / 2, 0);
button.addActionListener(a -> {
actionListenerGotEvent = true;
});
window.add(button);
}
@Override
public void test() throws AWTException {
doClick(button.getLocationOnScreen(), button.getWidth(), button.getHeight());
if (!actionListenerGotEvent) {
err("button didn't get event by action listener");
}
}
};
private static void doClick(Point location, int w, int h) throws AWTException {
Robot robot = new Robot();
robot.waitForIdle();
int x = location.x + w / 2;
int y = location.y + h / 2;
System.out.println("Click at (" + x + ", " + y + ")");
robot.mouseMove(x, y);
robot.waitForIdle();
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
robot.waitForIdle();
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
robot.waitForIdle();
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
robot.waitForIdle();
}
}

View File

@@ -24,8 +24,11 @@
import com.jetbrains.JBR;
import util.CommonAPISuite;
import util.Task;
import util.TaskResult;
import util.TestUtils;
import java.lang.invoke.MethodHandles;
/*
* @test
* @summary Verify modifying of title bar height
@@ -43,11 +46,13 @@ import util.TestUtils;
public class ChangeTitleBarHeightTest {
public static void main(String... args) {
boolean status = CommonAPISuite.runTestSuite(TestUtils.getWindowCreationFunctions(), changeTitleBarHeight);
TaskResult result = CommonAPISuite.runTestSuite(TestUtils.getWindowCreationFunctions(), changeTitleBarHeight);
if (!status) {
throw new RuntimeException("ChangeTitleBarHeightTest FAILED");
if (!result.isPassed()) {
final String message = String.format("%s FAILED. %s", MethodHandles.lookup().lookupClass().getName(), result.getError());
throw new RuntimeException(message);
}
}
private static final Task changeTitleBarHeight = new Task("Changing of title bar height") {

View File

@@ -24,8 +24,11 @@
import com.jetbrains.JBR;
import util.CommonAPISuite;
import util.Task;
import util.TaskResult;
import util.TestUtils;
import java.lang.invoke.MethodHandles;
/*
* @test
* @summary Verify creating to a custom title bar
@@ -43,11 +46,13 @@ import util.TestUtils;
public class CreateTitleBarTest {
public static void main(String... args) {
boolean status = CommonAPISuite.runTestSuite(TestUtils.getWindowCreationFunctions(), createTitleBar);
TaskResult result = CommonAPISuite.runTestSuite(TestUtils.getWindowCreationFunctions(), createTitleBar);
if (!status) {
throw new RuntimeException("CreateTitleBarTest FAILED");
if (!result.isPassed()) {
final String message = String.format("%s FAILED. %s", MethodHandles.lookup().lookupClass().getName(), result.getError());
throw new RuntimeException(message);
}
}
private static final Task createTitleBar = new Task("Create title bar with default settings") {
@@ -64,8 +69,7 @@ public class CreateTitleBarTest {
passed = passed && TestUtils.checkFrameInsets(window);
if (titleBar.getLeftInset() == 0 && titleBar.getRightInset() == 0) {
passed = false;
System.out.println("Left or right space must be occupied by system controls");
err("Left or right space must be occupied by system controls");
}
}
};

View File

@@ -21,10 +21,7 @@
* questions.
*/
import com.jetbrains.JBR;
import util.Rect;
import util.ScreenShotHelpers;
import util.Task;
import util.TestUtils;
import util.*;
import java.awt.event.InputEvent;
import java.awt.event.WindowAdapter;
@@ -32,6 +29,7 @@ import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.awt.event.WindowStateListener;
import java.awt.image.BufferedImage;
import java.lang.invoke.MethodHandles;
import java.util.List;
/*
@@ -51,11 +49,13 @@ import java.util.List;
public class DialogNativeControlsTest {
public static void main(String... args) {
boolean status = nativeControlClicks.run(TestUtils::createDialogWithCustomTitleBar);
TaskResult result = nativeControlClicks.run(TestUtils::createDialogWithCustomTitleBar);
if (!status) {
throw new RuntimeException("DialogNativeControlsTest FAILED");
if (!result.isPassed()) {
final String message = String.format("%s FAILED. %s", MethodHandles.lookup().lookupClass().getName(), result.getError());
throw new RuntimeException(message);
}
}
private static final Task nativeControlClicks = new Task("Native controls clicks") {
@@ -105,13 +105,13 @@ public class DialogNativeControlsTest {
@Override
public void test() throws Exception {
robot.delay(500);
robot.waitForIdle();
robot.mouseMove(window.getLocationOnScreen().x + window.getWidth() / 2,
window.getLocationOnScreen().y + window.getHeight() / 2);
robot.delay(500);
robot.waitForIdle();
BufferedImage image = ScreenShotHelpers.takeScreenshot(window);
List<Rect> foundControls = ScreenShotHelpers.detectControlsByBackground(image, (int) titleBar.getHeight(), TestUtils.TITLE_BAR_COLOR);
List<Rect> foundControls = ScreenShotHelpers.findControls(image, window, titleBar);
if (foundControls.size() == 0) {
passed = false;
@@ -129,24 +129,22 @@ public class DialogNativeControlsTest {
int h = window.getBounds().height;
int w = window.getBounds().width;
robot.delay(500);
robot.waitForIdle();
robot.mouseMove(x, y);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
robot.delay(1500);
robot.waitForIdle();
window.setBounds(screenX, screenY, w, h);
window.setVisible(true);
robot.delay(1500);
robot.waitForIdle();
});
if (System.getProperty("os.name").toLowerCase().startsWith("mac") && !maximizingActionDetected) {
passed = false;
System.out.println("Error: maximizing action was not detected");
err("maximizing action was not detected");
}
if (!closingActionCalled) {
passed = false;
System.out.println("Error: closing action was not detected");
err("closing action was not detected");
}
}

View File

@@ -22,11 +22,7 @@
*/
import com.jetbrains.JBR;
import com.jetbrains.WindowDecorations;
import util.CommonAPISuite;
import util.Rect;
import util.ScreenShotHelpers;
import util.Task;
import util.TestUtils;
import util.*;
import javax.swing.JFrame;
import java.awt.Frame;
@@ -37,6 +33,7 @@ import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.awt.event.WindowStateListener;
import java.awt.image.BufferedImage;
import java.lang.invoke.MethodHandles;
import java.util.List;
import java.util.function.Function;
@@ -61,11 +58,13 @@ public class FrameNativeControlsMacOSTest {
public static void main(String... args) {
List<Function<WindowDecorations.CustomTitleBar, Window>> functions =
List.of(TestUtils::createFrameWithCustomTitleBar, TestUtils::createJFrameWithCustomTitleBar);
boolean status = CommonAPISuite.runTestSuite(functions, frameNativeControlsClicks);
TaskResult result = CommonAPISuite.runTestSuite(functions, frameNativeControlsClicks);
if (!status) {
throw new RuntimeException("FrameNativeControlsMacOSTest FAILED");
if (!result.isPassed()) {
final String message = String.format("%s FAILED. %s", MethodHandles.lookup().lookupClass().getName(), result.getError());
throw new RuntimeException(message);
}
}
private static final Task frameNativeControlsClicks = new Task("Frame native controls clicks") {
@@ -164,7 +163,7 @@ public class FrameNativeControlsMacOSTest {
robot.delay(500);
BufferedImage image = ScreenShotHelpers.takeScreenshot(window);
List<Rect> foundControls = ScreenShotHelpers.detectControlsByBackground(image, (int) titleBar.getHeight(), TestUtils.TITLE_BAR_COLOR);
List<Rect> foundControls = ScreenShotHelpers.findControls(image, window, titleBar);
if (foundControls.size() == 0) {
passed = false;
@@ -193,22 +192,18 @@ public class FrameNativeControlsMacOSTest {
});
if (!maximizingActionDetected) {
passed = false;
System.out.println("Error: maximizing action was not detected");
err("maximizing action was not detected");
}
if (!closingActionCalled) {
passed = false;
System.out.println("Error: closing action was not detected");
err("closing action was not detected");
}
if (!iconifyingActionCalled) {
passed = false;
System.out.println("Error: iconifying action was not detected");
err("iconifying action was not detected");
}
if (!deiconifyindActionDetected) {
passed = false;
System.out.println("Error: deiconifying action was not detected");
err("deiconifying action was not detected");
}
}
};

View File

@@ -21,18 +21,21 @@
* questions.
*/
import com.jetbrains.JBR;
import util.Rect;
import util.ScreenShotHelpers;
import util.Task;
import util.TestUtils;
import com.jetbrains.WindowDecorations;
import util.*;
import javax.swing.JFrame;
import java.awt.Frame;
import java.awt.Window;
import java.awt.event.InputEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.awt.event.WindowStateListener;
import java.awt.image.BufferedImage;
import java.lang.invoke.MethodHandles;
import java.util.List;
import java.util.function.Function;
/*
* @test
@@ -51,10 +54,13 @@ import java.util.List;
public class FrameNativeControlsTest {
public static void main(String... args) {
boolean status = frameNativeControlsClicks.run(TestUtils::createFrameWithCustomTitleBar);
List<Function<WindowDecorations.CustomTitleBar, Window>> functions =
List.of(TestUtils::createFrameWithCustomTitleBar, TestUtils::createJFrameWithCustomTitleBar);
TaskResult result = CommonAPISuite.runTestSuite(functions, frameNativeControlsClicks);
if (!status) {
throw new RuntimeException("FrameNativeControlsTest FAILED");
if (!result.isPassed()) {
final String message = String.format("%s FAILED. %s", MethodHandles.lookup().lookupClass().getName(), result.getError());
throw new RuntimeException(message);
}
}
@@ -73,7 +79,15 @@ public class FrameNativeControlsTest {
@Override
public void windowIconified(WindowEvent e) {
iconifyingActionCalled = true;
if (window.getName().equals("Frame")) {
((Frame) window).setState(Frame.NORMAL);
} else if (window.getName().equals("JFrame")) {
((JFrame) window).setState(JFrame.NORMAL);
}
window.setVisible(true);
window.requestFocus();
}
};
@@ -124,7 +138,7 @@ public class FrameNativeControlsTest {
robot.delay(500);
BufferedImage image = ScreenShotHelpers.takeScreenshot(window);
List<Rect> foundControls = ScreenShotHelpers.detectControlsByBackground(image, (int) titleBar.getHeight(), TestUtils.TITLE_BAR_COLOR);
List<Rect> foundControls = ScreenShotHelpers.findControls(image, window, titleBar);
if (foundControls.size() == 0) {
passed = false;
@@ -142,33 +156,29 @@ public class FrameNativeControlsTest {
int h = window.getBounds().height;
int w = window.getBounds().width;
robot.delay(500);
robot.waitForIdle();
robot.mouseMove(x, y);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
robot.delay(1500);
robot.waitForIdle();
window.setBounds(screenX, screenY, w, h);
window.setVisible(true);
robot.delay(1500);
robot.waitForIdle();
});
if (!maximizingActionDetected) {
passed = false;
System.out.println("Error: maximizing action was not detected");
err("maximizing action was not detected");
}
if (!closingActionCalled) {
passed = false;
System.out.println("Error: closing action was not detected");
err("closing action was not detected");
}
if (!iconifyingActionCalled) {
passed = false;
System.out.println("Error: iconifying action was not detected");
err("iconifying action was not detected");
}
if (!deiconifyindActionDetected) {
passed = false;
System.out.println("Error: deiconifying action was not detected");
err("deiconifying action was not detected");
}
}
};

View File

@@ -21,14 +21,11 @@
* questions.
*/
import com.jetbrains.JBR;
import util.CommonAPISuite;
import util.Rect;
import util.ScreenShotHelpers;
import util.Task;
import util.TestUtils;
import util.*;
import java.awt.Robot;
import java.awt.image.BufferedImage;
import java.lang.invoke.MethodHandles;
import java.util.List;
/*
@@ -48,10 +45,11 @@ import java.util.List;
public class HiddenNativeControlsTest {
public static void main(String... args) {
boolean status = CommonAPISuite.runTestSuite(TestUtils.getWindowCreationFunctions(), hiddenControls);
TaskResult result = CommonAPISuite.runTestSuite(TestUtils.getWindowCreationFunctions(), hiddenControls);
if (!status) {
throw new RuntimeException("HiddenNativeControlsTest FAILED");
if (!result.isPassed()) {
final String message = String.format("%s FAILED. %s", MethodHandles.lookup().lookupClass().getName(), result.getError());
throw new RuntimeException(message);
}
}
@@ -77,25 +75,22 @@ public class HiddenNativeControlsTest {
passed = passed && TestUtils.checkFrameInsets(window);
if (!"false".equals(titleBar.getProperties().get(PROPERTY_NAME).toString())) {
passed = false;
System.out.println("controls.visible isn't false");
err("controls.visible isn't false");
}
if (titleBar.getLeftInset() != 0 || titleBar.getRightInset() != 0) {
passed = false;
System.out.println("System controls are hidden so insets must be zero");
err("System controls are hidden so insets must be zero");
}
BufferedImage image = ScreenShotHelpers.takeScreenshot(window);
System.out.println("image w = " + image.getWidth() + " h = " + image.getHeight());
List<Rect> foundControls = ScreenShotHelpers.detectControlsByBackground(image, (int) titleBar.getHeight(), TestUtils.TITLE_BAR_COLOR);
List<Rect> foundControls = ScreenShotHelpers.findControls(image, window, titleBar, true);
System.out.println("Found controls at the title bar:");
foundControls.forEach(System.out::println);
if (foundControls.size() != 0) {
passed = false;
System.out.println("Error: there are must be 0 controls");
err("controls are disabled, but found in the screenshot");
}
if (!passed) {

View File

@@ -24,8 +24,12 @@
import com.jetbrains.JBR;
import util.CommonAPISuite;
import util.Task;
import util.TaskResult;
import util.TestUtils;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.AWTException;
import java.awt.Color;
import java.awt.Graphics;
@@ -36,6 +40,8 @@ import java.awt.Robot;
import java.awt.event.InputEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.lang.invoke.MethodHandles;
import java.util.Arrays;
import java.util.List;
/*
@@ -55,14 +61,17 @@ import java.util.List;
public class HitTestClientArea {
public static void main(String... args) {
boolean status = CommonAPISuite.runTestSuite(TestUtils.getWindowCreationFunctions(), hitTestClientArea);
TaskResult awtResult = CommonAPISuite.runTestSuite(List.of(TestUtils::createFrameWithCustomTitleBar, TestUtils::createDialogWithCustomTitleBar), hitTestClientAreaAWT);
TaskResult swingResult = CommonAPISuite.runTestSuite(List.of(TestUtils::createJFrameWithCustomTitleBar, TestUtils::createJFrameWithCustomTitleBar), hitTestClientAreaSwing);
if (!status) {
throw new RuntimeException("HitTestClientArea FAILED");
TaskResult result = awtResult.merge(swingResult);
if (!result.isPassed()) {
final String message = String.format("%s FAILED. %s", MethodHandles.lookup().lookupClass().getName(), result.getError());
throw new RuntimeException(message);
}
}
private static final Task hitTestClientArea = new Task("Hit test client area") {
private static final Task hitTestClientAreaAWT = new Task("Hit test client area AWT") {
private static final List<Integer> BUTTON_MASKS = List.of(
InputEvent.BUTTON1_DOWN_MASK,
@@ -72,13 +81,17 @@ public class HitTestClientArea {
private static final int PANEL_WIDTH = 400;
private static final int PANEL_HEIGHT = (int) TestUtils.TITLE_BAR_HEIGHT;
private final boolean[] gotClicks = new boolean[BUTTON_MASKS.size()];
private final int[] gotClicks = new int[BUTTON_MASKS.size()];
private static boolean mousePressed = false;
private static boolean mouseReleased = false;
private Panel panel;
@Override
protected void cleanup() {
super.cleanup();
Arrays.fill(gotClicks, 0);
mousePressed = false;
mouseReleased = false;
}
@Override
@@ -109,33 +122,20 @@ public class HitTestClientArea {
public void mouseClicked(MouseEvent e) {
hit();
if (e.getButton() >= 1 && e.getButton() <= 3) {
gotClicks[e.getButton() - 1] = true;
gotClicks[e.getButton() - 1]++;
}
}
@Override
public void mousePressed(MouseEvent e) {
hit();
mousePressed = true;
}
@Override
public void mouseReleased(MouseEvent e) {
hit();
}
@Override
public void mouseEntered(MouseEvent e) {
hit();
}
@Override
public void mouseDragged(MouseEvent e) {
hit();
}
@Override
public void mouseMoved(MouseEvent e) {
hit();
mouseReleased = true;
}
});
@@ -146,41 +146,182 @@ public class HitTestClientArea {
public void test() throws AWTException {
Robot robot = new Robot();
BUTTON_MASKS.forEach(mask -> {
robot.delay(500);
int initialX = window.getLocationOnScreen().x + PANEL_WIDTH / 2;
int initialY = window.getLocationOnScreen().y + PANEL_HEIGHT / 2;
robot.mouseMove(panel.getLocationOnScreen().x + panel.getWidth() / 2,
panel.getLocationOnScreen().y + panel.getHeight() / 2);
window.requestFocus();
for (Integer mask: BUTTON_MASKS) {
robot.waitForIdle();
robot.mouseMove(initialX, initialY);
robot.mousePress(mask);
robot.mouseRelease(mask);
robot.delay(500);
});
robot.waitForIdle();
}
Point initialLocation = window.getLocationOnScreen();
robot.delay(500);
int initialX = panel.getLocationOnScreen().x + panel.getWidth() / 2;
int initialY = panel.getLocationOnScreen().y + panel.getHeight() / 2;
robot.waitForIdle();
robot.mouseMove(initialX, initialY);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
for (int i = 0; i < 10; i++) {
initialX += 3;
initialY += 3;
robot.delay(500);
robot.delay(300);
robot.mouseMove(initialX, initialY);
}
robot.delay(500);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
robot.waitForIdle();
Point newLocation = window.getLocationOnScreen();
boolean moved = initialLocation.x < newLocation.x && initialLocation.y < newLocation.y;
for (int i = 0; i < BUTTON_MASKS.size(); i++) {
if (!gotClicks[i]) {
System.out.println("Mouse click to button no " + (i+1) + " was not registered");
passed = false;
System.out.println("Button no " + (i+1) + " clicks count = " + gotClicks[i]);
if (gotClicks[i] == 0) {
err("Mouse click to button no " + (i+1) + " was not registered");
}
}
passed = passed && !moved;
boolean moved = initialLocation.x < newLocation.x && initialLocation.y < newLocation.y;
if (moved) {
err("Window was moved, but drag'n drop action must be disabled in the client area");
}
if (!mousePressed) {
err("Mouse press to the client area wasn't detected");
}
if (!mouseReleased) {
err("Mouse release to the client area wasn't detected");
}
}
};
private static final Task hitTestClientAreaSwing = new Task("Hit test client area Swing") {
private static final List<Integer> BUTTON_MASKS = List.of(
InputEvent.BUTTON1_DOWN_MASK,
InputEvent.BUTTON2_DOWN_MASK,
InputEvent.BUTTON3_DOWN_MASK
);
private static final int PANEL_WIDTH = 400;
private static final int PANEL_HEIGHT = (int) TestUtils.TITLE_BAR_HEIGHT;
private final int[] gotClicks = new int[BUTTON_MASKS.size()];
private static boolean mousePressed = false;
private static boolean mouseReleased = false;
private JPanel panel;
@Override
protected void cleanup() {
Arrays.fill(gotClicks, 0);
mousePressed = false;
mouseReleased = false;
titleBar = null;
}
@Override
public void prepareTitleBar() {
titleBar = JBR.getWindowDecorations().createCustomTitleBar();
titleBar.setHeight(TestUtils.TITLE_BAR_HEIGHT);
}
@Override
protected void customizeWindow() {
panel = new JPanel() {
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Rectangle r = g.getClipBounds();
g.setColor(Color.CYAN);
g.fillRect(r.x, r.y, PANEL_WIDTH, PANEL_HEIGHT);
}
};
if (window.getName().equals("JFrame")) {
((JFrame) window).setContentPane(panel);
} else if (window.getName().equals("JDialog")) {
((JDialog) window).setContentPane(panel);
}
panel.setBounds(0, 0, PANEL_WIDTH, PANEL_HEIGHT);
panel.setSize(PANEL_WIDTH, PANEL_HEIGHT);
panel.addMouseListener(new MouseAdapter() {
private void hit() {
titleBar.forceHitTest(true);
}
@Override
public void mouseClicked(MouseEvent e) {
hit();
if (e.getButton() >= 1 && e.getButton() <= 3) {
gotClicks[e.getButton() - 1]++;
}
}
@Override
public void mousePressed(MouseEvent e) {
hit();
mousePressed = true;
}
@Override
public void mouseReleased(MouseEvent e) {
hit();
mouseReleased = true;
}
});
}
@Override
public void test() throws AWTException {
Robot robot = new Robot();
int initialX = window.getLocationOnScreen().x + PANEL_WIDTH / 2;
int initialY = window.getLocationOnScreen().y + PANEL_HEIGHT / 2;
for (Integer mask: BUTTON_MASKS) {
robot.waitForIdle();
robot.mouseMove(initialX, initialY);
robot.mousePress(mask);
robot.mouseRelease(mask);
robot.waitForIdle();
}
Point initialLocation = window.getLocationOnScreen();
robot.waitForIdle();
robot.mouseMove(initialX, initialY);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
for (int i = 0; i < 10; i++) {
initialX += 3;
initialY += 3;
robot.delay(300);
robot.mouseMove(initialX, initialY);
}
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
robot.waitForIdle();
Point newLocation = window.getLocationOnScreen();
for (int i = 0; i < BUTTON_MASKS.size(); i++) {
System.out.println("Button no " + (i+1) + " clicks count = " + gotClicks[i]);
if (gotClicks[i] == 0) {
err("Mouse click to button no " + (i+1) + " was not registered");
}
}
boolean moved = initialLocation.x < newLocation.x && initialLocation.y < newLocation.y;
if (moved) {
err("Window was moved, but drag'n drop action must be disabled in the client area");
}
if (!mousePressed) {
err("Mouse press to the client area wasn't detected");
}
if (!mouseReleased) {
err("Mouse release to the client area wasn't detected");
}
}
};

View File

@@ -24,6 +24,7 @@
import com.jetbrains.JBR;
import util.CommonAPISuite;
import util.Task;
import util.TaskResult;
import util.TestUtils;
import java.awt.AWTException;
@@ -35,6 +36,7 @@ import java.awt.Robot;
import java.awt.event.InputEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.lang.invoke.MethodHandles;
import java.util.Arrays;
import java.util.List;
@@ -55,10 +57,11 @@ import java.util.List;
public class HitTestNonClientArea {
public static void main(String... args) {
boolean status = CommonAPISuite.runTestSuite(TestUtils.getWindowCreationFunctions(), hitTestNonClientArea);
TaskResult result = CommonAPISuite.runTestSuite(TestUtils.getWindowCreationFunctions(), hitTestNonClientArea);
if (!status) {
throw new RuntimeException("HitTestNonClientArea FAILED");
if (!result.isPassed()) {
final String message = String.format("%s FAILED. %s", MethodHandles.lookup().lookupClass().getName(), result.getError());
throw new RuntimeException(message);
}
}
@@ -79,6 +82,7 @@ public class HitTestNonClientArea {
@Override
protected void cleanup() {
Arrays.fill(gotClicks, false);
titleBar = null;
}
@Override
@@ -114,21 +118,6 @@ public class HitTestNonClientArea {
public void mouseReleased(MouseEvent e) {
hit();
}
@Override
public void mouseEntered(MouseEvent e) {
hit();
}
@Override
public void mouseDragged(MouseEvent e) {
hit();
}
@Override
public void mouseMoved(MouseEvent e) {
hit();
}
};
button.addMouseListener(adapter);
button.addMouseMotionListener(adapter);
@@ -143,31 +132,31 @@ public class HitTestNonClientArea {
public void test() throws AWTException {
Robot robot = new Robot();
BUTTON_MASKS.forEach(mask -> {
robot.delay(500);
int initialX = button.getLocationOnScreen().x + button.getWidth() / 2;
int initialY = button.getLocationOnScreen().y + button.getHeight() / 2;
robot.mouseMove(button.getLocationOnScreen().x + button.getWidth() / 2,
button.getLocationOnScreen().y + button.getHeight() / 2);
for (Integer mask: BUTTON_MASKS) {
robot.waitForIdle();
robot.mouseMove(initialX, initialY);
robot.mousePress(mask);
robot.mouseRelease(mask);
robot.delay(500);
});
robot.waitForIdle();
}
Point initialLocation = window.getLocationOnScreen();
robot.delay(500);
int initialX = button.getLocationOnScreen().x + button.getWidth() / 2;
int initialY = button.getLocationOnScreen().y + button.getHeight() / 2;
robot.waitForIdle();
robot.mouseMove(initialX, initialY);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
for (int i = 0; i < 10; i++) {
initialX += 3;
initialY += 3;
robot.delay(500);
robot.delay(300);
robot.mouseMove(initialX, initialY);
}
robot.delay(500);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.waitForIdle();
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
Point newLocation = window.getLocationOnScreen();
passed = initialLocation.x < newLocation.x && initialLocation.y < newLocation.y;
@@ -176,8 +165,7 @@ public class HitTestNonClientArea {
}
for (int i = 0; i < BUTTON_MASKS.size(); i++) {
if (!gotClicks[i]) {
System.out.println("Mouse click to button no " + (i+1) + " was not registered");
passed = false;
err("Mouse click to button no " + (i+1) + " was not registered");
}
}
}

View File

@@ -21,10 +21,7 @@
* questions.
*/
import com.jetbrains.JBR;
import util.Rect;
import util.ScreenShotHelpers;
import util.Task;
import util.TestUtils;
import util.*;
import java.awt.Robot;
import java.awt.event.InputEvent;
@@ -33,6 +30,7 @@ import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.awt.event.WindowStateListener;
import java.awt.image.BufferedImage;
import java.lang.invoke.MethodHandles;
import java.util.List;
/*
@@ -52,10 +50,11 @@ import java.util.List;
public class JDialogNativeControlsTest {
public static void main(String... args) {
boolean status = nativeControlClicks.run(TestUtils::createJDialogWithCustomTitleBar);
TaskResult result = nativeControlClicks.run(TestUtils::createJDialogWithCustomTitleBar);
if (!status) {
throw new RuntimeException("JDialogNativeControlsTest FAILED");
if (!result.isPassed()) {
final String message = String.format("%s FAILED. %s", MethodHandles.lookup().lookupClass().getName(), result.getError());
throw new RuntimeException(message);
}
}
@@ -112,7 +111,7 @@ public class JDialogNativeControlsTest {
robot.delay(500);
BufferedImage image = ScreenShotHelpers.takeScreenshot(window);
List<Rect> foundControls = ScreenShotHelpers.detectControlsByBackground(image, (int) titleBar.getHeight(), TestUtils.TITLE_BAR_COLOR);
List<Rect> foundControls = ScreenShotHelpers.findControls(image, window, titleBar);
if (foundControls.size() == 0) {
passed = false;
@@ -130,24 +129,25 @@ public class JDialogNativeControlsTest {
int h = window.getBounds().height;
int w = window.getBounds().width;
robot.delay(500);
robot.waitForIdle();
robot.mouseMove(x, y);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
robot.delay(1500);
robot.waitForIdle();
window.setBounds(screenX, screenY, w, h);
window.setVisible(true);
robot.delay(1500);
robot.waitForIdle();
});
if (!maximizingActionDetected) {
passed = false;
System.out.println("Error: maximizing action was not detected");
final String os = System.getProperty("os.name").toLowerCase();
if (os.startsWith("mac os")) {
if (!maximizingActionDetected) {
err("maximizing action was not detected");
}
}
if (!closingActionCalled) {
passed = false;
System.out.println("Error: closing action was not detected");
err("closing action was not detected");
}
}

View File

@@ -25,6 +25,7 @@ import com.jetbrains.JBR;
import com.jetbrains.WindowDecorations;
import util.CommonAPISuite;
import util.Task;
import util.TaskResult;
import util.TestUtils;
import java.awt.AWTException;
@@ -35,6 +36,10 @@ import java.awt.Robot;
import java.awt.Toolkit;
import java.awt.Window;
import java.awt.event.InputEvent;
import java.lang.invoke.MethodHandles;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Function;
/*
* @test
@@ -53,14 +58,23 @@ import java.awt.event.InputEvent;
public class MaximizeWindowTest {
public static void main(String... args) {
boolean status = CommonAPISuite.runTestSuite(TestUtils.getWindowCreationFunctions(), maximizeWindow);
final String os = System.getProperty("os.name").toLowerCase();
List<Function<WindowDecorations.CustomTitleBar, Window>> functions;
if (os.startsWith("windows")) {
functions = List.of(TestUtils::createFrameWithCustomTitleBar, TestUtils::createJFrameWithCustomTitleBar);
} else {
functions = TestUtils.getWindowCreationFunctions();
}
if (!status) {
throw new RuntimeException("MaximizeWindowTest FAILED");
TaskResult result = CommonAPISuite.runTestSuite(functions, maximizeWindow);
if (!result.isPassed()) {
final String message = String.format("%s FAILED. %s", MethodHandles.lookup().lookupClass().getName(), result.getError());
throw new RuntimeException(message);
}
}
private static final Task maximizeWindow = new Task("Maximize frame") {
private static final Task maximizeWindow = new Task("Maximize window") {
@Override
public void prepareTitleBar() {
@@ -79,8 +93,7 @@ public class MaximizeWindowTest {
System.out.printf(String.format("Initial size (w = %d, h = %d)%n", window.getWidth(), window.getHeight()));
System.out.printf(String.format("New size (w = %d, h = %d)%n", window.getWidth(), window.getHeight()));
if (initialHeight == window.getHeight() && initialWidth == window.getWidth()) {
passed = false;
System.out.println("Frame size wasn't changed");
err("Frame size wasn't changed after double click to title bar");
}
setResizable(false);
@@ -91,8 +104,7 @@ public class MaximizeWindowTest {
System.out.printf(String.format("Initial size (w = %d, h = %d)%n", window.getWidth(), window.getHeight()));
System.out.printf(String.format("New size (w = %d, h = %d)%n", window.getWidth(), window.getHeight()));
if (initialHeight != window.getHeight() || initialWidth != window.getWidth()) {
passed = false;
System.out.println("Frame size was changed");
err("Frame size was changed after double click to title bar, but resize is disabled");
}
}
@@ -110,7 +122,7 @@ public class MaximizeWindowTest {
System.out.println("Window was created with bounds: " + window.getBounds());
int w = window.getBounds().width / 2;
int h = window.getBounds().height / 2;
int h = Math.max(window.getBounds().height / 2, 20 + (int) titleBar.getHeight());
window.setBounds(window.getBounds().x, window.getBounds().y, w, h);
System.out.println("New window bounds: " + window.getBounds());
@@ -143,4 +155,4 @@ public class MaximizeWindowTest {
robot.delay(1000);
}
}
}

View File

@@ -22,17 +22,16 @@
*/
import com.jetbrains.JBR;
import util.Rect;
import util.ScreenShotHelpers;
import util.Task;
import util.TestUtils;
import util.*;
import java.awt.Frame;
import java.awt.event.InputEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.awt.event.WindowStateListener;
import java.awt.image.BufferedImage;
import java.lang.invoke.MethodHandles;
import java.util.List;
/*
@@ -52,10 +51,11 @@ import java.util.List;
public class MinimizingWindowTest {
public static void main(String... args) {
boolean status = minimizingWindowTest.run(TestUtils::createFrameWithCustomTitleBar);
TaskResult result = minimizingWindowTest.run(TestUtils::createFrameWithCustomTitleBar);
if (!status) {
throw new RuntimeException("MinimizingWindowTest FAILED");
if (!result.isPassed()) {
final String message = String.format("%s FAILED. %s", MethodHandles.lookup().lookupClass().getName(), result.getError());
throw new RuntimeException(message);
}
}
@@ -68,7 +68,6 @@ public class MinimizingWindowTest {
@Override
public void windowIconified(WindowEvent e) {
iconifyingActionCalled = true;
window.setVisible(true);
}
};
@@ -78,6 +77,8 @@ public class MinimizingWindowTest {
System.out.println("change " + e.getOldState() + " -> " + e.getNewState());
if (e.getOldState() == 0 && e.getNewState() == 1) {
iconifyingActionDetected = true;
((Frame) window).setState(Frame.NORMAL);
window.setVisible(true);
}
}
};
@@ -108,17 +109,16 @@ public class MinimizingWindowTest {
@Override
public void test() throws Exception {
robot.delay(500);
robot.waitForIdle();
robot.mouseMove(window.getLocationOnScreen().x + window.getWidth() / 2,
window.getLocationOnScreen().y + window.getHeight() / 2);
robot.delay(500);
robot.waitForIdle();
BufferedImage image = ScreenShotHelpers.takeScreenshot(window);
List<Rect> foundControls = ScreenShotHelpers.detectControlsByBackground(image, (int) titleBar.getHeight(), TestUtils.TITLE_BAR_COLOR);
List<Rect> foundControls = ScreenShotHelpers.findControls(image, window, titleBar);
if (foundControls.size() == 0) {
passed = false;
System.out.println("Error: no controls found");
err("no controls found");
}
foundControls.forEach(control -> {
@@ -132,19 +132,18 @@ public class MinimizingWindowTest {
int h = window.getBounds().height;
int w = window.getBounds().width;
robot.delay(500);
robot.waitForIdle();
robot.mouseMove(x, y);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
robot.delay(1500);
robot.waitForIdle();
window.setBounds(screenX, screenY, w, h);
window.setVisible(true);
robot.delay(1500);
robot.waitForIdle();
});
if (!iconifyingActionCalled || !iconifyingActionDetected) {
passed = false;
System.out.println("Error: iconifying action was not detected");
err("iconifying action was not detected");
}
if (!passed) {

View File

@@ -23,6 +23,7 @@
import com.jetbrains.JBR;
import util.CommonAPISuite;
import util.Task;
import util.TaskResult;
import util.TestUtils;
import java.awt.AWTException;
@@ -34,6 +35,7 @@ import java.awt.Robot;
import java.awt.event.InputEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.lang.invoke.MethodHandles;
import java.util.Arrays;
import java.util.List;
@@ -54,10 +56,11 @@ import java.util.List;
public class MouseEventsOnClientArea {
public static void main(String... args) {
boolean status = CommonAPISuite.runTestSuite(TestUtils.getWindowCreationFunctions(), mouseClicks);
TaskResult result = CommonAPISuite.runTestSuite(TestUtils.getWindowCreationFunctions(), mouseClicks);
if (!status) {
throw new RuntimeException("MouseEventsOnClientArea FAILED");
if (!result.isPassed()) {
final String message = String.format("%s FAILED. %s", MethodHandles.lookup().lookupClass().getName(), result.getError());
throw new RuntimeException(message);
}
}
@@ -74,8 +77,6 @@ public class MouseEventsOnClientArea {
private final boolean[] buttonsPressed = new boolean[BUTTON_MASKS.size()];
private final boolean[] buttonsReleased = new boolean[BUTTON_MASKS.size()];
private final boolean[] buttonsClicked = new boolean[BUTTON_MASKS.size()];
private boolean mouseEntered;
private boolean mouseExited;
private Panel panel;
@@ -84,8 +85,6 @@ public class MouseEventsOnClientArea {
Arrays.fill(buttonsPressed, false);
Arrays.fill(buttonsReleased, false);
Arrays.fill(buttonsClicked, false);
mouseEntered = false;
mouseExited = false;
}
@Override
@@ -129,16 +128,6 @@ public class MouseEventsOnClientArea {
buttonsReleased[e.getButton() - 1] = true;
}
}
@Override
public void mouseEntered(MouseEvent e) {
mouseEntered = true;
}
@Override
public void mouseExited(MouseEvent e) {
mouseExited = true;
}
});
window.add(panel);
}
@@ -147,40 +136,29 @@ public class MouseEventsOnClientArea {
public void test() throws AWTException {
Robot robot = new Robot();
int x = panel.getLocationOnScreen().x + panel.getWidth() / 2;
int y = panel.getLocationOnScreen().y + panel.getHeight() / 2;
BUTTON_MASKS.forEach(mask -> {
robot.delay(500);
robot.mouseMove(panel.getLocationOnScreen().x + panel.getWidth() / 2,
panel.getLocationOnScreen().y + panel.getHeight() / 2);
robot.mouseMove(x, y);
robot.mousePress(mask);
robot.mouseRelease(mask);
robot.delay(500);
});
robot.delay(500);
robot.mouseMove(panel.getLocationOnScreen().x + panel.getWidth() / 2,
panel.getLocationOnScreen().y + panel.getHeight() / 2);
robot.delay(500);
robot.mouseMove(panel.getLocationOnScreen().x + panel.getWidth() + 10,
panel.getLocationOnScreen().y + panel.getWidth() + 10);
robot.delay(500);
boolean status = true;
for (int i = 0; i < BUTTON_MASKS.size(); i++) {
System.out.println("Button mask: " + BUTTON_MASKS.get(i));
System.out.println("pressed = " + buttonsPressed[i]);
System.out.println("released = " + buttonsReleased[i]);
System.out.println("clicked = " + buttonsClicked[i]);
passed = buttonsPressed[i] && buttonsReleased[i] && buttonsClicked[i];
status = status && buttonsPressed[i] && buttonsReleased[i] && buttonsClicked[i];
}
if (!mouseEntered) {
System.out.println("Error: mouse enter wasn't detected");
passed = false;
}
if (!mouseExited) {
System.out.println("Error: mouse exit wasn't detected");
passed = false;
if (!status) {
err("some of mouse events weren't registered");
}
}
};

View File

@@ -22,14 +22,11 @@
*/
import com.jetbrains.JBR;
import util.CommonAPISuite;
import util.Rect;
import util.Task;
import util.ScreenShotHelpers;
import util.TestUtils;
import util.*;
import java.awt.Robot;
import java.awt.image.BufferedImage;
import java.lang.invoke.MethodHandles;
import java.util.List;
/*
@@ -49,15 +46,15 @@ import java.util.List;
public class NativeControlsVisibilityTest {
public static void main(String... args) {
boolean status = CommonAPISuite.runTestSuite(TestUtils.getWindowCreationFunctions(), visibleControls);
TaskResult result = CommonAPISuite.runTestSuite(TestUtils.getWindowCreationFunctions(), visibleControls);
if (!status) {
throw new RuntimeException("NativeControlsVisibilityTest FAILED");
if (!result.isPassed()) {
final String message = String.format("%s FAILED. %s", MethodHandles.lookup().lookupClass().getName(), result.getError());
throw new RuntimeException(message);
}
}
private static final Task visibleControls = new Task("Visible native controls") {
private static final String PROPERTY_NAME = "controls.visible";
@Override
public void prepareTitleBar() {
titleBar = JBR.getWindowDecorations().createCustomTitleBar();
@@ -82,22 +79,50 @@ public class NativeControlsVisibilityTest {
BufferedImage image = ScreenShotHelpers.takeScreenshot(window);
// List<Rect> foundControls = ScreenShotHelpers.detectControls(image, (int) titleBar.getHeight(),
// (int) titleBar.getLeftInset(), (int) titleBar.getRightInset());
List<Rect> foundControls = ScreenShotHelpers.detectControlsByBackground(image, (int) titleBar.getHeight(), TestUtils.TITLE_BAR_COLOR);
List<Rect> foundControls = ScreenShotHelpers.findControls(image, window, titleBar, false);
System.out.println("Found controls at the title bar:");
foundControls.forEach(System.out::println);
if (foundControls.size() != 3) {
passed = false;
System.out.println("Error: there are must be 3 controls");
}
passed = verifyControls(foundControls, window.getName());
if (!passed) {
String path = ScreenShotHelpers.storeScreenshot("visible-controls-test-" + window.getName(), image);
System.out.println("Screenshot stored in " + path);
}
}
private static boolean verifyControls(List<Rect> foundControls, String windowName) {
final String os = System.getProperty("os.name").toLowerCase();
if (os.startsWith("windows")) {
return verifyControlsOnWindows(foundControls, windowName);
} else if (os.startsWith("mac os")) {
return verifyControlsOnMac(foundControls);
}
return true;
}
private static boolean verifyControlsOnWindows(List<Rect> foundControls, String windowName) {
if (windowName.equals("Frame") || windowName.equals("JFrame")) {
if (foundControls.size() != 3) {
System.out.println("Error: there are must be 3 controls");
return false;
}
} else if (windowName.equals("JDialog") || windowName.equals("Dialog")) {
if (foundControls.size() != 1) {
System.out.println("Error: there are must be 1 control");
return false;
}
}
return true;
}
private static boolean verifyControlsOnMac(List<Rect> foundControls) {
if (foundControls.size() != 3) {
System.out.println("Error: there are must be 3 controls");
return false;
}
return true;
}
};

View File

@@ -21,16 +21,13 @@
* questions.
*/
import com.jetbrains.JBR;
import util.CommonAPISuite;
import util.RectCoordinates;
import util.Task;
import util.ScreenShotHelpers;
import util.TestUtils;
import util.*;
import java.awt.Dimension;
import java.awt.Robot;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import java.lang.invoke.MethodHandles;
/*
* @test
@@ -49,10 +46,11 @@ import java.awt.image.BufferedImage;
public class WindowResizeTest {
public static void main(String... args) {
boolean status = CommonAPISuite.runTestSuite(TestUtils.getWindowCreationFunctions(), windowResizeTest);
TaskResult result = CommonAPISuite.runTestSuite(TestUtils.getWindowCreationFunctions(), windowResizeTest);
if (!status) {
throw new RuntimeException("WindowResizeTest FAILED");
if (!result.isPassed()) {
final String message = String.format("%s FAILED. %s", MethodHandles.lookup().lookupClass().getName(), result.getError());
throw new RuntimeException(message);
}
}
@@ -78,8 +76,7 @@ public class WindowResizeTest {
robot.delay(1000);
if (titleBar.getHeight() != initialTitleBarHeight) {
passed = false;
System.out.println("Error: title bar height has been changed");
err("title bar height has been changed");
}
BufferedImage image = ScreenShotHelpers.takeScreenshot(window);

View File

@@ -23,9 +23,11 @@
import com.jetbrains.JBR;
import util.CommonAPISuite;
import util.Task;
import util.TaskResult;
import util.TestUtils;
import java.awt.Robot;
import java.lang.invoke.MethodHandles;
/*
* @test
@@ -44,10 +46,11 @@ import java.awt.Robot;
public class WindowVisibilityTest {
public static void main(String... args) {
boolean status = CommonAPISuite.runTestSuite(TestUtils.getWindowCreationFunctions(), visibilityTest);
TaskResult result = CommonAPISuite.runTestSuite(TestUtils.getWindowCreationFunctions(), visibilityTest);
if (!status) {
throw new RuntimeException("WindowVisibilityTest FAILED");
if (!result.isPassed()) {
final String message = String.format("%s FAILED. %s", MethodHandles.lookup().lookupClass().getName(), result.getError());
throw new RuntimeException(message);
}
}
@@ -72,12 +75,10 @@ public class WindowVisibilityTest {
robot.delay(1000);
if (titleBarHeight != titleBar.getHeight()) {
passed = false;
System.out.println("Error: title bar height has been changed");
err("Error: title bar height has been changed");
}
if (!titleBar.getContainingWindow().equals(window)) {
passed = false;
System.out.println("Error: wrong containing window");
err("wrong containing window");
}
}

View File

@@ -22,15 +22,12 @@
*/
import com.jetbrains.JBR;
import util.CommonAPISuite;
import util.Rect;
import util.ScreenShotHelpers;
import util.Task;
import util.TestUtils;
import util.*;
import java.awt.Color;
import java.awt.Robot;
import java.awt.image.BufferedImage;
import java.lang.invoke.MethodHandles;
import java.util.List;
/*
@@ -38,30 +35,23 @@ import java.util.List;
* @summary Verify a property to change visibility of native controls
* @requires os.family == "windows"
* @run main/othervm WindowsControlWidthTest
* @run main/othervm -Dos.version=10 -Dos.name="Windows 10" -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=1.0 WindowsControlWidthTest
* @run main/othervm -Dos.version=10 -Dos.name="Windows 11" -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=1.0 WindowsControlWidthTest
* @run main/othervm -Dos.version=10 -Dos.name="Windows 10" -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=1.25 WindowsControlWidthTest
* @run main/othervm -Dos.version=10 -Dos.name="Windows 11" -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=1.25 WindowsControlWidthTest
* @run main/othervm -Dos.version=10 -Dos.name="Windows 10" -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=1.5 WindowsControlWidthTest
* @run main/othervm -Dos.version=10 -Dos.name="Windows 11" -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=1.5 WindowsControlWidthTest
* @run main/othervm -Dos.version=10 -Dos.name="Windows 10" -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=2.0 WindowsControlWidthTest
* @run main/othervm -Dos.version=10 -Dos.name="Windows 11" -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=2.0 WindowsControlWidthTest
* @run main/othervm -Dos.version=10 -Dos.name="Windows 10" -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=2.5 WindowsControlWidthTest
* @run main/othervm -Dos.version=10 -Dos.name="Windows 11" -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=2.5 WindowsControlWidthTest
* @run main/othervm -Dos.version=10 -Dos.name="Windows 10" -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=3.0 WindowsControlWidthTest
* @run main/othervm -Dos.version=10 -Dos.name="Windows 11" -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=3.0 WindowsControlWidthTest
* @run main/othervm -Dos.version=10 -Dos.name="Windows 10" -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=3.5 WindowsControlWidthTest
* @run main/othervm -Dos.version=10 -Dos.name="Windows 11" -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=3.5 WindowsControlWidthTest
* @run main/othervm -Dos.version=10 -Dos.name="Windows 10" -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=4.0 WindowsControlWidthTest
* @run main/othervm -Dos.version=10 -Dos.name="Windows 11" -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=4.0 WindowsControlWidthTest
* @run main/othervm -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=1.0 WindowsControlWidthTest
* @run main/othervm -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=1.25 WindowsControlWidthTest
* @run main/othervm -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=1.5 WindowsControlWidthTest
* @run main/othervm -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=2.0 WindowsControlWidthTest
* @run main/othervm -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=2.5 WindowsControlWidthTest
* @run main/othervm -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=3.0 WindowsControlWidthTest
* @run main/othervm -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=3.5 WindowsControlWidthTest
* @run main/othervm -Dsun.java2d.uiScale.enabled=true -Dsun.java2d.uiScale=4.0 WindowsControlWidthTest
*/
public class WindowsControlWidthTest {
public static void main(String... args) {
boolean status = CommonAPISuite.runTestSuite(TestUtils.getWindowCreationFunctions(), nativeControlsWidth);
TaskResult result = CommonAPISuite.runTestSuite(TestUtils.getWindowCreationFunctions(), nativeControlsWidth);
if (!status) {
throw new RuntimeException("WindowsControlWidthTest FAILED");
if (!result.isPassed()) {
final String message = String.format("%s FAILED. %s", MethodHandles.lookup().lookupClass().getName(), result.getError());
throw new RuntimeException(message);
}
}
@@ -83,25 +73,37 @@ public class WindowsControlWidthTest {
passed = passed && TestUtils.checkFrameInsets(window);
if (titleBar.getLeftInset() == 0 && titleBar.getRightInset() == 0) {
passed = false;
System.out.println("Left or right inset must be non-zero");
err("Left or right inset must be non-zero");
}
BufferedImage image = ScreenShotHelpers.takeScreenshot(window);
List<Rect> foundControls = ScreenShotHelpers.detectControlsByBackground(image, (int) titleBar.getHeight(), TestUtils.TITLE_BAR_COLOR);
List<Rect> foundControls = ScreenShotHelpers.findControls(image, window, titleBar);
foundControls.forEach(control -> {
System.out.println("Detected control: " + control);
int calculatedWidth = control.getY2() - control.getY1();
System.out.println("Calculated width: " + calculatedWidth);
double uiScale = TestUtils.getUIScale();
double adjustedControlsWidth = CONTROLS_WIDTH / uiScale;
float diff = (float) calculatedWidth / (float) (control.getX2() - control.getX1());
if (diff < 0.9 || diff > 1.1) {
System.out.println("Error: control's width is much differ than the expected value");
passed = false;
if (foundControls.size() == 0) {
err("controls not found");
} else if (foundControls.size() == 3) {
System.out.println("3 controls found");
int minX = foundControls.get(0).getX1();
int maxX = foundControls.get(2).getX2();
int dist = (foundControls.get(1).getX1() - foundControls.get(0).getX2() + foundControls.get(2).getX1() - foundControls.get(1).getX2()) / 2;
int calculatedWidth = maxX - minX + dist;
double diff = calculatedWidth / adjustedControlsWidth;
if (diff < 0.95 || diff > 1.05) {
err("control's width is much differ than the expected value");
}
});
} else if (foundControls.size() == 1){
System.out.println("1 control found");
int calculatedWidth = foundControls.get(0).getX2() - foundControls.get(0).getX1();
if (calculatedWidth < 0.5) {
err("control's width is much differ than the expected value");
}
} else {
err("unexpected controls count = " + foundControls.size());
}
}
};

View File

@@ -26,17 +26,24 @@ package util;
import com.jetbrains.WindowDecorations;
import java.awt.Window;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Function;
import java.util.stream.Collectors;
public class CommonAPISuite {
public static boolean runTestSuite(List<Function<WindowDecorations.CustomTitleBar, Window>> functions, Task task) {
public static TaskResult runTestSuite(List<Function<WindowDecorations.CustomTitleBar, Window>> functions, Task task) {
AtomicBoolean testPassed = new AtomicBoolean(true);
functions.forEach(function -> testPassed.set(testPassed.get() && task.run(function)));
List<String> errors = new ArrayList<>();
functions.forEach(function -> {
TaskResult result = task.run(function);
testPassed.set(testPassed.get() && result.isPassed());
errors.add(result.getError());
});
return testPassed.get();
return new TaskResult(testPassed.get(), errors.stream().collect(Collectors.joining("\n")));
}
}

View File

@@ -22,6 +22,8 @@
*/
package util;
import com.jetbrains.WindowDecorations;
import javax.imageio.ImageIO;
import java.awt.AWTException;
import java.awt.Color;
@@ -57,6 +59,88 @@ public class ScreenShotHelpers {
return file.getAbsolutePath();
}
public static List<Rect> findControls(BufferedImage image, Window window, WindowDecorations.CustomTitleBar titleBar) {
return findControls(image, window, titleBar, false);
}
public static List<Rect> findControls(BufferedImage image, Window window, WindowDecorations.CustomTitleBar titleBar, boolean disabledControls) {
final int windowWidth = window.getWidth();
final int windowHeight = window.getHeight();
final int titleBarHeight = (int) titleBar.getHeight();
final int leftInset = Math.round(titleBar.getLeftInset());
final int rightInset = Math.round(titleBar.getRightInset());
System.out.println("Image w = " + image.getWidth() + " height = " + image.getHeight());
System.out.println("Window w = " + windowWidth + " height = " + window.getHeight());
// option 1
List<Rect> controls1 = detectControlsByBackground(image, titleBarHeight, TestUtils.TITLE_BAR_COLOR);
System.out.println("Option1 for " + window.getName());
controls1.forEach(System.out::println);
if (isMatchCondition(window, controls1.size(), disabledControls)) {
return controls1;
}
// option2
List<Rect> controls2 = detectControlsByBackground2(image, windowWidth, windowHeight, titleBarHeight, leftInset, rightInset, TestUtils.TITLE_BAR_COLOR);
System.out.println("Option2 for " + window.getName());
controls2.forEach(System.out::println);
if (isMatchCondition(window, controls2.size(), disabledControls)) {
return controls2;
}
// option3
List<Rect> controls3 = detectControls(image, titleBarHeight, leftInset, rightInset);
System.out.println("Option3 for " + window.getName());
controls3.forEach(System.out::println);
if (isMatchCondition(window, controls3.size(), disabledControls)) {
return controls3;
}
// option4
List<Rect> controls4 = detectControls2(image, windowWidth, windowHeight, titleBarHeight, leftInset, rightInset);
System.out.println("Option4 for " + window.getName());
controls4.forEach(System.out::println);
return controls4;
}
private static boolean isMatchCondition(Window window, int size, boolean disabledControls) {
if (!disabledControls) {
if (window.getName().equals("Frame") || window.getName().equals("JFrame")) {
return size == 3;
}
if (window.getName().equals("Dialog") || window.getName().equals("JDialog")) {
final String os = System.getProperty("os.name").toLowerCase();
if (os.startsWith("windows")) {
return size == 1;
}
return size == 3;
}
}
return size == 0;
}
public static RectCoordinates calculateControlsRect(BufferedImage image, int windowWidth, int windowHeight, int titleBarHeight, int leftInset, int rightInset) {
final int shiftW = (image.getWidth() - windowWidth) / 2;
final int shiftH = (image.getHeight() - windowHeight) / 2;
int x1;
int y1 = shiftH;
int x2;
int y2 = shiftH + titleBarHeight;
if (leftInset > rightInset) {
x1 = shiftW;
x2 = shiftW + leftInset;
} else {
x1 = shiftW + windowWidth - rightInset;
x2 = windowWidth - shiftW;
}
return new RectCoordinates(x1, y1, x2, y2);
}
public static RectCoordinates findRectangleTitleBar(BufferedImage image, int titleBarHeight) {
int centerX = image.getWidth() / 2;
int centerY = titleBarHeight / 2;
@@ -106,6 +190,7 @@ public class ScreenShotHelpers {
RectCoordinates coords = findRectangleTitleBar(image, titleBarHeight);
List<Rect> result = new ArrayList<>();
System.out.println("Detect controls by background");
System.out.println(coords);
List<Integer> lefts = new ArrayList<>();
@@ -114,9 +199,54 @@ public class ScreenShotHelpers {
int leftX = -1;
int rightX = -1;
for (int x = coords.x1(); x <= coords.x2(); x++) {
for (int x = coords.x1(); x < coords.x2(); x++) {
boolean isBackground = true;
for (int y = coords.y1(); y <= coords.y2(); y++) {
for (int y = coords.y1(); y < coords.y2(); y++) {
Color color = adjustColor(new Color(image.getRGB(x, y)));
if (!color.equals(backgroundColor)) {
isBackground = false;
break;
}
}
if (!isBackground) {
if (leftX == -1) {
leftX = x;
}
rightX = x;
} else if (leftX != -1) {
lefts.add(leftX);
rights.add(rightX);
leftX = -1;
rightX = -1;
}
}
for (int i = 0; i < lefts.size(); i++) {
int lx = lefts.get(i);
int rx = rights.get(i);
System.out.println("lx = " + lx + " rx = " + rx);
result.add(new Rect(lx, coords.y1(), rx, coords.y2(), 0, Color.BLACK));
}
return result;
}
public static List<Rect> detectControlsByBackground2(BufferedImage image, int windowWidth, int windowHeight, int titleBarHeight, int leftInset, int rightInset, Color backgroundColor) {
RectCoordinates coords = calculateControlsRect(image, windowWidth, windowHeight, titleBarHeight, leftInset, rightInset);
List<Rect> result = new ArrayList<>();
System.out.println("Detect controls by background2");
System.out.println(coords);
List<Integer> lefts = new ArrayList<>();
List<Integer> rights = new ArrayList<>();
int leftX = -1;
int rightX = -1;
for (int x = coords.x1(); x < coords.x2(); x++) {
boolean isBackground = true;
for (int y = coords.y1(); y < coords.y2(); y++) {
Color color = adjustColor(new Color(image.getRGB(x, y)));
if (!color.equals(backgroundColor)) {
isBackground = false;
@@ -148,11 +278,41 @@ public class ScreenShotHelpers {
public static List<Rect> detectControls(BufferedImage image, int titleBarHeight, int leftInset, int rightInset) {
RectCoordinates coords = ScreenShotHelpers.findRectangleTitleBar(image, titleBarHeight);
System.out.println("Detect controls");
System.out.println(coords);
Map<Color, Rect> map = new HashMap<>();
for (int x = coords.x1(); x <= coords.x2(); x++) {
for (int y = coords.y1(); y <= coords.y2(); y++) {
for (int x = coords.x1(); x < coords.x2(); x++) {
for (int y = coords.y1(); y < coords.y2(); y++) {
Color color = new Color(image.getRGB(x, y));
Color adjustedColor = adjustColor(color);
Rect rect = map.getOrDefault(adjustedColor, new Rect(adjustedColor));
rect.addPoint(x, y);
map.put(adjustedColor, rect);
}
}
int checkedHeight = coords.y2() - coords.y1() + 1;
int checkedWidth = coords.x2() - coords.x1() + 1;
int pixels = checkedWidth * checkedHeight;
int nonCoveredAreaApprox = pixels - (leftInset * checkedHeight + rightInset * checkedHeight);
List<Rect> rects = map.values().stream().filter(v -> v.getPixelCount() < nonCoveredAreaApprox).toList();
return groupRects(rects);
}
public static List<Rect> detectControls2(BufferedImage image, int windowWidth, int windowHeight, int titleBarHeight, int leftInset, int rightInset) {
RectCoordinates coords = calculateControlsRect(image, windowWidth, windowHeight, titleBarHeight, leftInset, rightInset);
System.out.println("Detect controls 2");
System.out.println(coords);
Map<Color, Rect> map = new HashMap<>();
for (int x = coords.x1(); x < coords.x2(); x++) {
for (int y = coords.y1(); y < coords.y2(); y++) {
Color color = new Color(image.getRGB(x, y));
Color adjustedColor = adjustColor(color);
Rect rect = map.getOrDefault(adjustedColor, new Rect(adjustedColor));

View File

@@ -36,23 +36,25 @@ abstract public class Task {
protected Window window;
protected boolean passed = true;
protected Robot robot;
protected String error;
public Task(String name) {
this.name = name;
}
public final boolean run(Function<WindowDecorations.CustomTitleBar, Window> windowCreator) {
public final TaskResult run(Function<WindowDecorations.CustomTitleBar, Window> windowCreator) {
try {
robot = new Robot();
} catch (AWTException e) {
System.out.println("ERROR: unable to initialize robot");
final String message = "ERROR: unable to initialize robot";
e.printStackTrace();
return false;
return new TaskResult(false, message);
}
init();
System.out.printf("RUN TEST CASE: %s%n", name);
passed = true;
error = "";
prepareTitleBar();
window = windowCreator.apply(titleBar);
System.out.println("Created a window with the custom title bar. Window name: " + window.getName());
@@ -71,12 +73,21 @@ abstract public class Task {
titleBar = null;
window.dispose();
if (passed) {
System.out.println("State: PASSED");
} else {
System.out.println("State: FAILED");
if (!TestUtils.isBasicTestCase()) {
boolean isMetConditions = TestUtils.checkScreenSizeConditions(window);
if (!isMetConditions) {
error += "SKIPPED: environment don't match screen size conditions";
return new TaskResult(false, true, error);
}
}
return passed;
return new TaskResult(passed, error);
}
protected void err(String message) {
this.error = error + message + "\n";
passed = false;
System.out.println(message);
}
protected void init() {

View File

@@ -0,0 +1,35 @@
package util;
public class TaskResult {
private final boolean passed;
private final boolean metConditions;
private final String error;
public TaskResult(boolean passed, String error) {
this.passed = passed;
this.metConditions = true;
this.error = error;
}
public TaskResult(boolean metConditions, boolean passed, String error) {
this.metConditions = metConditions;
this.passed = passed;
this.error = error;
}
public boolean isPassed() {
return passed;
}
public String getError() {
return error;
}
public TaskResult merge(TaskResult another) {
final String error = this.error + "\n" + another.error;
final boolean status = this.passed && another.passed;
return new TaskResult(status, error);
}
}

View File

@@ -160,14 +160,56 @@ public class TestUtils {
return dialog;
}
private static Rectangle calculateWindowBounds(Window window) {
public static boolean isBasicTestCase() {
return getUIScale() == 1.0;
}
public static boolean checkScreenSizeConditions(Window window) {
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Insets scnMax = Toolkit.getDefaultToolkit().
getScreenInsets(window.getGraphicsConfiguration());
int maxHeight = screenSize.height - scnMax.top - scnMax.bottom;
int maxWidth = screenSize.width - scnMax.left - scnMax.right;
System.out.println("Screen size: " + screenSize);
System.out.println("Screen insets: " + scnMax);
final int width = screenSize.width - scnMax.left - scnMax.right;
final int height = screenSize.height - scnMax.top - scnMax.bottom;
System.out.println("Max width = " + width + " max height = " + height);
return new Rectangle(scnMax.left + 2, scnMax.top + 2, (int) (maxWidth * 0.8), (int) (maxHeight * 0.8));
double uiScale = getUIScale();
final int effectiveWidth = (int) (width / uiScale);
final int effectiveHeight = (int) (height / uiScale);
if (effectiveWidth < 200 || effectiveHeight < 200) {
return false;
}
return true;
}
private static Rectangle calculateWindowBounds(Window window) {
double uiScale = getUIScale();
System.out.println("UI Scale: " + uiScale);
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
System.out.println("Screen size: " + screenSize);
Insets scnMax = Toolkit.getDefaultToolkit().
getScreenInsets(window.getGraphicsConfiguration());
int maxHeight = (int) ((screenSize.height - scnMax.top - scnMax.bottom) / uiScale);
int maxWidth = (int) ((screenSize.width - scnMax.left - scnMax.right) / uiScale);
Rectangle bounds = new Rectangle(scnMax.left + 2, scnMax.top + 2, (int) (maxWidth * 0.95), (int) (maxHeight * 0.95));
System.out.println("Window bounds: " + bounds);
return bounds;
}
public static double getUIScale() {
boolean scaleEnabled = "true".equals(System.getProperty("sun.java2d.uiScale.enabled"));
double uiScale = 1.0;
if (scaleEnabled) {
uiScale = Float.parseFloat(System.getProperty("sun.java2d.uiScale"));
}
return uiScale;
}
}

View File

@@ -31,6 +31,9 @@
* @requires (os.family == "mac")
*/
import com.jetbrains.JBR;
import com.jetbrains.WindowDecorations;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.lang.reflect.InvocationTargetException;
@@ -81,7 +84,11 @@ public class MacNativeTransparentTitleBarWithCustomHeight
}
robot.delay(DELAY);
runSwing(() -> rootPane.putClientProperty("apple.awt.windowTransparentTitleBarHeight", 42f));
runSwing(() -> {
WindowDecorations.CustomTitleBar titleBar = JBR.getWindowDecorations().createCustomTitleBar();
titleBar.setHeight(42f);
JBR.getWindowDecorations().setCustomTitleBar(frame, titleBar);
});
robot.delay(DELAY);
// check that titlebar is of background color

View File

@@ -31,6 +31,8 @@
import static java.awt.event.KeyEvent.*;
public class KeyCodesTest implements Runnable {
static private final int VK_BACK_QUOTE_ISO = 0x01000000+0x0060;
static private final int VK_SECTION = 0x01000000+0x00A7;
@Override
public void run() {
verify('!', VK_EXCLAMATION_MARK, "com.apple.keylayout.French-PC", VK_SLASH);
@@ -63,7 +65,28 @@ public class KeyCodesTest implements Runnable {
verify('}', VK_BRACERIGHT, "com.apple.keylayout.LatinAmerican", VK_BACK_SLASH);
verify('\u00a1', VK_INVERTED_EXCLAMATION_MARK, "com.apple.keylayout.Spanish-ISO", VK_EQUALS);
// TODO: figure out which keyboard layout has VK_EURO_SIGN as a key on the primary layer
verify('/', VK_DIVIDE, "com.apple.keylayout.ABC", VK_DIVIDE, VK_SLASH);
verify('*', VK_MULTIPLY, "com.apple.keylayout.ABC", VK_MULTIPLY, VK_ASTERISK);
verify('+', VK_ADD, "com.apple.keylayout.ABC", VK_ADD, VK_PLUS);
verify('-', VK_SUBTRACT, "com.apple.keylayout.ABC", VK_SUBTRACT, VK_MINUS);
verify('\t', VK_TAB, "com.apple.keylayout.ABC", VK_TAB);
verify(' ', VK_SPACE, "com.apple.keylayout.ABC", VK_SPACE);
// Test numpad numbers
for (int i = 0; i < 10; ++i) {
verify((char)('0' + i), VK_NUMPAD0 + i, "com.apple.keylayout.ABC", VK_NUMPAD0 + i, VK_0 + i);
}
verify('\0', VK_F1, "com.apple.keylayout.ABC", VK_F1);
verify('\0', VK_F19, "com.apple.keylayout.ABC", VK_F19);
// Test ANSI/ISO keyboard weirdness
verify('\u00a7', 0x01000000+0x00A7, "com.apple.keylayout.ABC", VK_SECTION);
verify('\u00b2', 0x01000000+0x00B2, "com.apple.keylayout.French-PC", VK_SECTION);
verify('#', VK_NUMBER_SIGN, "com.apple.keylayout.CanadianFrench-PC", VK_SECTION);
verify('\u00ab', 0x01000000+0x00AB, "com.apple.keylayout.CanadianFrench-PC", VK_BACK_QUOTE_ISO);
verify('#', VK_NUMBER_SIGN, "com.apple.keylayout.CanadianFrench-PC", VK_BACK_QUOTE);
// Test extended key codes that don't match the unicode char
verify('\u00e4', 0x01000000+0x00C4, "com.apple.keylayout.German", VK_QUOTE);
verify('\u00e5', 0x01000000+0x00C5, "com.apple.keylayout.Norwegian", VK_OPEN_BRACKET);
verify('\u00e6', 0x01000000+0x00C6, "com.apple.keylayout.Norwegian", VK_QUOTE);
@@ -73,12 +96,18 @@ public class KeyCodesTest implements Runnable {
verify('\u00f8', 0x01000000+0x00D8, "com.apple.keylayout.Norwegian", VK_SEMICOLON);
}
private void verify(char ch, int vk, String layout, int key) {
private void verify(char ch, int vk, String layout, int key, int correctKeyCode) {
InputMethodTest.section("Key code test: " + vk + ", char: " + ch);
InputMethodTest.layout(layout);
InputMethodTest.type(key, 0);
InputMethodTest.expect(String.valueOf(ch));
InputMethodTest.expectKeyCode(vk);
InputMethodTest.expectTrue(getExtendedKeyCodeForChar(ch) == vk, "getExtendedKeyCodeForChar(ch) == vk");
if (ch != 0) {
InputMethodTest.expect(String.valueOf(ch));
InputMethodTest.expectTrue(getExtendedKeyCodeForChar(ch) == correctKeyCode, "getExtendedKeyCodeForChar");
}
}
private void verify(char ch, int vk, String layout, int key) {
verify(ch, vk, layout, key, vk);
}
}

View File

@@ -46,6 +46,9 @@ public class Key {
// So to press some key on the current layout, one needs to pass corresponding US layout key code to Robot.
// So every key stores corresponding KeyEvent.VK_ constant name to provide mapping to US layout.
int getKeyCode_US() {
if (vkName.equals("VK_SECTION")) {
return 0x01000000 + 0x00A7;
}
try {
return KeyEvent.class.getField(vkName).getInt(null);
} catch (IllegalAccessException | NoSuchFieldException e) {

View File

@@ -38,10 +38,7 @@ public enum Layout_ABC implements LayoutKey {
// Enum name must be the same as KeyEvent.VK_ constant name corresponding to the key on US keyboard layout
// Note that '\u0000' may be used if no char is mapped to a key + modifier or if one wants to skip its testing
// TODO Robot cannot press section sign key (16777383),
// located on the left side of the key 1 on the Apple International English keyboard
// SECTION ('§', '§', '±', '±'),
VK_SECTION ('§', '§', '±', '±', '0'),
VK_MINUS ('-', '', '_', '—', '\u001F'),
VK_EQUALS ('=', '≠', '+', '±', '='),

View File

@@ -36,7 +36,7 @@ public enum Layout_FRENCH_PC implements LayoutKey {
// Enum name must be the same as KeyEvent.VK_ constant name corresponding to the key on US keyboard layout
// Note that '\u0000' may be used if no char is mapped to a key + modifier or if one wants to skip its testing
VK_SECTION ('²', '≤', '>', '≥', '0'),
VK_MINUS (')', ']', '°', ']', '\u001B'),
VK_EQUALS ('=', '}', '+', '≠', '\u001F'),

View File

@@ -36,6 +36,7 @@ public enum Layout_GERMAN implements LayoutKey {
// Enum name must be the same as KeyEvent.VK_ constant name corresponding to the key on US keyboard layout
// Note that '\u0000' may be used if no char is mapped to a key + modifier or if one wants to skip its testing
VK_SECTION (KeyChar.dead('^'), KeyChar.ch('„'), KeyChar.ch('°'), KeyChar.ch('“'), KeyChar.ch('\u001E')),
// Eszett
VK_MINUS ('ß', '¿', '?', '˙', 'ß'),
VK_EQUALS (KeyChar.dead('´'), KeyChar.ch('\''), KeyChar.dead('`'), KeyChar.ch('˚'), KeyChar.ch('´')),

View File

@@ -37,6 +37,7 @@ public enum Layout_SPANISH_ISO implements LayoutKey {
// Enum name must be the same as KeyEvent.VK_ constant name corresponding to the key on US keyboard layout
// Note that '\u0000' may be used if no char is mapped to a key + modifier or if one wants to skip its testing
VK_SECTION ('º', '\\', 'ª', '°', '0'),
VK_MINUS ('\'', '´', '?', '¸', '\u001F'),
VK_EQUALS ('¡', '', '¿', '˛', '='),

View File

@@ -37,6 +37,7 @@ public enum Layout_US_INTERNATIONAL_PC implements LayoutKey {
// Enum name must be the same as KeyEvent.VK_ constant name corresponding to the key on US keyboard layout
// Note that '\u0000' may be used if no char is mapped to a key + modifier or if one wants to skip its testing
VK_SECTION ('§', '§', '±', '±', '0'),
VK_MINUS ('-', '', '_', '—', '\u001F'),
VK_EQUALS ('=', '≠', '+', '±', '='),

View File

@@ -114,7 +114,6 @@
# jdk_awt
java/awt/event/MouseEvent/MouseClickTest/MouseClickTest.java 8168389 windows-all,macosx-all
java/awt/event/KeyEvent/SwallowKeyEvents/SwallowKeyEvents.java 8224055 macosx-all
java/awt/Focus/FocusOwnerFrameOnClick/FocusOwnerFrameOnClick.java 8081489 generic-all
java/awt/Focus/FocusSubRequestTest/FocusSubRequestTest.java JBR-5178 windows-all
java/awt/Focus/FrameMinimizeTest/FrameMinimizeTest.java 8016266 linux-all
@@ -134,12 +133,12 @@ java/awt/dnd/DropTargetEnterExitTest/ExtraDragEnterTest.java 8029680 generic-all
java/awt/dnd/URIListBetweenJVMsTest/URIListBetweenJVMsTest.java 8171510,JBR-881 macosx-all,linux-all
javax/swing/dnd/7171812/bug7171812.java 8041447,8253184 macosx-all,windows-all
java/awt/Focus/ChoiceFocus/ChoiceFocus.java 8169103 windows-all,macosx-all
java/awt/Focus/ClearLwQueueBreakTest/ClearLwQueueBreakTest.java 8198618 macosx-all
java/awt/Focus/ConsumeNextKeyTypedOnModalShowTest/ConsumeNextKeyTypedOnModalShowTest.java 6986252,JBR-5178 macosx-all,windows-all
java/awt/Focus/ClearLwQueueBreakTest/ClearLwQueueBreakTest.java 8198618,JBR-814 macosx-all,linux-all
java/awt/Focus/ConsumeNextKeyTypedOnModalShowTest/ConsumeNextKeyTypedOnModalShowTest.java 6986252,JBR-5178 windows-all
java/awt/Focus/MouseClickRequestFocusRaceTest/MouseClickRequestFocusRaceTest.java 8194753 linux-all,macosx-all
java/awt/Focus/NoAutotransferToDisabledCompTest/NoAutotransferToDisabledCompTest.java 7152980 macosx-all
java/awt/Focus/ToFrontFocusTest/ToFrontFocus.java 7156130 linux-all
java/awt/Focus/WrongKeyTypedConsumedTest/WrongKeyTypedConsumedTest.java 8169096,JBR-4880 macosx-all,windows-all
java/awt/Focus/WrongKeyTypedConsumedTest/WrongKeyTypedConsumedTest.java 8169096,JBR-4880,JBR-5387 windows-all,linux-all
java/awt/EventQueue/6980209/bug6980209.java 8198615 macosx-all
java/awt/Frame/ExceptionOnSetExtendedStateTest/ExceptionOnSetExtendedStateTest.java 8198237 macosx-all
java/awt/Frame/SetMinimumSizeTest/SetMinimumSizeTest2.java JBR-5210 windows-all
@@ -212,12 +211,12 @@ java/awt/Focus/8000326/SetFocusTraversalKeysEnabledTest.java JBR-4997 windows-al
java/awt/Focus/8073453/AWTFocusTransitionTest.java JBR-5210,8298247 windows-all,linux-all
java/awt/Focus/8073453/SwingFocusTransitionTest.java JBR-5210 windows-all
java/awt/event/KeyEvent/AltCharAcceleratorTest/AltCharAcceleratorTest.java JBR-5210 windows-all
java/awt/event/KeyEvent/ExtendedKeyCode/ExtendedKeyCodeTest.java 8169476 windows-all,macosx-all
java/awt/event/KeyEvent/KeyChar/KeyCharTest.java 8169474,8224055 macosx-all,windows-all
java/awt/event/KeyEvent/ExtendedKeyCode/ExtendedKeyCodeTest.java 8169476 windows-all
java/awt/event/KeyEvent/KeyChar/KeyCharTest.java 8169474,8224055 windows-all
java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java JBR-3636,JBR-4880 macosx-all,windows-all
java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java JBR-3636,JBR-4880 windows-all
java/awt/event/KeyEvent/KeyTyped/CtrlSpace.java JBR-3817 windows-all,macosx-all
java/awt/event/KeyEvent/KeyTyped/CtrlSpace.java JBR-3817 windows-all
java/awt/dnd/BadSerializationTest/BadSerializationTest.java 8277817 linux-x64,windows-x64
java/awt/dnd/URIListToFileListBetweenJVMsTest/URIListToFileListBetweenJVMsTest.java 8194947 generic-all
@@ -267,9 +266,10 @@ java/awt/image/multiresolution/MultiResolutionJOptionPaneIconTest.java 8253184 w
java/awt/print/Headless/HeadlessPrinterJob.java 8196088 windows-all
sun/awt/datatransfer/SuplementaryCharactersTransferTest.java 8011371 generic-all
sun/awt/shell/ShellFolderMemoryLeak.java 8197794 windows-all
sun/java2d/DirectX/OpaqueImageToSurfaceBlitTest/OpaqueImageToSurfaceBlitTest.java JBR-5393 windows-aarch64
sun/java2d/DirectX/OverriddenInsetsTest/OverriddenInsetsTest.java 8196102 generic-all
sun/java2d/DirectX/RenderingToCachedGraphicsTest/RenderingToCachedGraphicsTest.java 8196180,8252812 windows-all,macosx-all,linux-all
java/awt/Graphics2D/CopyAreaOOB.java JBR-5354 macosx-all,windows-aarch64
java/awt/Graphics2D/CopyAreaOOB.java JBR-5354 macosx-all,windows-all
java/awt/Graphics2D/DrawString/DisposerTest.java JBR-5010 linux-aarch64
java/awt/Graphics2D/DrawString/DrawRotatedStringUsingRotatedFont.java 8266283 linux-all
java/awt/Graphics2D/DrawString/TextRenderingTest.java JBR-4260,JBR-5359 macosx-11.7.1,windows-aarch64
@@ -568,7 +568,7 @@ java/awt/Robot/AcceptExtraMouseButtons/AcceptExtraMouseButtons.java 7107528,8253
java/awt/Mouse/GetMousePositionTest/GetMousePositionWithPopup.java 8282232 windows-all
java/awt/Mouse/GetMousePositionTest/GetMousePositionWithOverlay.java 8253184 windows-all
java/awt/Mouse/MouseDragEvent/MouseDraggedTest.java 8080676,8253184 linux-all,windows-all
java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersInKeyEvent.java 8157147 linux-all,windows-all,macosx-all
java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersInKeyEvent.java 8157147 linux-all,windows-all
java/awt/Mouse/MouseWheelAbsXY/MouseWheelAbsXY.java 8253184 windows-all
java/awt/Toolkit/ToolkitPropertyTest/ToolkitPropertyTest_Enable.java 6847163
java/awt/xembed/server/RunTestXEmbed.java 7034201 linux-all
@@ -578,7 +578,6 @@ java/awt/Frame/DisposeParentGC/DisposeParentGC.java 8079786 macosx-all
java/awt/GraphicsDevice/CheckDisplayModes.java 8266242 macosx-aarch64
java/awt/GraphicsDevice/DisplayModes/CycleDMImage.java 7099223 linux-all,windows-all,macosx-all
java/awt/keyboard/8218917/AltKeyBug.java JBR-3636,JBR-5312 macosx-all,windows-all
java/awt/keyboard/AllKeyCode/AllKeyCode.java 8242930 macosx-all
java/awt/keyboard/AltPlusNumberKeyCombinationsTest/AltPlusNumberKeyCombinationsTest.java JBR-5210 windows-all
java/awt/KeyboardFocusmanager/TypeAhead/EnqueueWithDialogButtonTest/EnqueueWithDialogButtonTest.java JBR-5210 windows-all
java/awt/KeyboardFocusmanager/TypeAhead/EnqueueWithDialogTest/EnqueueWithDialogTest.java JBR-5210 windows-all
@@ -586,7 +585,6 @@ java/awt/KeyboardFocusmanager/TypeAhead/SubMenuShowTest/SubMenuShowTest.java JBR
java/awt/FullScreen/8013581/bug8013581.java 8169471,JBR-80 macosx-all,windows-all
java/awt/event/MouseEvent/RobotLWTest/RobotLWTest.java 8233568 macosx-all
java/awt/event/MouseEvent/MultipleMouseButtonsTest/MultipleMouseButtonsTest.java 8233568 macosx-all
java/awt/event/MouseEvent/ClickDuringKeypress/ClickDuringKeypress.java 8233568 macosx-all
java/awt/event/KeyEvent/DeadKey/DeadKeyMacOSXInputText.java 8233568 macosx-all
java/awt/event/KeyEvent/DeadKey/deadKeyMacOSX.java 8233568 macosx-all
java/awt/TrayIcon/RightClickWhenBalloonDisplayed/RightClickWhenBalloonDisplayed.java 8238720 windows-all
@@ -848,6 +846,7 @@ javax/swing/JEditorPane/6917744/bug6917744.java 8213124 macosx-all
javax/swing/JEditorPane/8195095/ImageViewTest.java 8253184 windows-all
javax/swing/JRadioButton/4314194/bug4314194.java 8298153 linux-all
javax/swing/JRootPane/4670486/bug4670486.java 8042381,8197552 macosx-all,windows-all
javax/swing/JRootPane/DefaultButtonTest.java 8285635 windows-all,linux-all
javax/swing/text/html/HTMLEditorKit/5043626/bug5043626.java JBR-5210 windows-all
javax/swing/text/html/StyleSheet/bug4936917.java JBR-899 windows-all
javax/swing/plaf/metal/MetalGradient/8163193/ButtonGradientTest.java 8253184 windows-all
@@ -857,10 +856,10 @@ javax/swing/plaf/synth/SynthScrollbarThumbPainter/SynthScrollbarThumbPainterTest
javax/swing/JInternalFrame/5066752/bug5066752.java 8253184 windows-all
javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java JBR-5359 windows-aarch64
javax/swing/JInternalFrame/8020708/bug8020708.java JBR-4879 windows-all
javax/swing/JInternalFrame/8069348/bug8069348.java 8253184 windows-all
javax/swing/JInternalFrame/8069348/bug8069348.java 8253184,JBR-900 macosx-aarch64,windows-all
javax/swing/text/DefaultEditorKit/4278839/bug4278839.java CODETOOLS-7901623 windows-all
javax/swing/text/GlyphPainter2/6427244/bug6427244.java JBR-896 windows-all
javax/swing/text/JTextComponent/5074573/bug5074573.java CODETOOLS-7901623 windows-all
javax/swing/text/JTextComponent/5074573/bug5074573.java CODETOOLS-7901623,JBR-5386 windows-all,linux-all
javax/swing/text/StyledEditorKit/4506788/bug4506788.java JBR-180 windows-all
java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java 8253184 windows-all
java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java 8253184 windows-all
@@ -985,7 +984,7 @@ java/awt/font/OutlineTextRendererEmoji.java JBR-5009 linux-aarch64
java/awt/font/EmojiVariation.java JBR-5009 linux-aarch64
java/awt/font/TextLayout/TestJustification.html 8250791 macosx-all
java/awt/font/TextLayout/TestSinhalaChar.java JBR-5103 generic-all
javax/swing/JTableHeader/6889007/bug6889007.java 8253184 windows-all
javax/swing/JTableHeader/6889007/bug6889007.java 8253184,JBR-5387 windows-all,linux-all
java/awt/TrayIcon/DragEventSource/DragEventSource.java 8252242 macosx-all
java/awt/FileDialog/DefaultFocusOwner/DefaultFocusOwner.java 7187728 macosx-all,linux-all
java/awt/FileDialog/RegexpFilterTest/RegexpFilterTest.html 7187728 macosx-all,linux-all
@@ -1077,7 +1076,7 @@ java/awt/image/multiresolution/MenuMultiresolutionIconTest.java JBR-4880,8253184
java/awt/MenuBar/SeparatorsNavigation/SeparatorsNavigation.java JBR-4880 windows-all
javax/swing/JFileChooser/8002077/bug8002077.java JBR-4880 windows-all
javax/swing/JFileChooser/JFileChooserSetLocationTest.java 8295804 linux-all,macosx-all,windows-all
javax/swing/JSlider/6348946/bug6348946.java 8197552 windows-all
javax/swing/JSlider/6348946/bug6348946.java 8197552,JBR-5387 windows-all,linux-all
javax/swing/JSpinner/4973721/bug4973721.java JBR-4880 windows-all
javax/swing/JSpinner/5012888/bug5012888.java JBR-4880 windows-all
javax/swing/JSpinner/JSpinnerFocusTest.java JBR-5288 windows-all

View File

@@ -1,6 +1,6 @@
# cannotbe run against jbr which does not contain some jbrsdk's utilities required for test executions
javax/imageio/stream/StreamCloserLeak/run_test.sh NO_BUG generic_all
javax/imageio/spi/AppletContextTest/BadPluginConfigurationTest.sh NO_BUG generic_all
javax/imageio/stream/StreamCloserLeak/run_test.sh nobug generic-all
javax/imageio/spi/AppletContextTest/BadPluginConfigurationTest.sh nobug generic-all
#
# intermittently failed, they were muted in regular runs with the option "unmute manually"
@@ -17,7 +17,6 @@ java/awt/Focus/ShowFrameCheckForegroundTest/ShowFrameCheckForegroundTest.java no
java/awt/Focus/TranserFocusToWindow/TranserFocusToWindow.java nobug windows-all,macosx-all,linux-all
java/awt/Focus/UnaccessibleChoice/AccessibleChoiceTest.java nobug windows-all
java/awt/Focus/WindowInitialFocusTest/WindowInitialFocusTest.java nobug windows-all
java/awt/Focus/WrongKeyTypedConsumedTest/WrongKeyTypedConsumedTest.java nobug windows-all
java/awt/KeyboardFocusmanager/TypeAhead/FreezeTest/FreezeTest.java nobug windows-all
java/awt/KeyboardFocusmanager/TypeAhead/SubMenuShowTest/SubMenuShowTest.java nobug windows-all
java/awt/KeyboardFocusmanager/TypeAhead/TestDialogTypeAhead.java nobug windows-all
@@ -54,7 +53,6 @@ javax/swing/JFrame/8016356/bug8016356.java nobug windows-all
javax/swing/JFrame/8175301/ScaledFrameBackgroundTest.java nobug windows-all
javax/swing/JInternalFrame/5066752/bug5066752.java nobug windows-all
javax/swing/JInternalFrame/6288609/TestJInternalFrameDispose.java nobug windows-all
javax/swing/JInternalFrame/8069348/bug8069348.java nobug windows-all
javax/swing/JInternalFrame/8145060/TestJInternalFrameMinimize.java nobug windows-all,linux-all
javax/swing/JInternalFrame/Test6505027.java nobug windows-all
javax/swing/JLabel/7004134/bug7004134.java nobug linux-all