Compare commits

..

275 Commits
1567 ... 1601

Author SHA1 Message Date
Dmitry Batrak
93588d0738 JBR-3663, JBR-3671 Problems on macOS space switching 2021-08-06 17:27:28 +03:00
Mikhail Grishchenko
c8de1037d6 Revert "Merge branch 'update_11.0.12'"
This reverts commit 2ac546b054, reversing
changes made to 1dcc612a81.
2021-08-06 13:50:34 +07:00
Dmitry Batrak
431c07ac57 JBR-3642 java/awt/Window/8159168/SetShapeTest.java fails on macOS-x64 & macOS-aarch64
make sure jb/java/awt/Focus/Typeahead* tests still pass
2021-08-05 21:00:04 +03:00
Dmitry Batrak
13dffb3db5 JBR-3642 java/awt/Window/8159168/SetShapeTest.java fails on macOS-x64 & macOS-aarch64
revert JBR-1417 fix (JBR 11 does not support chain of popups)
2021-08-05 21:00:03 +03:00
Mikhail Grishchenko
2ac546b054 Merge branch 'update_11.0.12'
# Conflicts:
#	src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m
2021-08-05 21:54:49 +07:00
Dmitry Batrak
1dcc612a81 JBR-3666 Child window stays on default space when full-screen mode is activated for parent window on macOS 2021-08-05 10:11:17 +03:00
Dmitry Batrak
bfd01081c3 JBR-3662 Focus jumps to another project tab after closing modal dialog 2021-08-04 11:59:58 +03:00
Dmitry Batrak
a7d486ca3d JBR-3640 java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFAppModalTest.java: window Open button lost focus when it should not 2021-08-03 20:49:07 +03:00
Artem Bochkarev
37e6e8e616 JBR-3342: add npe check
fixed JBR-3342 SIGILL at [libsystem_kernel] __kill NPE/OOME at java.desktop/sun.lwawt.LWComponentPeer.windowToLocal / -[NSApplication(JCEFApplication) _swizzled_sendEvent:]
2021-08-03 09:16:27 +03:00
clanger
b4d4104e40 Added tag jdk-11.0.12-ga for changeset f412f2537f15 2021-08-02 21:16:26 +03:00
mbalao
9b5cfa7ac2 8264079: Improve abstractions
Reviewed-by: yan
2021-08-02 21:14:26 +03:00
mbalao
499d9f8e49 8262967: Improve Zip file support
Reviewed-by: mbaesken
2021-08-02 21:14:26 +03:00
mbalao
fb5f776caf 8264066: Enhance compiler validation
Reviewed-by: mbaesken, mdoerr
2021-08-02 21:14:25 +03:00
yan
067d4d500d 8264460: Improve NTLM support
Reviewed-by: mbalao
2021-08-02 21:14:25 +03:00
avoitylov
76a279920c 8262380: Enhance XML processing passes
Reviewed-by: mbalao
2021-08-02 21:14:25 +03:00
mbalao
d1dda7f5a6 8256491: Better HTTP transport
Reviewed-by: mbaesken
2021-08-02 21:14:24 +03:00
mbalao
4c1030df6f 8256157: Improve bytecode assembly
Reviewed-by: mbaesken
2021-08-02 21:14:24 +03:00
alvdavi
6ae43c6a0e 8258432: Improve file transfers
Reviewed-by: mbaesken, mbalao
2021-08-02 21:14:23 +03:00
mbalao
7e34e95d11 8260967: Better jar file validation
Reviewed-by: yan
2021-08-02 21:14:23 +03:00
alvdavi
332b9ab801 8262477: Enhance String Conclusions
Reviewed-by: mbaesken, mbalao
2021-08-02 21:14:23 +03:00
yan
e0b84005e4 8262410: Enhanced rules for zones
Reviewed-by: mbaesken, mbalao
2021-08-02 21:14:22 +03:00
yan
471cfeb793 8262403: Enhanced data transfer
Reviewed-by: mbaesken, mbalao
2021-08-02 21:14:22 +03:00
alvdavi
94ab10baf3 8260453: Improve Font Bounding
Reviewed-by: mbaesken, mbalao
2021-08-02 21:14:21 +03:00
avoitylov
d60f0153e7 8260960: Signs of jarsigner signing
Reviewed-by: mbaesken, mbalao
2021-08-02 21:14:21 +03:00
rhalade
2b6110f6e3 8268678: LetsEncryptCA.java test fails as Let’s Encrypt Authority X3 is retired
Reviewed-by: xuelei
2021-08-02 21:14:21 +03:00
egahlin
63ddfb5221 8255992: JFR EventWriter does not use first string from StringPool with id 0
Reviewed-by: egahlin
Contributed-by: Jie Kang <jkang@openjdk.org>
2021-08-02 21:14:20 +03:00
mgronlun
4d1ff852af 8258414: OldObjectSample events too expensive
Reviewed-by: jbachorik
Contributed-by: florian.david@datadoghq.com
2021-08-02 21:14:20 +03:00
mdoerr
7db2687b73 8267599: Revert the change to the default PKCS12 macAlgorithm and macIterationCount props for 11u/8u/7u
Summary: Undo pkcs12.macAlgorithm and macIterationCount changes from JDK-8153005 backport. They were postponed for interoperability reasons.
Reviewed-by: coffeys
2021-08-02 21:14:20 +03:00
weijun
59f4085080 8237804: sun/security/mscapi tests fail with "Key pair not generated, alias <nnnnnn> already exists"
Reviewed-by: mullan
2021-08-02 21:14:19 +03:00
abakhtin
9b94493edd 8241248: NullPointerException in sun.security.ssl.HKDF.extract(HKDF.java:93)
Reviewed-by: jnimeh, xuelei, mdoerr
2021-08-02 21:14:19 +03:00
phh
c47f2057c5 8267721: Enable sun/security/pkcs11 tests for Amazon Linux 2 AArch64
Reviewed-by: phh
Contributed-by: Evgeny Astigeevich <eastig@amazon.com>
2021-08-02 21:14:19 +03:00
ysuenaga
ba539e832c 8249875: GCC 10 warnings -Wtype-limits with JFR code
Reviewed-by: mgronlun
2021-08-02 21:14:18 +03:00
mbalao
f7ba738641 8265462: Handle multiple slots in the NSS Internal Module from SunPKCS11's Secmod
Reviewed-by: valeriep
2021-08-02 21:14:18 +03:00
serb
c00eb55594 8196100: javax/swing/text/JTextComponent/5074573/bug5074573.java fails
Reviewed-by: kizune
2021-08-02 21:14:18 +03:00
zgu
a275ab6f48 8267561: Shenandoah: Reference processing not properly setup for outside of cycle degenerated GC
Reviewed-by: rkennke
2021-08-02 21:14:17 +03:00
sgehwolf
27de8b0ff6 8266929: Unable to use algorithms from 3p providers
Summary: Delay initializtion of AID cache table until after jar verification
Reviewed-by: phh
2021-08-02 21:14:17 +03:00
jlahoda
5d9d0a9a75 8242919: Paste locks up jshell
Summary: Not waiting until the full block is available while reading from input.
Reviewed-by: rfield
2021-08-02 21:14:16 +03:00
vkempik
18a8fd31e5 8267235: [macos_aarch64] InterpreterRuntime::throw_pending_exception messing up LR results in crash
Reviewed-by: akozlov, aph
2021-08-02 21:14:16 +03:00
jbachorik
faf6484a2b 8261354: SIGSEGV at MethodIteratorHost
Reviewed-by: mgronlun
2021-08-02 21:14:16 +03:00
shade
b59a15193e 8266802: Shenandoah: Round up region size to page size unconditionally
Reviewed-by: zgu
2021-08-02 21:14:15 +03:00
vromero
81c4587cf7 8207160: ClassReader::adjustMethodParams can potentially return null if the args list is empty
Reviewed-by: mcimadamore, cushon
2021-08-02 21:14:15 +03:00
aleonard
7ca96684b5 8265666: Enable AIX build platform to make external debug symbols
Reviewed-by: erikj, mdoerr
2021-08-02 21:14:14 +03:00
weijun
55d40c666d 8266220: keytool still prompt for store password on a password-less pkcs12 file if -storetype pkcs12 is specified
Reviewed-by: coffeys, hchao
2021-08-02 21:14:14 +03:00
weijun
bd0b236c4a 8266293: Key protection using PBEWithMD5AndDES fails with "java.security.InvalidAlgorithmParameterException: Salt must be 8 bytes long"
Reviewed-by: valeriep
2021-08-02 21:14:14 +03:00
ysuenaga
5acffe72ad 8241087: Build failure with VS 2019 (16.5.0) due to C2039 and C2873
Reviewed-by: serb
2021-08-02 21:14:13 +03:00
mbaesken
fd3ce84413 8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage
Reviewed-by: clanger
2021-08-02 21:14:13 +03:00
stuefe
3a700c8e6b 8260030: Improve stringStream buffer handling
Reviewed-by: iklam, kbarrett
2021-08-02 21:14:13 +03:00
stuefe
2247fa9602 8185734: [Windows] Structured Exception Catcher missing around gtest execution
Reviewed-by: dholmes, ihse
2021-08-02 21:14:12 +03:00
jiefu
79d5f9c769 8251031: Some vmTestbase/nsk/monitoring/RuntimeMXBean tests fail with hostnames starting from digits
Reviewed-by: dholmes, cjplummer, sspitsyn
2021-08-02 21:14:12 +03:00
mbaesken
e6584954f5 8220074: Clean up GCC 8.3 errors in LittleCMS
Reviewed-by: prr
2021-08-02 21:14:11 +03:00
mbaesken
0478b4e54c 8232084: HotSpot build failed with GCC 9.2.1
Reviewed-by: sspitsyn, cjplummer, dholmes, iklam
2021-08-02 21:14:11 +03:00
mbaesken
308ba715a8 8266892: avoid maybe-uninitialized gcc warnings on linux s390x
Reviewed-by: shade, lucy
2021-08-02 21:14:10 +03:00
bulasevich
60a9d39d0e 8252311: AArch64: save two words in itable lookup stub
Reviewed-by: adinn, aph
2021-08-02 21:14:10 +03:00
egahlin
201bc8380c 8243452: JFR: Could not create chunk in repository with over 200 recordings
Reviewed-by: mgronlun
2021-08-02 21:14:10 +03:00
valeriep
0ed41e9ef2 8263404: RsaPrivateKeySpec is always recognized as RSAPrivateCrtKeySpec in RSAKeyFactory.engineGetKeySpec
Reviewed-by: valeriep
Contributed-by: Greg Rubin <rubin@amazon.com>, Ziyi Luo <luoziyi@openjdk.org>
2021-08-02 21:14:09 +03:00
jnimeh
0e3a3cc87a 8254717: isAssignableFrom checks in KeyFactorySpi.engineGetKeySpec appear to be backwards
Reviewed-by: jnimeh
Contributed-by: Ziyi Luo <luoziyi@openjdk.org>
2021-08-02 21:14:09 +03:00
ccheung
b85ab67807 8216184: CDS/appCDS tests failed on Windows due to long path to a classlist file
Summary: use os::open() instead of fopen()
Reviewed-by: iklam, dholmes
2021-08-02 21:14:08 +03:00
weijun
a30e884f47 8153005: Upgrade the default PKCS12 encryption/MAC algorithms
Reviewed-by: mullan
2021-08-02 21:14:08 +03:00
sgehwolf
77447ab9da 8266713: [AIX] Build failure after 11u backport of JDK-8247753
Summary: Add local implementation of strcasestr for AIX
Reviewed-by: mdoerr, stuefe, mbaesken, rpatil
2021-08-02 21:14:08 +03:00
aeubanks
d649015cab 8223667: ASAN build broken
Reviewed-by: erikj, manc
2021-08-02 21:14:07 +03:00
zgu
1408d4104c 8265239: Shenandoah: Shenandoah heap region count could be off by 1
Reviewed-by: shade
2021-08-02 21:14:07 +03:00
dholmes
2bce0bab8a 8218458: [TESTBUG] runtime/NMT/CheckForProperDetailStackTrace.java fails with Expected stack trace missing from output
Reviewed-by: cjplummer, zgu
2021-08-02 21:14:06 +03:00
stuefe
bbc63ddc5a 8262163: Extend settings printout in jcmd VM.metaspace
Reviewed-by: lucy
2021-08-02 21:14:06 +03:00
stuefe
1a1cf92ea6 8260926: Trace resource exhausted events unconditionally
Reviewed-by: dholmes, coleenp
2021-08-02 21:14:06 +03:00
stuefe
b40243f499 8260707: java/lang/instrument/PremainClass/InheritAgent0100.java times out
Reviewed-by: dholmes, sspitsyn, dcubed
2021-08-02 21:14:05 +03:00
bulasevich
27130a7ad2 8248568: compiler/c2/TestBit.java failed: test missing from stdout/stderr
Reviewed-by: kvn
2021-08-02 21:14:05 +03:00
bulasevich
efe3d8c9fa 8247408: IdealGraph bit check expression canonicalization
Reviewed-by: aph, kvn, adinn
2021-08-02 21:14:05 +03:00
mikael
afa82f7acd 8219142: Remove unused JIMAGE_ResourcePath
Reviewed-by: dholmes, alanb
2021-08-02 21:14:04 +03:00
mbaesken
c465836189 8214854: JDWP: Unforseen output truncation in logging
Reviewed-by: cjplummer, dholmes
2021-08-02 21:14:04 +03:00
mbaesken
07cb8849b7 8215009: GCC 8 compilation error in libjli
Reviewed-by: dholmes, mikael, rriggs
2021-08-02 21:14:04 +03:00
rpatil
7dbbb71015 8247753: UIManager.getSytemLookAndFeelClassName() returns wrong value on Fedora 32
Reviewed-by: sgehwolf
2021-08-02 21:14:03 +03:00
ddong
008119aa29 8261020: Wrong format parameter in create_emergency_chunk_path
Reviewed-by: goetz
2021-08-02 21:14:03 +03:00
snazarki
6ea789002e 8264821: DirectIOTest fails on a system with large block size
Reviewed-by: mdoerr
2021-08-02 21:14:02 +03:00
rhalade
e005989a5f 8264190: Harden TLS interop tests
Reviewed-by: rhalade
Contributed-by: Fernando Guallini <fguallini@openjdk.org>
2021-08-02 21:14:02 +03:00
serb
33f88d585e 7106851: Test should not use System.exit
Reviewed-by: aivanov, psadhukhan, kaddepalli
2021-08-02 21:14:02 +03:00
rriggs
3438de2060 8256244: java/lang/ProcessHandle/PermissionTest.java fails with TestNG 7.1
Reviewed-by: lancea, iignatyev
2021-08-02 21:14:01 +03:00
shade
cf77ddd67d 8265421: java/lang/String/StringRepeat.java test is missing a memory requirement
Reviewed-by: jlaskey, shade, ryadav
Contributed-by: christoph.goettschkes@microdoc.com
2021-08-02 21:14:01 +03:00
tschatzl
382c68f8b6 8245511: G1 adaptive IHOP does not account for reclamation of humongous objects by young GC
Summary: Discount humongous object eager reclaim in IHOP allocation rate.
Reviewed-by: tschatzl, sjohanss
Contributed-by: luoziyi@amazon.com, kemperw@amazon.com
2021-08-02 21:14:01 +03:00
phh
abadd05c98 8246274: G1 old gen allocation tracking is not in a separate class
Summary: Add G1OldGenAllocationTracker
Reviewed-by: tschatzl, phh
Contributed-by: luoziyi@amazon.com, kemperw@amazon.com
2021-08-02 21:14:00 +03:00
shade
b61d1ec0b2 8265690: Use the latest Ubuntu base image version in Docker testing
Reviewed-by: sgehwolf, iignatyev, mseledtsov
2021-08-02 21:14:00 +03:00
serb
667524ec99 6847157: java.lang.NullPointerException: HDC for component at sun.java2d.loops.Blit.Blit
Reviewed-by: prr
2021-08-02 21:13:59 +03:00
jlahoda
c7bb9526c4 8262900: ToolBasicTest fails to access HTTP server it starts
Reviewed-by: sundar, vromero
2021-08-02 21:13:59 +03:00
psadhukhan
1984e4ea7f 8239312: [macos] javax/swing/JFrame/NSTexturedJFrame/NSTexturedJFrame.java
Reviewed-by: serb
2021-08-02 21:13:59 +03:00
jbachorik
7c8bed75ad 8265750: Fatal error in safepoint.cpp after backport of 8258414
Reviewed-by: mdoerr, sgehwolf
2021-08-02 21:13:58 +03:00
lucy
d8f671e3ee 8264173: [s390] Improve Hardware Feature Detection And Reporting
Reviewed-by: goetz, mdoerr
2021-08-02 21:13:58 +03:00
lucy
ba42c17ea7 8263260: [s390] Support latest hardware (z14 and z15)
Reviewed-by: goetz, mdoerr
2021-08-02 21:13:58 +03:00
lucy
ce82bfa392 8241101: [s390] jtreg test failure after JDK-8238696: not conformant features string
Reviewed-by: stuefe, mdoerr, clanger
2021-08-02 21:13:57 +03:00
shade
2624b2a7d7 8265537: x86 version string truncated after JDK-8249672 11u backport
Reviewed-by: neugens
2021-08-02 21:13:57 +03:00
serb
974a06e94c 8225116: Test OwnedWindowsLeak.java intermittently fails
Reviewed-by: pbansal
2021-08-02 21:13:56 +03:00
serb
ad3b5d11d7 8238567: SoftMainMixer.processAudioBuffers(): Wrong handling of stoppedMixers
Reviewed-by: prr
2021-08-02 21:13:56 +03:00
jiefu
b71bcabdc5 8257796: [TESTBUG] TestUseSHA512IntrinsicsOptionOnSupportedCPU.java fails on x86_32
Reviewed-by: kvn
2021-08-02 21:13:56 +03:00
jiefu
977d41835c 8222302: [TESTBUG]test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHAOptionOnUnsupportedCPU.java fails on any other CPU
Reviewed-by: kvn, dlong
2021-08-02 21:13:55 +03:00
kbarrett
c630859af5 8253167: ARM32 builds fail after JDK-8247910
8213483: ARM32: runtime/ErrorHandling/ShowRegistersOnAssertTest.java jtreg test fail
Summary: Removed platform-dependent definitions of BREAKPOINT as asm(breakpoint instruction).
Reviewed-by: coleenp, mikael, bulasevich
2021-08-02 21:13:55 +03:00
hshi
63720c9e21 8264223: CodeHeap::verify fails extra_hops assertion in fastdebug test
Reviewed-by: lucy, shade
2021-08-02 21:13:55 +03:00
stuefe
c65f7c3364 8257604: JNI_ArgumentPusherVaArg leaks valist
Reviewed-by: dcubed, coleenp
2021-08-02 21:13:54 +03:00
weijun
a64f9674c9 8076190: Customizing the generation of a PKCS12 keystore
Reviewed-by: mullan
2021-08-02 21:13:54 +03:00
thartmann
e929f1d15e 8209459: TestSHA512MultiBlockIntrinsics failed on AArch64
Summary: Prevent classloading to avoid generation of SHA stubs.
Reviewed-by: kvn, thartmann
Contributed-by: Joshua Zhu <joshua.zhu@arm.com>
2021-08-02 21:13:53 +03:00
serb
733e2667a3 8264328: Broken license in javax/swing/JComboBox/8072767/bug8072767.java
Reviewed-by: kizune, trebari, pbansal
2021-08-02 21:13:53 +03:00
ssahoo
0979251517 8225438: javax/net/ssl/TLSCommon/TestSessionLocalPrincipal.java failed with Read timed out
Reviewed-by: xuelei, rhalade, hchao
2021-08-02 21:13:53 +03:00
aivanov
bdc30661cb 8263311: Watch registry changes for remote printers update instead of polling
Reviewed-by: psadhukhan, serb
2021-08-02 21:13:52 +03:00
dfuchs
e7fb17ebca 8244205: HTTP/2 tunnel connections through proxy may be reused regardless of which proxy is selected
Summary: The key used in the HTTP/2 connection pool is updated to take into account the proxy address in case of tunnel connections
Reviewed-by: chegar
2021-08-02 21:13:52 +03:00
dfuchs
ade01055d1 8244031: HttpClient should have more tests for HEAD requests
Summary: Http2TestExchangeImpl.java updated to support HEAD responses; ForbiddenHeadTest.java added.
Reviewed-by: chegar, michaelm
2021-08-02 21:13:51 +03:00
shade
3396a75ca7 8265718: Build failure after JDK-8258414 11u backport
Reviewed-by: stuefe, goetz
2021-08-02 21:13:51 +03:00
iignatyev
bd91605174 8225756: [testbug] compiler/loopstripmining/CheckLoopStripMining.java sets too short a SafepointTimeoutDelay
Reviewed-by: kvn, epavlova, roland, mdoerr
2021-08-02 21:13:51 +03:00
jlahoda
24d2a6fe28 8177068: incomplete classpath causes NPE in Flow
Summary: Undo completions that failed during speculative attribution, so that the appropriate CompletionFailures are thrown again and properly reported.
Reviewed-by: vromero
2021-08-02 21:13:50 +03:00
mgronlun
bd2a53a105 8258414: OldObjectSample events too expensive
Reviewed-by: jbachorik
Contributed-by: florian.david@datadoghq.com
2021-08-02 21:13:50 +03:00
stuefe
6e2ff8055d 8265417: Backport of JDK-8249672 breaks Solaris x86 build
Reviewed-by: shade
2021-08-02 21:13:50 +03:00
dlong
cdbcb46437 8214512: ARM32: Jtreg test compiler/c2/Test8062950.java fails on ARM
Reviewed-by: dlong, enevill, bulasevich
Contributed-by: nick.gasson@arm.com, christoph.goettschkes@microdoc.com
2021-08-02 21:13:49 +03:00
jboes
2bb749dca2 8233185: HttpServer.stop() blocks indefinitely when called on dispatch thread
Summary: Skip dispatcherThread.join() if current thread is the dispatcherThread
Reviewed-by: dfuchs, msheppar, vtewari
2021-08-02 21:13:49 +03:00
trebari
535c3bd567 8190763: Class cast exception on (CompoundEdit) UndoableEditEvent.getEdit()
Reviewed-by: psadhukhan, pbansal, serb
2021-08-02 21:13:48 +03:00
xuelei
03dd08df32 8258753: StartTlsResponse.close() hangs due to synchronization issues
Reviewed-by: xuelei
Contributed-by: Prajwal Kumaraswamy <pkumaraswamy@openjdk.org>
2021-08-02 21:13:48 +03:00
rriggs
c6c1be68b6 8263729: [test] divert spurious output away from stream under test in ProcessBuilder Basic test
Reviewed-by: stuefe, iklam
2021-08-02 21:13:48 +03:00
rhalade
b5cf4ef17e 8225081: Remove Telia Company CA certificate expiring in April 2021
Reviewed-by: mullan
2021-08-02 21:13:47 +03:00
stuefe
38ee00073d 8253572: [windows] CDS archive may fail to open with long file names
Reviewed-by: ccheung, iklam
2021-08-02 21:13:47 +03:00
rrich
a7735759aa 8244847: Linux/PPC: runtime/CompressedOops/CompressedClassPointers: smallHeapTest fails
Reviewed-by: stuefe, mdoerr
2021-08-02 21:13:46 +03:00
hseigel
beb4d8cd85 8207779: Method::is_valid_method() compares 'this' with NULL
Summary: Add Method* parameter and make method static to avoid 'thi's comparison with NULL
Reviewed-by: lfoltan, coleenp
2021-08-02 21:13:46 +03:00
kvn
c0c32d8bfe 8252779: compiler/graalunit/HotspotTest.java failed after 8251525
Summary: updated CheckGraalIntrinsics.java test
Reviewed-by: dcubed
2021-08-02 21:13:46 +03:00
jzhu
93606dbe3f 8252259: AArch64: Adjust default value of FLOATPRESSURE
Reviewed-by: aph
2021-08-02 21:13:45 +03:00
lucy
1080bdd980 8261447: MethodInvocationCounters frequently run into overflow
Reviewed-by: mdoerr, thartmann, kvn, iveresov
2021-08-02 21:13:45 +03:00
prr
b3e3c0b89d 8261170: Upgrade to freetype 2.10.4
Reviewed-by: serb, psadhukhan, jdv, kizune
2021-08-02 21:13:44 +03:00
clanger
830e654595 8207404: MulticastSocket tests failing on AIX
Reviewed-by: chegar, sgroeger
2021-08-02 21:13:44 +03:00
neliasso
47e3150fad 8263361: Incorrect arraycopy stub selected by C2 for SATB collectors
Reviewed-by: eosterlund, vlivanov
2021-08-02 21:13:43 +03:00
kvn
39608ad69a 8262093: java/util/concurrent/tck/JSR166TestCase.java failed "assert(false) failed: unexpected node"
Reviewed-by: thartmann
2021-08-02 21:13:43 +03:00
naoto
76e123778d 8262110: DST starts from incorrect time in 2038
8073446: TimeZone getOffset API does not  return a dst offset between years 2038-2137
Reviewed-by: rriggs
2021-08-02 21:13:43 +03:00
bulasevich
4f61ac98d5 8214128: ARM32: wrong stack alignment on Deoptimization::unpack_frames
Reviewed-by: dsamersoff
2021-08-02 21:13:42 +03:00
prr
90e76c380b 8260380: Upgrade to LittleCMS 2.12
Reviewed-by: jdv, serb
2021-08-02 21:13:42 +03:00
jiangli
85a088f9f1 8208061: runtime/LoadClass/TestResize.java fails with "Load factor too high" when running in CDS mode.
Summary: Allow resizing for all system dictionaries except for the shared dictionary at runtime.
Reviewed-by: iklam, gziemski
2021-08-02 21:13:42 +03:00
lucy
381de93173 8264846: [macos] libjvm.dylib linker warning due to macOS version mismatch
Reviewed-by: erikj, dcubed, clanger
2021-08-02 21:13:41 +03:00
sgehwolf
5d2684022e 8264047: Duplicate global variable 'jvm' in libjavajpeg and libawt
Reviewed-by: serb
2021-08-02 21:13:41 +03:00
mbalao
49c77556ab 8261355: No data buffering in SunPKCS11 Cipher encryption when the underlying mechanism has no padding
Reviewed-by: valeriep
2021-08-02 21:13:40 +03:00
bulasevich
7970c912fa 8213845: ARM32: Interpreter doesn't call result handler after native calls
Summary: Fix mapping of native jboolean result to 0..1 on ARM32
Reviewed-by: aph, phh
Contributed-by: christoph.goettschkes@microdoc.com
2021-08-02 21:13:40 +03:00
shade
897fed57dd 8207247: AARCH64: Enable Minimal and Client VM builds
Reviewed-by: aph
Contributed-by: christoph.goettschkes@microdoc.com
2021-08-02 21:13:40 +03:00
rehn
6a6ae5c6ed 8261262: Kitchensink24HStress.java crashed with EXCEPTION_ACCESS_VIOLATION
Reviewed-by: dcubed, sspitsyn
2021-08-02 21:13:39 +03:00
xuelei
89ec9bc1e2 8226374: Restrict TLS signature schemes and named groups
Reviewed-by: mullan
2021-08-02 21:13:39 +03:00
ngasson
5404c7fe70 8247354: [aarch64] PopFrame causes assert(oopDesc::is_oop(obj)) failed: not an oop
Reviewed-by: adinn
2021-08-02 21:13:38 +03:00
yzhang
1315b55c19 8242429: Better implementation for sign extract
Reviewed-by: vlivanov, thartmann
Contributed-by: eric.c.liu@arm.com
2021-08-02 21:13:38 +03:00
shade
3a9131614b 8264923: PNGImageWriter.write_zTXt throws Exception with a typo
Reviewed-by: aivanov, jdv, azvegint, kizune
2021-08-02 21:13:38 +03:00
shade
d0b370c6b8 8256523: Streamline Java SHA2 implementation
Reviewed-by: valeriep
2021-08-02 21:13:37 +03:00
zgu
e7bb9fd8d7 8253948: Memory leak in ImageFileReader
Reviewed-by: alanb
2021-08-02 21:13:37 +03:00
smonteith
dc43f7063d 8231841: AArch64: debug.cpp help() is missing an AArch64 line for pns
Summary: Adds missing line for aarch64 to debug.cpp help() for pns
Reviewed-by: adinn
Contributed-by: alan.hayward@arm.com
2021-08-02 21:13:36 +03:00
weijun
d7e1f938e7 8240848: ArrayIndexOutOfBoundsException buf for TextCallbackHandler
Reviewed-by: mullan
2021-08-02 21:13:36 +03:00
jdv
ad56416ad9 8195841: PNGImageReader.readNullTerminatedString() doesnt check for non-null terminated strings with length equal to maxLen
Reviewed-by: serb, prr
2021-08-02 21:13:36 +03:00
jdv
50412155f9 8242557: Add length limit for strings in PNGImageWriter
Reviewed-by: prr, psadhukhan
2021-08-02 21:13:35 +03:00
iveresov
3e47d86db7 8264151: ciMethod::ensure_method_data() should return false is loading resulted in empty state
Reviewed-by: dlong, kvn
2021-08-02 21:13:35 +03:00
hseigel
871cb53015 8238175: CTW: Class.getDeclaredMethods fails with assert(k->is_subclass_of(SystemDictionary::Throwable_klass())) failed: invalid exception class
Summary: Replace the assert with a logging message saying that the class is not a subclass of java.lang.Throwable
Reviewed-by: dholmes, coleenp
2021-08-02 21:13:35 +03:00
neliasso
a7c4f72f75 8262465: Very long compilation times and high memory consumption in C2 debug builds
Reviewed-by: kvn, thartmann
2021-08-02 21:13:34 +03:00
stuefe
1ee8a9a528 8263558: Possible NULL dereference in fast path arena free if ZapResourceArea is true
Reviewed-by: kbarrett, coleenp
2021-08-02 21:13:34 +03:00
thartmann
56c4e379af 8262739: String inflation C2 intrinsic prevents insertion of anti-dependencies
Reviewed-by: neliasso, chagedorn
2021-08-02 21:13:33 +03:00
apangin
0535ead40d 8249719: MethodHandle performance suffers from bad ResolvedMethodTable hash function
Reviewed-by: simonis, stuefe, coleenp
2021-08-02 21:13:33 +03:00
yzhang
c64efbc559 8243240: AArch64: Add support for MulVB
Reviewed-by: aph
2021-08-02 21:13:33 +03:00
jcm
d6f04ca27b 8226627: assert(t->singleton()) failed: must be a constant
Summary: Implemented constant folding for MaxFD, MinFD.
Reviewed-by: thartmann, bsrbnd, pli
2021-08-02 21:13:32 +03:00
xuelei
13af04a640 8259662: Don't wrap SocketExceptions into SSLExceptions in SSLSocketImpl
Reviewed-by: xuelei
Contributed-by: Clive Verghese <cverghese@openjdk.org>
2021-08-02 21:13:32 +03:00
fyang
893f2d4fbc 8263676: AArch64: one potential bug in C1 LIRGenerator::generate_address()
Reviewed-by: adinn
2021-08-02 21:13:31 +03:00
dtitov
63895cc7cd 8217348: assert(thread->is_Java_thread()) failed: just checking
Reviewed-by: sspitsyn, dholmes, amenkov, jcbeyler
2021-08-02 21:13:31 +03:00
shade
592583006f 8263504: Some OutputMachOpcodes fields are uninitialized
Reviewed-by: kvn
2021-08-02 21:13:31 +03:00
rraghavan
31344224c6 8238812: assert(false) failed: bad AD file
Reviewed-by: thartmann, chagedorn, roland
2021-08-02 21:13:30 +03:00
rcastanedalo
15123efa60 8261730: C2 compilation fails with assert(store->find_edge(load) != -1) failed: missing precedence edge
Summary: Relax assertion in PhaseCFG::verify() to accept the case where a store is used to implement an implicit null check and a load is placed in the null block.
Reviewed-by: thartmann, kvn
2021-08-02 21:13:30 +03:00
naoto
760f73a671 8247432: Update IANA Language Subtag Registry to Version 2020-09-29
Reviewed-by: joehw
2021-08-02 21:13:29 +03:00
naoto
923bef0b1e 8242010: Upgrade IANA Language Subtag Registry to Version 2020-04-01
Reviewed-by: rriggs, joehw
2021-08-02 21:13:29 +03:00
xuelei
39cd51acab 8206925: Support the certificate_authorities extension
Reviewed-by: mullan
2021-08-02 21:13:29 +03:00
joehw
c7afe8d09b 8235368: Update BCEL to Version 6.4.1
Reviewed-by: lancea, dfuchs, forax
2021-08-02 21:13:28 +03:00
mli
ace76c89eb 8210443: Migrate Locale matching tests to JDK Repo.
Reviewed-by: naoto
Contributed-by: dan.z.zhou@oracle.com
2021-08-02 21:13:28 +03:00
ngasson
641d5af861 8236992: AArch64: remove redundant load_klass in itable stub
Reviewed-by: aph, adinn
2021-08-02 21:13:27 +03:00
thartmann
808c4a4a73 8230428: Cleanup dead CastIP node code in formssel.cpp
Summary: Removed dead code.
Reviewed-by: roland
2021-08-02 21:13:27 +03:00
jdowland
ff2f0003c3 8187450: JNI local refs exceeds capacity warning in NetworkInterface::getAll
Reviewed-by: chegar, dfuchs, aph
2021-08-02 21:13:27 +03:00
kvn
3cd3b00fb7 8262837: handle split_USE correctly
Reviewed-by: kvn
Contributed-by: Kuai Wei <kuaiwei.kw@alibaba-inc.com>
2021-08-02 21:13:26 +03:00
naoto
64fe99dbec 8241082: Upgrade IANA Language Subtag Registry data to 03-16-2020 version
Reviewed-by: joehw
2021-08-02 21:13:26 +03:00
bulasevich
17b9e61404 8213794: ARM32: disable TypeProfiling, CriticalJNINatives, Serviceablity tests for ARM32
Reviewed-by: dholmes
Contributed-by: christoph.goettschkes@microdoc.com
2021-08-02 21:13:25 +03:00
jzhu
c0e32c3fca 8233948: AArch64: Incorrect mapping between OptoReg and VMReg for high 64 bits of Vector Register
Reviewed-by: adinn
2021-08-02 21:13:25 +03:00
pli
2c9e087a17 8232591: AArch64: Add missing match rules for smaddl, smsubl and smnegl
Reviewed-by: aph
2021-08-02 21:13:25 +03:00
mbaesken
dba304d265 8262461: handle wcstombsdmp return value correctly in unix awt_InputMethod.c
Reviewed-by: psadhukhan, azvegint, aivanov
2021-08-02 21:13:24 +03:00
chagedorn
2022e3d2f2 8260284: C2: assert(_base == Int) failed: Not an Int
Reviewed-by: thartmann, kvn
2021-08-02 21:13:24 +03:00
stuefe
1f7b350fe7 8263557: Possible NULL dereference in Arena::destruct_contents()
Reviewed-by: kbarrett, coleenp
2021-08-02 21:13:24 +03:00
thartmann
eadcad1393 8259061: C2: assert(found) failed: memory-writing node is not placed in its original loop or an ancestor of it
Summary: Remove assertion that is too general, that is, it can fail on compilations where C2 generates correct code otherwise.
Reviewed-by: chagedorn, thartmann, kvn
Contributed-by: Roberto Castaneda Lozano <rcastanedalo@openjdk.org>
2021-08-02 21:13:23 +03:00
shade
ec4b14d493 8261505: Test test/hotspot/jtreg/gc/parallel/TestDynShrinkHeap.java killed by Linux OOM Killer
Reviewed-by: sjohanss, tschatzl
2021-08-02 21:13:23 +03:00
jlahoda
298401f392 8239536: Can't use java.util.List object after importing java.awt.List
Summary: Using full qualified names for synthetic types; ensuring the user is warned when a variable becomes undefined due to a dependency change.
Reviewed-by: rfield
2021-08-02 21:13:22 +03:00
rkennke
29eed33b90 8257621: JFR StringPool misses cached items across consecutive recordings
Reviewed-by: egahlin
2021-08-02 21:13:22 +03:00
bsrbnd
6cc66f7ff5 8220407: compiler/intrinsics/math/TestFpMinMaxIntrinsics.java timedout
Reviewed-by: kvn
2021-08-02 21:13:22 +03:00
jbhateja
f5c06010c4 8227222: vmTestbase/jit/FloatingPoint/gen_math/Loops04/Loops04.java failed XMM register should be 0-15
Reviewed-by: thartmann, vlivanov, ctornqvi, bsrbnd
2021-08-02 21:13:21 +03:00
xuelei
293045e187 8259886: Improve SSL session cache performance and scalability
Reviewed-by: erikj, xuelei
Contributed-by: djelinski <djelinski1@gmail.com>
2021-08-02 21:13:21 +03:00
ngasson
886f5885ff 8263425: AArch64: two potential bugs in C1 LIRGenerator::generate_address()
Reviewed-by: aph
2021-08-02 21:13:21 +03:00
chagedorn
05703a8824 8255763: C2: OSR miscompilation caused by invalid memory instruction placement
Summary: Disable GCM hoisting of memory-writing nodes for irreducible CFGs.
Reviewed-by: kvn, chagedorn
Contributed-by: Roberto Castaneda Lozano <rcastanedalo@openjdk.org>
2021-08-02 21:13:20 +03:00
fguallini
27738b9bc1 8241372: Several test failures due to javax.net.ssl.SSLException: Connection reset
Reviewed-by: dfuchs, rhalade
2021-08-02 21:13:20 +03:00
roland
4dc032eb32 8257574: C2: "failed: parsing found no loops but there are some" assert failure
Reviewed-by: thartmann, neliasso, chagedorn
2021-08-02 21:13:19 +03:00
mbaesken
ceb27707a6 8259983: do not use uninitialized expand_ms value in G1CollectedHeap::expand_heap_after_young_collection
Reviewed-by: kbarrett, lucy
2021-08-02 21:13:19 +03:00
aivanov
fcce5a2b3c 8262829: Native crash in Win32PrintServiceLookup.getAllPrinterNames()
Reviewed-by: prr, psadhukhan, serb
2021-08-02 21:13:19 +03:00
ewhelan
27fce84573 8252883: AccessDeniedException caused by delayed file deletion on Windows
Reviewed-by: dfuchs
2021-08-02 21:13:18 +03:00
weijun
b50153e0b1 8261481: Cannot read Kerberos settings in dynamic store on macOS Big Sur
Reviewed-by: mullan
2021-08-02 21:13:18 +03:00
mullan
32ba7b1af9 8243559: Remove root certificates with 1024-bit keys
Reviewed-by: weijun
2021-08-02 21:13:18 +03:00
jiefu
67c4fc1a4d 8256037: [TESTBUG] com/sun/jndi/dns/ConfigTests/PortUnreachable.java fails due to the hard coded threshold is small
Reviewed-by: shade, aefimov
2021-08-02 21:13:17 +03:00
goetz
e612e43ec0 8262121: [11u] Redo 8244287: JFR: Methods samples have line number 0
Summary: In addition to previous fix attempt add constructor that takes method and line.
Reviewed-by: mdoerr, clanger
2021-08-02 21:13:17 +03:00
mbaesken
07bf95c9ad 8261791: (sctp) handleSendFailed in SctpChannelImpl.c potential leaks
Reviewed-by: chegar, alanb
2021-08-02 21:13:16 +03:00
mbaesken
eef3676722 8261601: free memory in early return in Java_sun_nio_ch_sctp_SctpChannelImpl_receive0
Reviewed-by: clanger, dfuchs, bpb
2021-08-02 21:13:16 +03:00
lucy
15b77b797b 8231460: Performance issue (CodeHeap) with large free blocks
Reviewed-by: adinn, stuefe
2021-08-02 21:13:16 +03:00
lucy
5cb1684f14 8223444: Improve CodeHeap Free Space Management
Reviewed-by: kvn, thartmann
2021-08-02 21:13:15 +03:00
fyang
0a087ecb13 8223020: aarch64: expand minI_rReg and maxI_rReg patterns into separate instructions
Reviewed-by: aph
2021-08-02 21:13:15 +03:00
serb
9c693b5575 8171303: sun/java2d/pipe/InterpolationQualityTest.java fails on Windows & Linux
Reviewed-by: prr, psadhukhan, kcr
2021-08-02 21:13:15 +03:00
serb
30b018b55c 8241829: Cleanup the code for PrinterJob on windows
Reviewed-by: prr, aivanov
2021-08-02 21:13:14 +03:00
rfield
7840ab7e3d 8213725: JShell NullPointerException due to class file with unexpected package
Reviewed-by: jlahoda
2021-08-02 21:13:14 +03:00
rfield
0a4ab7ae9a 8247438: JShell: When FailOverExecutionControlProvider fails the proximal cause is not shown
8237743: test/langtools/jdk/jshell/FailOverExecutionControlTest.java fails No ExecutionControlProvider with name 'nonExistent' and parameter keys: []
8199646: JShell tests: jdk/jshell/FailOverDirectExecutionControlTest.java failed with java.lang.UnsupportedOperationException
Reviewed-by: jlahoda
2021-08-02 21:13:14 +03:00
mbaesken
4a9b9ddd48 8260236: better init AnnotationCollector _contended_group
Reviewed-by: coleenp, shade
2021-08-02 21:13:13 +03:00
coleenp
f4c17f8b6c 8234355: Buffer overflow in jcmd GC.class_stats due to too many classes
Summary: Remove use of GC.class_stats in testing and failure analysis (plan to deprecate)
Reviewed-by: dcubed
2021-08-02 21:13:13 +03:00
stuefe
b868dea5db 8259710: Inlining trace leaks memory
Reviewed-by: thartmann, neliasso
2021-08-02 21:13:13 +03:00
thartmann
f0a90c039a 8248411: [aarch64] Insufficient error handling when CodeBuffer is exhausted
Summary: Added error handling.
Reviewed-by: neliasso
2021-08-02 21:13:12 +03:00
vtewari
f4615088ac 8260925: HttpsURLConnection does not work with other JSSE provider.
Reviewed-by: xuelei
2021-08-02 21:13:12 +03:00
cgo
838eb2387f 8261752: Multiple GC test are missing memory requirements
Reviewed-by: phh
Contributed-by: christoph.goettschkes@microdoc.com
2021-08-02 21:13:11 +03:00
abakhtin
76c6dc4591 8241960: The SHA3 message digests impl of SUN provider are not thread safe after cloned
Summary: Fix sun.security.provider.SHA3 class to correctly clone its lanes field
Reviewed-by: valeriep
2021-08-02 21:13:11 +03:00
vlivanov
07161d961a 8259276: C2: Empty expression stack when reexecuting tableswitch/lookupswitch instructions after deoptimization
Reviewed-by: dlong, kvn, thartmann
2021-08-02 21:13:11 +03:00
mgronlun
1b113cbc3f 8257569: Failure observed with JfrVirtualMemory::initialize
Reviewed-by: egahlin, poonam
2021-08-02 21:13:10 +03:00
jbhateja
2892ad6bc0 8259777: Incorrect predication condition generated by ADLC
Reviewed-by: vlivanov
2021-08-02 21:13:10 +03:00
roland
3ab381bd9b 8261914: IfNode::fold_compares_helper faces non-canonicalized bool when running JRuby JSON workload
Reviewed-by: kvn, shade
2021-08-02 21:13:09 +03:00
skuksenko
55b5776d7f 8223504: Improve performance of forall loops by better inlining of "iterator()" methods
Reviewed-by: vlivanov, shade
2021-08-02 21:13:09 +03:00
mbaesken
37e13f2348 8261167: print_process_memory_info add a close call after fopen
Reviewed-by: stuefe, dholmes
2021-08-02 21:13:09 +03:00
mbaesken
f5a8794c07 8259786: initialize last parameter of getpwuid_r
Reviewed-by: mdoerr, hseigel
2021-08-02 21:13:08 +03:00
stuefe
61b424d747 8256287: [windows] add loop fuse to map_or_reserve_memory_aligned
Reviewed-by: luhenry, iklam, minqi
2021-08-02 21:13:08 +03:00
roland
a8560f5352 8253923: C2 doesn't always run loop opts for compilations that include loops
Reviewed-by: neliasso, thartmann
2021-08-02 21:13:07 +03:00
naoto
641a44d288 8255086: Update the root locale display names
Reviewed-by: bchristi, joehw
2021-08-02 21:13:07 +03:00
erikj
b406b996f9 8261261: The version extra fields needs to be overridable in jib-profiles.js
Reviewed-by: ihse
2021-08-02 21:13:07 +03:00
mbaesken
1f189822f0 8260432: allocateSpaceForGP in freetypeScaler.c might leak memory
Reviewed-by: shade, stuefe
2021-08-02 21:13:06 +03:00
mbaesken
deeaf56fa3 8260426: awt debug_mem.c DMem_AllocateBlock might leak memory
Reviewed-by: psadhukhan, aivanov
2021-08-02 21:13:06 +03:00
mbaesken
ed04be67c7 8259843: initialize dli_fname array before calling dll_address_to_library_name
Reviewed-by: lucy, dholmes
2021-08-02 21:13:06 +03:00
ngasson
5d54d23310 8262726: AArch64: C1 StubAssembler::call_RT can corrupt stack
Reviewed-by: aph
2021-08-02 21:13:05 +03:00
goetz
1f320da262 8257580: Bump update version for OpenJDK: jdk-11.0.12
Reviewed-by: mdoerr
2021-08-02 21:13:05 +03:00
AlexanderScherbatiy
3fb01ee26b Add stubs for JNFObtainEnv/JNFReleaseEnv methods in Dispatch.m file 2021-08-02 21:12:48 +03:00
AlexanderScherbatiy
b8fc7b2e91 Fix DECLARE_CLASS/METHOD return values 2021-08-02 21:12:48 +03:00
AlexanderScherbatiy
b8add67ee4 Return NSWindowTabbingModeDisallowed from GET_CPLATFORM_WINDOW_CLASS_RETURN 2021-08-02 21:12:47 +03:00
AlexanderScherbatiy
b00ea1cfbc Use GET_CPLATFORM_WINDOW_CLASS_RETURN for method with return value from AWTWindow.m 2021-08-02 21:12:47 +03:00
Alexander Zuev
d597ddafbd 8263846: Bad JNI lookup getFocusOwner in accessibility code on Mac OS X
Reviewed-by: azvegint, prr
2021-08-02 21:12:47 +03:00
Phil Race
6625f22474 8261198: [macOS] Incorrect JNI parameters in number conversion in A11Y code
Reviewed-by: serb, psadhukhan
2021-08-02 21:12:47 +03:00
Alexander Zuev
01f4133f22 8259585: Accessible actions do not work on mac os x
Reviewed-by: serb
2021-08-02 21:12:47 +03:00
Phil Race
b7bd90fe90 8259232: Bad JNI lookup during printing
Reviewed-by: psadhukhan
2021-08-02 21:12:46 +03:00
Vladimir Kempik
e5c9468191 8260616: Removing remaining JNF dependencies in the java.desktop module 8259729: Missed JNFInstanceOf -> IsInstanceOf conversion
Reviewed-by: mdoerr
2021-08-02 21:12:46 +03:00
Vladimir Kempik
6bb87f14a8 8259869: [macOS] Remove desktop module dependencies on JNF Reference APIs
Reviewed-by: mdoerr
2021-08-02 21:12:46 +03:00
Vladimir Kempik
57a8722fbe 8259651: [macOS] Replace JNF_COCOA_ENTER/EXIT macros
Reviewed-by: mdoerr
2021-08-02 21:12:45 +03:00
Vladimir Kempik
436382c220 8259343: [macOS] Update JNI error handling in Cocoa code
Reviewed-by: mdoerr
2021-08-02 21:12:45 +03:00
Vladimir Kempik
a826a12210 8257853: Remove dependencies on JNF's JNI utility functions in AWT and 2D code
Reviewed-by: mdoerr
2021-08-02 21:12:45 +03:00
vkempik
e7daf93c85 8257988: Remove JNF dependency from libsaproc/MacosxDebuggerLocal.m
Reviewed-by: ihse, cjplummer
2021-08-02 21:12:45 +03:00
vkempik
282a9485b8 8257858: [macOS]: Remove JNF dependency from libosxsecurity/KeystoreImpl.m
8257860: [macOS]: Remove JNF dependency from libosxkrb5/SCDynamicStoreConfig.m
Reviewed-by: mdoerr
2021-08-02 21:12:45 +03:00
vkempik
f265ba1086 8264786: [macos] All Swing/AWT apps cause Allow Notifications prompt to appear when app is launched
Reviewed-by: phh
2021-08-02 21:12:44 +03:00
phh
6644278e8a 8267641: [11u] 8227609 backport typo
Summary: Remove extraneous "8227609"
Reviewed-by: yan, mdoerr, sgehwolf
2021-08-02 21:12:44 +03:00
bpb
87ca21711a 8227609: (fs) Files.newInputStream(...).skip(n) should allow skipping beyond file size
Reviewed-by: alanb, lancea, fweimer
2021-08-02 21:12:44 +03:00
bulasevich
ba81371932 8249189: AARCH64: more L2I conversions can be skipped
Reviewed-by: aph
2021-08-02 21:12:43 +03:00
bulasevich
2c3cdba88b 8248870: AARCH64: I2L/L2I conversions can be skipped for masked positive values
Reviewed-by: aph
2021-08-02 21:12:42 +03:00
bulasevich
dc7595ea2b 8248043: Need to eliminate excessive i2l conversions
Reviewed-by: redestad, kvn, iveresov
2021-08-02 21:12:42 +03:00
yzhang
2dfaf4d229 8243155: AArch64: Add support for SqrtVF
Reviewed-by: aph
2021-08-02 21:12:41 +03:00
shade
0036e174ad 8231713: x86_32 build failures after JDK-8226721 (Missing intrinsics for Math.ceil, floor, rint)
Reviewed-by: kvn
2021-08-02 21:12:41 +03:00
neliasso
073f57ae6d 8226721: Missing intrinsics for Math.ceil, floor, rint
Reviewed-by: neliasso, vlivanov, ecaspole
Contributed-by: Jatin Bhateja <jatin.bhateja@intel.com>
2021-08-02 21:12:40 +03:00
bsrbnd
290bc74830 8217561: X86: Add floating-point Math.min/max intrinsics
Summary: Implementation taking care of +/-0.0 and NaN which uses a specific pattern for reductions
Reviewed-by: aph, kvn, neliasso, sviswanathan, adinn
Contributed-by: Jatin Bhateja <jatin.bhateja@intel.com>
2021-08-02 21:12:40 +03:00
dlemmond
f5f49b6e44 8239386: handle ContendedPaddingWidth in vm_version_aarch64
Reviewed-by: aph, phh
2021-08-02 21:12:40 +03:00
dongbo
06383fee91 8255625: AArch64: Implement Base64.encodeBlock accelerator/intrinsic
Reviewed-by: aph
2021-08-02 21:12:39 +03:00
roland
7b69e23a4f 8261812: C2 compilation fails with assert(!had_error) failed: bad dominance
Reviewed-by: kvn, thartmann
2021-08-02 21:12:39 +03:00
dchuyko
046a5eca42 8251525: AARCH64: Faster Math.signum(fp)
Reviewed-by: aph, vlivanov, adinn
2021-08-02 21:12:38 +03:00
vkempik
08ab93fe2b 8240487: Cleanup whitespace in .cc, .hh, .m, and .mm files
Reviewed-by: phh
2021-08-02 21:12:38 +03:00
phh
86c315b268 8265099: Revert backport to 11u of 8236859: WebSocket over authenticating proxy fails with NPE
Summary: Revert https://hg.openjdk.java.net/jdk-updates/jdk11u-dev/rev/57e3fa3574ec
Reviewed-by: clanger
2021-08-02 21:12:37 +03:00
yzhang
95ffcc0b19 8243597: AArch64: Add support for integer vector abs
Reviewed-by: aph
2021-08-02 21:12:37 +03:00
pli
c43bcc5456 8241475: AArch64: Add missing support for PopCountVI node
Reviewed-by: aph, njian
2021-08-02 21:12:36 +03:00
pli
ff0303d69c 8214922: Add vectorization support for fmin/fmax
Reviewed-by: adinn, roland
2021-08-02 21:12:36 +03:00
wetmore
230e3ce141 8254631: Better support ALPN byte wire values in SunJSSE
Reviewed-by: xuelei, dfuchs
2021-08-02 21:12:35 +03:00
vkempik
8c83c11efa 8261397: try catch Method failing to work when dividing an integer by 0
Reviewed-by: phh
2021-08-02 21:12:35 +03:00
dpochepk
f5d030fee1 8222412: AARCH64: multiple instructions encoding issues
Reviewed-by: aph
2021-08-02 21:12:35 +03:00
pli
902d29380e 8216259: AArch64: Vectorize Adler32 intrinsics
Reviewed-by: aph
2021-08-02 21:12:34 +03:00
aph
f31624f8c4 8261649: AArch64: Optimize LSE atomics in C++ code
Reviewed-by: adinn
2021-08-02 21:12:34 +03:00
aph
f754b686b5 8261027: AArch64: Support for LSE atomics C++ HotSpot code
Reviewed-by: adinn, phh
2021-08-02 21:12:33 +03:00
dmarkov
639d675ba3 8262446: DragAndDrop hangs on Windows
Reviewed-by: aivanov, serb, kizune
2021-08-02 21:12:33 +03:00
serb
072ee00a51 8257414: Drag n Drop target area is wrong on high DPI systems
Reviewed-by: serb
Contributed-by: Olga Mikhaltsova <omikhaltcova@openjdk.org>
2021-08-02 21:12:33 +03:00
bell-sw
90c1966233 Revert "JBR-1414 DnD on linux (XToolkit) does not honor HIDPI scale"
This reverts commit db6c43b6
2021-08-02 21:12:32 +03:00
Dmitry Batrak
9fdc75969b JBR-3633 Modal dialog is shown not at the same space as its parent
fix the case when space switch is performed by clicking on app icon in dock, or using Cmd+Tab
2021-07-30 18:59:20 +03:00
Dmitry Batrak
c2cdacaddd JBR-3560 [JCK] java.awt.Dialog should throw java.lang.IllegalArgumentException: Wrong parent window
rollback JBR-1255 fix
2021-07-23 20:26:25 +03:00
Artem Semenov
2e925883d5 JBR-3637: Eliminate JBR build warnings from a11y 2021-07-23 15:59:16 +03:00
Dmitry Batrak
a156c6b9bf JBR-3633 Modal dialog is shown not at the same space as its parent 2021-07-21 14:51:39 +03:00
Dmitry Batrak
75335543f2 JBR-3611 Unexpected workspace switch with dialog in full-screen mode on macOS
make test pass with jtreg
2021-07-21 14:51:39 +03:00
Maxim Kartashev
c9143a3b22 JBR-3626 Apply fix for 8261235 to JBR11
8261235: C1 compilation fails with assert(res->vreg_number() == index) failed: conversion check

Reviewed-by: thartmann, kvn
2021-07-20 08:36:23 -07:00
Vitaly Provodin
8361529140 update the link to JBR for IDEA 2021.2 RC 2021-07-20 14:40:55 +07:00
Maxim Kartashev
2988403307 fixup! JBR-3618 Add info about releases to JBR README on github 2021-07-19 14:53:45 +03:00
Dmitry Batrak
43fdd6cd26 JBR-3611 Unexpected workspace switch with dialog in full-screen mode on macOS 2021-07-19 10:11:44 +03:00
28 changed files with 5165 additions and 193 deletions

View File

@@ -9,22 +9,11 @@ It includes a number enhancements in font rendering, HiDPI support, ligatures, p
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).
### For 2021.2 IDEs
| Release/tag | Date |
| --- | --- |
| [jb11_0_11-b1504.12](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jb11_0_11-b1504.12) | 12-Jul-2021 |
| [jb11_0_11-b1504.8](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jb11_0_11-b1504.8) | 06-Jul-2021 |
| [jb11_0_11-b1504.5](https://confluence.jetbrains.com/pages/viewpage.action?pageId=221478946) | 29-Jun-2021 |
| [jb11_0_11-b1504.3](https://confluence.jetbrains.com/pages/viewpage.action?pageId=218857540) | 15-Jun-2021 |
### For 2020.3 IDEs
| Release/tag | Date |
| --- | --- |
| [jb11_0_11-b1145.115](https://confluence.jetbrains.com/pages/viewpage.action?pageId=219349001) | 21-Jun-2021 |
| [jb11_0_11-b1145.96](https://confluence.jetbrains.com/pages/viewpage.action?pageId=207519955) | 18-Feb-2021 |
| [jb11_0_11-b1145.77](https://confluence.jetbrains.com/pages/viewpage.action?pageId=205389940) | 19-Jan-2021 |
| IDE Version | Latest JBR | Date Released |
| --- | --- | --- |
| 2021.2 | [11_0_11-b1504.13](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jb11_0_11-b1504.13) | 19-Jul-2021 |
| 2021.1 | [11.0.11+9-b1341.60](https://confluence.jetbrains.com/pages/viewpage.action?pageId=218857477) | 15-Jun-2021 |
| 2020.3 | [11_0_11-b1145.115](https://confluence.jetbrains.com/pages/viewpage.action?pageId=219349001) | 21-Jun-2021 |
## Contents
- [Welcome to JetBrains Runtime](#jetbrains-runtime)

View File

@@ -230,8 +230,8 @@ class LIR_OprDesc: public CompilationResourceObj {
, is_xmm_bits = 1
, last_use_bits = 1
, is_fpu_stack_offset_bits = 1 // used in assertion checking on x86 for FPU stack slot allocation
, non_data_bits = kind_bits + type_bits + size_bits + destroys_bits + last_use_bits +
is_fpu_stack_offset_bits + virtual_bits + is_xmm_bits
, non_data_bits = pointer_bits + kind_bits + type_bits + size_bits + destroys_bits + virtual_bits
+ is_xmm_bits + last_use_bits + is_fpu_stack_offset_bits
, data_bits = BitsPerInt - non_data_bits
, reg_bits = data_bits / 2 // for two registers in one value encoding
};
@@ -648,6 +648,11 @@ class LIR_OprFact: public AllStatic {
#endif // X86
static LIR_Opr virtual_register(int index, BasicType type) {
if (index > LIR_OprDesc::vreg_max) {
// Running out of virtual registers. Caller should bailout.
return illegalOpr;
}
LIR_Opr res;
switch (type) {
case T_OBJECT: // fall through

View File

@@ -1047,20 +1047,21 @@ void LIRGenerator::move_to_phi(ValueStack* cur_state) {
LIR_Opr LIRGenerator::new_register(BasicType type) {
int vreg = _virtual_register_number;
// add a little fudge factor for the bailout, since the bailout is
// only checked periodically. This gives a few extra registers to
// hand out before we really run out, which helps us keep from
// tripping over assertions.
if (vreg + 20 >= LIR_OprDesc::vreg_max) {
bailout("out of virtual registers");
if (vreg + 2 >= LIR_OprDesc::vreg_max) {
// wrap it around
int vreg_num = _virtual_register_number;
// Add a little fudge factor for the bailout since the bailout is only checked periodically. This allows us to hand out
// a few extra registers before we really run out which helps to avoid to trip over assertions.
if (vreg_num + 20 >= LIR_OprDesc::vreg_max) {
bailout("out of virtual registers in LIR generator");
if (vreg_num + 2 >= LIR_OprDesc::vreg_max) {
// Wrap it around and continue until bailout really happens to avoid hitting assertions.
_virtual_register_number = LIR_OprDesc::vreg_base;
vreg_num = LIR_OprDesc::vreg_base;
}
}
_virtual_register_number += 1;
return LIR_OprFact::virtual_register(vreg, type);
LIR_Opr vreg = LIR_OprFact::virtual_register(vreg_num, type);
assert(vreg != LIR_OprFact::illegal(), "ran out of virtual registers");
return vreg;
}

View File

@@ -3884,8 +3884,8 @@ void MoveResolver::insert_move(Interval* from_interval, Interval* to_interval) {
assert(_insert_list != NULL && _insert_idx != -1, "must setup insert position first");
assert(_insertion_buffer.lir_list() == _insert_list, "wrong insertion buffer");
LIR_Opr from_opr = LIR_OprFact::virtual_register(from_interval->reg_num(), from_interval->type());
LIR_Opr to_opr = LIR_OprFact::virtual_register(to_interval->reg_num(), to_interval->type());
LIR_Opr from_opr = get_virtual_register(from_interval);
LIR_Opr to_opr = get_virtual_register(to_interval);
if (!_multiple_reads_allowed) {
// the last_use flag is an optimization for FPU stack allocation. When the same
@@ -3903,12 +3903,27 @@ void MoveResolver::insert_move(LIR_Opr from_opr, Interval* to_interval) {
assert(_insert_list != NULL && _insert_idx != -1, "must setup insert position first");
assert(_insertion_buffer.lir_list() == _insert_list, "wrong insertion buffer");
LIR_Opr to_opr = LIR_OprFact::virtual_register(to_interval->reg_num(), to_interval->type());
LIR_Opr to_opr = get_virtual_register(to_interval);
_insertion_buffer.move(_insert_idx, from_opr, to_opr);
TRACE_LINEAR_SCAN(4, tty->print("MoveResolver: inserted move from constant "); from_opr->print(); tty->print_cr(" to %d (%d, %d)", to_interval->reg_num(), to_interval->assigned_reg(), to_interval->assigned_regHi()));
}
LIR_Opr MoveResolver::get_virtual_register(Interval* interval) {
// Add a little fudge factor for the bailout since the bailout is only checked periodically. This allows us to hand out
// a few extra registers before we really run out which helps to avoid to trip over assertions.
int reg_num = interval->reg_num();
if (reg_num + 20 >= LIR_OprDesc::vreg_max) {
_allocator->bailout("out of virtual registers in linear scan");
if (reg_num + 2 >= LIR_OprDesc::vreg_max) {
// Wrap it around and continue until bailout really happens to avoid hitting assertions.
reg_num = LIR_OprDesc::vreg_base;
}
}
LIR_Opr vreg = LIR_OprFact::virtual_register(reg_num, interval->type());
assert(vreg != LIR_OprFact::illegal(), "ran out of virtual registers");
return vreg;
}
void MoveResolver::resolve_mappings() {
TRACE_LINEAR_SCAN(4, tty->print_cr("MoveResolver: resolving mappings for Block B%d, index %d", _insert_list->block() != NULL ? _insert_list->block()->block_id() : -1, _insert_idx));

View File

@@ -430,6 +430,7 @@ class MoveResolver: public StackObj {
void append_insertion_buffer();
void insert_move(Interval* from_interval, Interval* to_interval);
void insert_move(LIR_Opr from_opr, Interval* to_interval);
LIR_Opr get_virtual_register(Interval* interval);
DEBUG_ONLY(void verify_before_resolve();)
void resolve_mappings();

View File

@@ -934,7 +934,7 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent>
int result = LWKeyboardFocusManagerPeer.shouldNativelyFocusHeavyweight(
getTarget(), lightweightChild, temporary,
focusedWindowChangeAllowed, time, cause, false);
focusedWindowChangeAllowed, time, cause, true);
switch (result) {
case LWKeyboardFocusManagerPeer.SNFH_FAILURE:
return false;
@@ -968,15 +968,22 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent>
return false;
}
return parentPeer.requestWindowFocus(cause, () -> {
boolean res = parentPeer.requestWindowFocus(cause);
// If parent window can be made focused and has been made focused (synchronously)
// then we can proceed with children, otherwise we retreat
if (!res || !parentWindow.isFocused()) {
if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("request rejected, res= " + res + ", parentWindow.isFocused()=" +
parentWindow.isFocused());
}
LWKeyboardFocusManagerPeer.removeLastFocusRequest(getTarget());
}, () -> {
KeyboardFocusManagerPeer kfmPeer = LWKeyboardFocusManagerPeer.getInstance();
return false;
}
Component focusOwner = kfmPeer.getCurrentFocusOwner();
LWKeyboardFocusManagerPeer.deliverFocus(lightweightChild,
getTarget(), false, cause, focusOwner);
});
KeyboardFocusManagerPeer kfmPeer = LWKeyboardFocusManagerPeer.getInstance();
Component focusOwner = kfmPeer.getCurrentFocusOwner();
return LWKeyboardFocusManagerPeer.deliverFocus(lightweightChild,
getTarget(), true, cause, focusOwner);
case LWKeyboardFocusManagerPeer.SNFH_SUCCESS_HANDLED:
return true;
@@ -1342,7 +1349,7 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent>
public Point windowToLocal(Point p, LWWindowPeer wp) {
LWComponentPeer<?, ?> cp = this;
while (cp != wp) {
while (cp != wp && cp != null) {
Rectangle cpb = cp.getBounds();
p.x -= cpb.x;
p.y -= cpb.y;

View File

@@ -61,18 +61,18 @@ public class LWLightweightFramePeer extends LWWindowPeer implements OverrideNati
}
@Override
public boolean requestWindowFocus(FocusEvent.Cause cause, Runnable r, Runnable lightweightRequest) {
public boolean requestWindowFocus(FocusEvent.Cause cause) {
if (!focusAllowedFor()) {
return false;
}
/*if (getPlatformWindow().rejectFocusRequest(cause)) {
if (getPlatformWindow().rejectFocusRequest(cause)) {
return false;
}*/
}
Window opposite = LWKeyboardFocusManagerPeer.getInstance().
getCurrentFocusedWindow();
changeFocusedWindow(true, opposite, () -> {});
changeFocusedWindow(true, opposite);
return true;
}

View File

@@ -290,24 +290,14 @@ public class LWWindowPeer
if (!getTarget().isAutoRequestFocus()) {
return;
} else {
requestWindowFocus(FocusEvent.Cause.ACTIVATION, () -> {}, () -> {});
requestWindowFocus(FocusEvent.Cause.ACTIVATION);
}
// Focus the owner in case this window is focused.
} else if (kfmPeer.getCurrentFocusedWindow() == getTarget()) {
// Transfer focus to the owner.
Window targetOwner = LWWindowPeer.this.getTarget().getOwner();
while (targetOwner != null && (targetOwner.getOwner() != null && !targetOwner.isFocusableWindow())) {
targetOwner = targetOwner.getOwner();
}
if (targetOwner != null) {
LWWindowPeer owner = (LWWindowPeer) AWTAccessor.getComponentAccessor().getPeer(targetOwner);
if (owner != null) {
owner.requestWindowFocus(FocusEvent.Cause.ACTIVATION, () -> {}, () -> {});
}
LWWindowPeer owner = getOwnerFrameDialog(LWWindowPeer.this);
if (owner != null) {
owner.requestWindowFocus(FocusEvent.Cause.ACTIVATION);
}
}
}
@@ -785,7 +775,7 @@ public class LWWindowPeer
@Override
public void notifyActivation(boolean activation, LWWindowPeer opposite) {
Window oppositeWindow = (opposite == null)? null : opposite.getTarget();
changeFocusedWindow(activation, oppositeWindow, () -> {});
changeFocusedWindow(activation, oppositeWindow);
}
// MouseDown in non-client area
@@ -902,7 +892,7 @@ public class LWWindowPeer
// 2. An active but not focused owner frame/dialog is clicked.
// The mouse event then will trigger a focus request "in window" to the component, so the window
// should gain focus before.
requestWindowFocus(FocusEvent.Cause.MOUSE_EVENT, () -> {}, () -> {});
requestWindowFocus(FocusEvent.Cause.MOUSE_EVENT);
mouseDownTarget[targetIdx] = targetPeer;
} else if (id == MouseEvent.MOUSE_DRAGGED) {
@@ -1258,19 +1248,17 @@ public class LWWindowPeer
* Requests platform to set native focus on a frame/dialog.
* In case of a simple window, triggers appropriate java focus change.
*/
public boolean requestWindowFocus(FocusEvent.Cause cause, Runnable rejectFocusRequest, Runnable lightweightRequest) {
public boolean requestWindowFocus(FocusEvent.Cause cause) {
if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("requesting native focus to " + this);
}
if (!focusAllowedFor()) {
focusLog.fine("focus is not allowed");
rejectFocusRequest.run();
return false;
}
if (platformWindow.rejectFocusRequest(cause)) {
rejectFocusRequest.run();
return false;
}
@@ -1285,19 +1273,13 @@ public class LWWindowPeer
// In case the toplevel is active but not focused, change focus directly,
// as requesting native focus on it will not have effect.
if (getTarget() == currentActive && !getTarget().isFocused()) {
changeFocusedWindow(true, opposite, lightweightRequest);
if (getTarget() == currentActive && !getTarget().hasFocus()) {
changeFocusedWindow(true, opposite);
return true;
}
focusLog.fine("platformWindow.requestWindowFocus()");
boolean requestFocusResult = platformWindow.requestWindowFocus();
if (requestFocusResult) {
lightweightRequest.run();
return true;
}
return false;
return platformWindow.requestWindowFocus();
}
protected boolean focusAllowedFor() {
@@ -1325,7 +1307,7 @@ public class LWWindowPeer
@Override
public void emulateActivation(boolean activate) {
changeFocusedWindow(activate, null, () -> {});
changeFocusedWindow(activate, null);
}
@SuppressWarnings("deprecation")
@@ -1344,7 +1326,7 @@ public class LWWindowPeer
/*
* Changes focused window on java level.
*/
protected void changeFocusedWindow(boolean becomesFocused, Window opposite, Runnable lightweightRequestRunnable) {
protected void changeFocusedWindow(boolean becomesFocused, Window opposite) {
if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine((becomesFocused?"gaining":"loosing") + " focus window: " + this);
}
@@ -1383,22 +1365,19 @@ public class LWWindowPeer
}
KeyboardFocusManagerPeer kfmPeer = LWKeyboardFocusManagerPeer.getInstance();
if (!becomesFocused && kfmPeer.getCurrentFocusedWindow() != getTarget()) {
// late window focus lost event - ingoring
return;
}
kfmPeer.setCurrentFocusedWindow(becomesFocused ? getTarget() : null);
int eventID = becomesFocused ? WindowEvent.WINDOW_GAINED_FOCUS : WindowEvent.WINDOW_LOST_FOCUS;
WindowEvent windowEvent = new TimedWindowEvent(getTarget(), eventID, opposite, System.currentTimeMillis());
SunToolkit.setSystemGenerated(windowEvent);
AWTAccessor.getAWTEventAccessor().setPosted(windowEvent);
PeerEvent pe = new PeerEvent(getTarget(), () -> {
((Component)windowEvent.getSource()).dispatchEvent(windowEvent);
if (becomesFocused) {
lightweightRequestRunnable.run();
}
}, PeerEvent.ULTIMATE_PRIORITY_EVENT);
// TODO: wrap in SequencedEvent
postEvent(pe);
SunToolkit.postPriorityEvent(windowEvent);
}
/*
@@ -1519,4 +1498,4 @@ public class LWWindowPeer
}
return handle[0];
}
}
}

View File

@@ -35,6 +35,7 @@ import java.awt.FontMetrics;
import java.awt.Frame;
import java.awt.GraphicsDevice;
import java.awt.Insets;
import java.awt.KeyboardFocusManager;
import java.awt.MenuBar;
import java.awt.Point;
import java.awt.Rectangle;
@@ -42,9 +43,11 @@ import java.awt.Toolkit;
import java.awt.Window;
import java.awt.event.FocusEvent;
import java.awt.event.WindowEvent;
import java.awt.peer.ComponentPeer;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.lang.reflect.InvocationTargetException;
import java.security.AccessController;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
@@ -69,11 +72,8 @@ import sun.lwawt.LWToolkit;
import sun.lwawt.LWWindowPeer;
import sun.lwawt.LWWindowPeer.PeerType;
import sun.lwawt.PlatformWindow;
import sun.util.logging.PlatformLogger;
import java.security.AccessController;
import sun.security.action.GetPropertyAction;
import sun.util.logging.PlatformLogger;
public class CPlatformWindow extends CFRetainedResource implements PlatformWindow {
@@ -107,6 +107,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
private static native void nativeEnterFullScreenMode(long nsWindowPtr);
private static native void nativeExitFullScreenMode(long nsWindowPtr);
static native CPlatformWindow nativeGetTopmostPlatformWindowUnderMouse();
private static native boolean nativeDelayShowing(long nsWindowPtr);
// Loger to report issues happened during execution but that do not affect functionality
private static final PlatformLogger logger = PlatformLogger.getLogger("sun.lwawt.macosx.CPlatformWindow");
@@ -733,6 +734,16 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
return this.visible;
}
private static LWWindowPeer getBlockerFor(Window window) {
if (window != null) {
ComponentPeer peer = AWTAccessor.getComponentAccessor().getPeer(window);
if (peer instanceof LWWindowPeer) {
return ((LWWindowPeer)peer).getBlocker();
}
}
return null;
}
@Override // PlatformWindow
public void setVisible(boolean visible) {
// Configure stuff
@@ -749,7 +760,17 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
// Actually show or hide the window
LWWindowPeer blocker = (peer == null)? null : peer.getBlocker();
if (blocker == null || !visible) {
if (visible && delayShowing()) {
if (blocker == null) {
Window focusedWindow = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusedWindow();
LWWindowPeer focusedWindowBlocker = getBlockerFor(focusedWindow);
if (focusedWindowBlocker == peer) {
// try to switch to target space if we're adding a modal dialog
// that would block currently focused window
owner.execute(CWrapper.NSWindow::orderFront);
}
}
} else if (blocker == null || !visible) {
// If it ain't blocked, or is being hidden, go regular way
if (visible) {
boolean isPopup = (target.getType() == Window.Type.POPUP);
@@ -844,7 +865,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
// Manage parent-child relationship when showing
final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
if (visible) {
if (visible && !delayShowing()) {
// Order myself above my parent
if (owner != null && owner.isVisible()) {
owner.execute(ownerPtr -> {
@@ -876,7 +897,10 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
// Deal with the blocker of the window being shown
if (blocker != null && visible) {
// Make sure the blocker is above its siblings
((CPlatformWindow)blocker.getPlatformWindow()).orderAboveSiblings();
CPlatformWindow blockerWindow = (CPlatformWindow) blocker.getPlatformWindow();
if (!blockerWindow.delayShowing()) {
blockerWindow.orderAboveSiblings();
}
}
}
@@ -911,6 +935,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
@Override // PlatformWindow
public void toFront() {
if (delayShowing()) return;
LWCToolkit lwcToolkit = (LWCToolkit) Toolkit.getDefaultToolkit();
Window w = DefaultKeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow();
final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
@@ -965,6 +990,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
@Override
public boolean requestWindowFocus() {
if (delayShowing()) return false;
execute(ptr -> {
if (CWrapper.NSWindow.canBecomeMainWindow(ptr)) {
CWrapper.NSWindow.makeMainWindow(ptr);
@@ -983,6 +1009,17 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
return ref.get();
}
// We want a window to be always shown at the same space as its owning window.
// But macOS doesn't have an API to control the target space for a window -
// it's always shown at the active space. So if the target space isn't active now,
// the only way to achieve our goal seems to be delaying the appearance of the
// window till the target space becomes active.
private boolean delayShowing() {
AtomicBoolean ref = new AtomicBoolean(false);
execute(ptr -> ref.set(nativeDelayShowing(ptr)));
return ref.get();
}
@Override
public void updateFocusableWindowState() {
setStyleBits(SHOULD_BECOME_KEY | SHOULD_BECOME_MAIN, getFocusableStyleBits()); // set both bits at once
@@ -1101,7 +1138,6 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
}
nativeSetEnabled(ptr, !blocked);
});
checkBlockingAndOrder();
}
public final void invalidateShadow() {
@@ -1279,29 +1315,32 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
isFocusable ? focusableStyleBits : 0); // set both bits at once
}
private boolean checkBlockingAndOrder() {
private void checkBlockingAndOrder() {
LWWindowPeer blocker = (peer == null)? null : peer.getBlocker();
if (blocker == null) {
return false;
// If it's not blocked, make sure it's above its siblings
orderAboveSiblings();
return;
}
if (blocker instanceof CPrinterDialogPeer) {
return true;
return;
}
CPlatformWindow pWindow = (CPlatformWindow)blocker.getPlatformWindow();
pWindow.orderAboveSiblings();
if (!pWindow.delayShowing()) {
pWindow.orderAboveSiblings();
pWindow.execute(ptr -> {
if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine("Focus blocker " + Long.toHexString(ptr));
}
CWrapper.NSWindow.orderFrontRegardless(ptr);
CWrapper.NSWindow.makeKeyAndOrderFront(ptr);
CWrapper.NSWindow.makeMainWindow(ptr);
});
return true;
pWindow.execute(ptr -> {
if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine("Focus blocker " + Long.toHexString(ptr));
}
CWrapper.NSWindow.orderFrontRegardless(ptr);
CWrapper.NSWindow.makeKeyAndOrderFront(ptr);
CWrapper.NSWindow.makeMainWindow(ptr);
});
}
}
private boolean isIconified() {
@@ -1363,7 +1402,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
if (p instanceof LWWindowPeer) {
CPlatformWindow pw = (CPlatformWindow)((LWWindowPeer)p).getPlatformWindow();
iconified = isIconified();
if (pw != null && pw.isVisible() && !iconified) {
if (pw != null && pw.isVisible() && !iconified && !pw.delayShowing()) {
// If the window is one of ancestors of 'main window' or is going to become main by itself,
// the window should be ordered above its siblings; otherwise the window is just ordered
// above its nearest parent.
@@ -1435,9 +1474,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
private void windowDidBecomeMain() {
lastBecomeMainTime = System.currentTimeMillis();
if (checkBlockingAndOrder()) return;
// If it's not blocked, make sure it's above its siblings
orderAboveSiblings();
checkBlockingAndOrder();
}
private void windowWillEnterFullScreen() {

View File

@@ -376,9 +376,10 @@ AWT_NS_WINDOW_IMPLEMENTATION
if (IS(mask, FULLSCREENABLE) && [self.nsWindow respondsToSelector:@selector(toggleFullScreen:)]) {
if (IS(bits, FULLSCREENABLE)) {
[self.nsWindow setCollectionBehavior:(1 << 7) /*NSWindowCollectionBehaviorFullScreenPrimary*/];
[self.nsWindow setCollectionBehavior:
NSWindowCollectionBehaviorFullScreenPrimary | NSWindowCollectionBehaviorManaged];
} else {
[self.nsWindow setCollectionBehavior:NSWindowCollectionBehaviorDefault];
[self.nsWindow setCollectionBehavior: NSWindowCollectionBehaviorManaged];
}
}
@@ -441,10 +442,6 @@ AWT_ASSERT_APPKIT_THREAD;
self.ownerWindow = owner;
[self setPropertiesForStyleBits:styleBits mask:MASK(_METHOD_PROP_BITMASK)];
if (IS(self.styleBits, IS_POPUP)) {
[self.nsWindow setCollectionBehavior:(1 << 8) /*NSWindowCollectionBehaviorFullScreenAuxiliary*/];
}
self.javaWindowTabbingMode = [self getJavaWindowTabbingMode];
self.isEnterFullScreen = NO;
self.isJustCreated = YES;
@@ -601,6 +598,61 @@ AWT_ASSERT_APPKIT_THREAD;
return isVisible;
}
- (BOOL) delayShowing {
AWT_ASSERT_APPKIT_THREAD;
return ownerWindow != nil && ([ownerWindow delayShowing] || !ownerWindow.nsWindow.onActiveSpace)
&& !nsWindow.visible;
}
- (void) checkBlockingAndOrder {
AWT_ASSERT_APPKIT_THREAD;
JNIEnv *env = [ThreadUtilities getJNIEnv];
jobject platformWindow = [self.javaPlatformWindow jObjectWithEnv:env];
if (platformWindow != NULL) {
static JNF_MEMBER_CACHE(jm_checkBlockingAndOrder, jc_CPlatformWindow,
"checkBlockingAndOrder", "()V");
JNFCallVoidMethod(env, platformWindow, jm_checkBlockingAndOrder);
(*env)->DeleteLocalRef(env, platformWindow);
}
}
+ (void)activeSpaceDidChange {
AWT_ASSERT_APPKIT_THREAD;
for (NSWindow* window in [NSApp windows]) {
if (window.onActiveSpace && window.mainWindow && [AWTWindow isJavaPlatformWindowVisible:window]) {
AWTWindow *awtWindow = (AWTWindow *)[window delegate];
// there can be only one current blocker per window hierarchy,
// so we're checking just hierarchy root
if (awtWindow.ownerWindow == nil) {
// this should ensure that delayed blocking windows
// show up on space activation
[awtWindow checkBlockingAndOrder];
}
}
}
}
- (void) processVisibleChildren:(void(^)(AWTWindow*))action {
NSEnumerator *windowEnumerator = [[NSApp windows]objectEnumerator];
NSWindow *window;
while ((window = [windowEnumerator nextObject]) != nil) {
if ([AWTWindow isJavaPlatformWindowVisible:window]) {
AWTWindow *awtWindow = (AWTWindow *)[window delegate];
AWTWindow *parent = awtWindow.ownerWindow;
while (parent != nil) {
if (parent == self) {
action(awtWindow);
break;
}
parent = parent.ownerWindow;
}
}
}
}
// Orders window's childs based on the current focus state
- (void) orderChildWindows:(BOOL)focus {
AWT_ASSERT_APPKIT_THREAD;
@@ -610,37 +662,28 @@ AWT_ASSERT_APPKIT_THREAD;
return;
}
NSEnumerator *windowEnumerator = [[NSApp windows]objectEnumerator];
NSWindow *window;
while ((window = [windowEnumerator nextObject]) != nil) {
if ([AWTWindow isJavaPlatformWindowVisible:window]) {
AWTWindow *awtWindow = (AWTWindow *)[window delegate];
AWTWindow *owner = awtWindow.ownerWindow;
if (IS(awtWindow.styleBits, ALWAYS_ON_TOP)) {
// Do not order 'always on top' windows
continue;
[self processVisibleChildren:^void(AWTWindow* child){
// Do not order 'always on top' windows
if (!IS(child.styleBits, ALWAYS_ON_TOP)) {
NSWindow *window = child.nsWindow;
NSWindow *owner = child.ownerWindow.nsWindow;
if (focus) {
// Move the childWindow to floating level
// so it will appear in front of its
// parent which owns the focus
[window setLevel:NSFloatingWindowLevel];
} else {
// Focus owner has changed, move the childWindow
// back to normal window level
[window setLevel:NSNormalWindowLevel];
}
while (awtWindow.ownerWindow != nil) {
if (awtWindow.ownerWindow == self) {
if (focus) {
// Move the childWindow to floating level
// so it will appear in front of its
// parent which owns the focus
[window setLevel:NSFloatingWindowLevel];
} else {
// Focus owner has changed, move the childWindow
// back to normal window level
[window setLevel:NSNormalWindowLevel];
}
// The childWindow should be displayed in front of
// its nearest parentWindow
[window orderWindow:NSWindowAbove relativeTo:[owner.nsWindow windowNumber]];
break;
}
awtWindow = awtWindow.ownerWindow;
if (window.onActiveSpace && owner.onActiveSpace) {
// The childWindow should be displayed in front of
// its nearest parentWindow
[window orderWindow:NSWindowAbove relativeTo:[owner windowNumber]];
}
}
}
}];
}
// NSWindow overrides
@@ -668,14 +711,7 @@ AWT_ASSERT_APPKIT_THREAD;
// We should bring up the modal dialog manually
[AWTToolkit eventCountPlusPlus];
JNIEnv *env = [ThreadUtilities getJNIEnv];
jobject platformWindow = [self.javaPlatformWindow jObjectWithEnv:env];
if (platformWindow != NULL) {
static JNF_MEMBER_CACHE(jm_checkBlockingAndOrder, jc_CPlatformWindow,
"checkBlockingAndOrder", "()Z");
JNFCallBooleanMethod(env, platformWindow, jm_checkBlockingAndOrder);
(*env)->DeleteLocalRef(env, platformWindow);
}
[self checkBlockingAndOrder];
}
return self.isEnabled && IS(self.styleBits, SHOULD_BECOME_MAIN);
@@ -754,24 +790,14 @@ AWT_ASSERT_APPKIT_THREAD;
- (void) iconifyChildWindows:(BOOL)iconify {
AWT_ASSERT_APPKIT_THREAD;
NSEnumerator *windowEnumerator = [[NSApp windows]objectEnumerator];
NSWindow *window;
while ((window = [windowEnumerator nextObject]) != nil) {
if ([AWTWindow isJavaPlatformWindowVisible:window]) {
AWTWindow *awtWindow = (AWTWindow *)[window delegate];
while (awtWindow.ownerWindow != nil) {
if (awtWindow.ownerWindow == self) {
if (iconify) {
[window orderOut:window];
} else {
[window orderFront:window];
}
break;
}
awtWindow = awtWindow.ownerWindow;
}
[self processVisibleChildren:^void(AWTWindow* child){
NSWindow *window = child.nsWindow;
if (iconify) {
[window orderOut:window];
} else {
[window orderFront:window];
}
}
}];
}
- (void) _deliverIconify:(BOOL)iconify {
@@ -974,10 +1000,22 @@ AWT_ASSERT_APPKIT_THREAD;
}
}
// this is required to move owned windows to the full-screen space when owner goes to full-screen mode
- (void)allowMovingChildrenBetweenSpaces:(BOOL)allow {
[self processVisibleChildren:^void(AWTWindow* child){
NSWindow *window = child.nsWindow;
NSWindowCollectionBehavior behavior = window.collectionBehavior;
behavior &= !(NSWindowCollectionBehaviorManaged | NSWindowCollectionBehaviorTransient);
behavior |= allow ? NSWindowCollectionBehaviorTransient : NSWindowCollectionBehaviorManaged;
window.collectionBehavior = behavior;
}];
}
- (void)windowWillEnterFullScreen:(NSNotification *)notification {
self.isEnterFullScreen = YES;
[self allowMovingChildrenBetweenSpaces:YES];
static JNF_MEMBER_CACHE(jm_windowWillEnterFullScreen, jc_CPlatformWindow, "windowWillEnterFullScreen", "()V");
JNIEnv *env = [ThreadUtilities getJNIEnv];
jobject platformWindow = [self.javaPlatformWindow jObjectWithEnv:env];
@@ -990,7 +1028,9 @@ AWT_ASSERT_APPKIT_THREAD;
- (void)windowDidEnterFullScreen:(NSNotification *)notification {
self.isEnterFullScreen = YES;
[self allowMovingChildrenBetweenSpaces:NO];
static JNF_MEMBER_CACHE(jm_windowDidEnterFullScreen, jc_CPlatformWindow, "windowDidEnterFullScreen", "()V");
JNIEnv *env = [ThreadUtilities getJNIEnv];
jobject platformWindow = [self.javaPlatformWindow jObjectWithEnv:env];
@@ -1805,3 +1845,25 @@ JNF_COCOA_ENTER(env);
JNF_COCOA_EXIT(env);
}
/*
* Class: sun_lwawt_macosx_CPlatformWindow
* Method: nativeDelayShowing
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeDelayShowing
(JNIEnv *env, jclass clazz, jlong windowPtr)
{
__block jboolean result = JNI_FALSE;
JNF_COCOA_ENTER(env);
NSWindow *nsWindow = (NSWindow *)jlong_to_ptr(windowPtr);
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){
AWTWindow *window = (AWTWindow*)[nsWindow delegate];
result = [window delayShowing];
}];
JNF_COCOA_EXIT(env);
return result;
}

View File

@@ -38,7 +38,7 @@
#import "CMenuBar.h"
#import "ThreadUtilities.h"
#import "NSApplicationAWT.h"
#import "AWTWindow.h"
#pragma mark App Menu helpers
@@ -258,6 +258,11 @@ AWT_ASSERT_APPKIT_THREAD;
[ctr addObserver:clz selector:@selector(_appDidHide) name:NSApplicationDidHideNotification object:nil];
[ctr addObserver:clz selector:@selector(_appDidUnhide) name:NSApplicationDidUnhideNotification object:nil];
[[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:[AWTWindow class]
selector:@selector(activeSpaceDidChange)
name:NSWorkspaceActiveSpaceDidChangeNotification
object:nil];
return self;
}

View File

@@ -33,8 +33,7 @@ static JNF_STATIC_MEMBER_CACHE(jm_getChildrenAndRoles, sjc_CAccessibility, "getC
NSUInteger childIndex = [self columnNumberInTable];
int inc = [(JavaTableAccessibility *)[self accessibilityParent] accessibleColCount] * 2;
NSInteger i = childIndex * 2;
for(NSInteger i; i < arrayLen; i += inc)
for(NSInteger i = childIndex * 2; i < arrayLen; i += inc)
{
jobject /* Accessible */ jchild = (*env)->GetObjectArrayElement(env, jchildrenAndRoles, i);
jobject /* String */ jchildJavaRole = (*env)->GetObjectArrayElement(env, jchildrenAndRoles, i+1);

View File

@@ -545,11 +545,6 @@ static void RaiseMustOverrideException(NSString *method)
return size;
}
- (id)getFocusedElement
{
}
- (jobject)accessible {
return fAccessible;
}
@@ -590,13 +585,13 @@ static void RaiseMustOverrideException(NSString *method)
if (axAction != NULL) {
JNF_CLASS_CACHE(jc_AccessibleAction, "javax/accessibility/AccessibleAction");
JNF_MEMBER_CACHE(jm_getAccessibleActionCount, jc_AccessibleAction, "getAccessibleActionCount", "()I");
jint count = JNFCallObjectMethod(env, axAction, jm_getAccessibleActionCount);
jint count = JNFCallIntMethod(env, axAction, jm_getAccessibleActionCount);
fActions = [[NSMutableDictionary alloc] initWithCapacity:count];
fActionSElectors = [[NSMutableArray alloc] initWithCapacity:count];
for (int i =0; i < count; i++) {
JavaAxAction *action = [[JavaAxAction alloc] initWithEnv:env withAccessibleAction:axAction withIndex:i withComponent:fComponent];
if ([fParent isKindOfClass:[JavaComponentAccessibility class]] &&
[fParent isMenu] &&
[(JavaComponentAccessibility *)fParent isMenu] &&
[[sActions objectForKey:[action getDescription]] isEqualToString:NSAccessibilityPressAction]) {
[fActions setObject:action forKey:NSAccessibilityPickAction];
[fActionSElectors addObject:[sActionSelectores objectForKey:NSAccessibilityPickAction]];
@@ -878,16 +873,16 @@ static void RaiseMustOverrideException(NSString *method)
// cmcnote - should batch these two calls into one that returns an array of two bools, one for vertical and one for horiz
if (isVertical(env, axContext, fComponent)) {
(*env)->DeleteLocalRef(env, axContext);
return NSAccessibilityVerticalOrientationValue;
return NSAccessibilityOrientationVertical;
}
if (isHorizontal(env, axContext, fComponent)) {
(*env)->DeleteLocalRef(env, axContext);
return NSAccessibilityHorizontalOrientationValue;
return NSAccessibilityOrientationHorizontal;
}
(*env)->DeleteLocalRef(env, axContext);
return nil;
return NSAccessibilityOrientationUnknown;
}
- (NSPoint)accessibilityActivationPoint

View File

@@ -56,7 +56,7 @@ static JNF_STATIC_MEMBER_CACHE(sjm_getAccessibleName, sjc_CAccessibility, "getAc
JNIEnv *env = [ThreadUtilities getJNIEnv];
static JNF_STATIC_MEMBER_CACHE(jm_getLineNumberForIndex, sjc_CAccessibleText, "getLineNumberForIndex", "(Ljavax/accessibility/Accessible;Ljava/awt/Component;I)I");
jint row = JNFCallStaticIntMethod(env, jm_getLineNumberForIndex, fAccessible, fComponent, index); // AWT_THREADING Safe (AWTRunLoop)
if (row < 0) return nil;
if (row < 0) return 0;
return row;
}
@@ -168,7 +168,7 @@ static JNF_STATIC_MEMBER_CACHE(sjm_getAccessibleName, sjc_CAccessibility, "getAc
JNIEnv *env = [ThreadUtilities getJNIEnv];
static JNF_STATIC_MEMBER_CACHE(jm_getLineNumberForInsertionPoint, sjc_CAccessibleText, "getLineNumberForInsertionPoint", "(Ljavax/accessibility/Accessible;Ljava/awt/Component;)I");
jint row = JNFCallStaticIntMethod(env, jm_getLineNumberForInsertionPoint, fAccessible, fComponent); // AWT_THREADING Safe (AWTRunLoop)
if (row < 0) return nil;
if (row < 0) return 0;
return row;
}

View File

@@ -42,7 +42,10 @@ static BOOL javaObjectEquals(JNIEnv *env, jobject a, jobject b, jobject componen
// NSAccessibilityElement protocol methods
- (NSAccessibilitySubrole)accessibilitySubrole {
return NSAccessibilityTabButtonSubrole;
if (@available(macOS 10.13, *)) {
return NSAccessibilityTabButtonSubrole;
}
return NSAccessibilityUnknownSubrole;
}
- (id)accessibilityValue {

View File

@@ -35,9 +35,8 @@ static JNF_STATIC_MEMBER_CACHE(jm_getChildrenAndRoles, sjc_CAccessibility, "getC
NSMutableArray *childrenCells = [NSMutableArray arrayWithCapacity:arrayLen/2];
NSUInteger childIndex = [self rowNumberInTable] * [(JavaTableAccessibility *)parent accessibleColCount];
NSInteger i = childIndex * 2;
NSInteger n = ([self rowNumberInTable] + 1) * [(JavaTableAccessibility *)parent accessibleColCount] * 2;
for(i; i < n; i+=2)
for (NSInteger i = childIndex * 2; i < n; i+=2)
{
jobject /* Accessible */ jchild = (*env)->GetObjectArrayElement(env, jchildrenAndRoles, i);
jobject /* String */ jchildJavaRole = (*env)->GetObjectArrayElement(env, jchildrenAndRoles, i+1);

View File

@@ -663,6 +663,13 @@ public class Dialog extends Window {
public Dialog(Window owner, String title, ModalityType modalityType) {
super(owner);
if ((owner != null) &&
!(owner instanceof Frame) &&
!(owner instanceof Dialog))
{
throw new IllegalArgumentException("Wrong parent window");
}
this.title = title;
setModalityType(modalityType);
SunToolkit.checkAndSetPolicy(this);

View File

@@ -1071,7 +1071,13 @@ public class Window extends Container implements Accessible {
} else {
// fix for 6532736: after this window is shown, its blocker
// should be raised to front
modalBlocker.toFront_NoClientCode();
boolean storedValue = modalBlocker.isAutoRequestFocus();
modalBlocker.setAutoRequestFocus(false);
try {
modalBlocker.toFront_NoClientCode();
} finally {
modalBlocker.setAutoRequestFocus(storedValue);
}
}
if (this instanceof Frame || this instanceof Dialog) {
updateChildFocusableWindowState(this);

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,45 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* 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.
*/
/*
* @test
* @bug 8261235
* @requires vm.compiler1.enabled
* @summary Tests custom bytecode which requires too many virtual registers in the linear scan of C1.
* The test should bail out in C1.
*
* @compile TestTooManyVirtualRegisters.jasm
* @run main/othervm -Xbatch -XX:CompileCommand=dontinline,compiler.c1.TestExceptionBlockWithPredecessors::*
* compiler.c1.TestTooManyVirtualRegistersMain
*/
package compiler.c1;
public class TestTooManyVirtualRegistersMain {
public static void main(String[] args) {
for (char i = 0; i < 10000; i++) {
TestTooManyVirtualRegisters.test(i);
}
}
}

View File

@@ -0,0 +1,112 @@
/*
* Copyright 2021 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.
*
* 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.
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
/**
* @test
* @summary Regression test for JBR-3662 Focus jumps to another project tab after closing modal dialog
* @key headful
*/
public class WrongFrameFocusedOnModalDialogClosing {
private static final CompletableFuture<Boolean> dialogShown = new CompletableFuture<>();
private static CompletableFuture<Boolean> result;
private static Robot robot;
private static JFrame frame1;
private static JFrame frame2;
private static JButton button;
public static void main(String[] args) throws Exception {
robot = new Robot();
try {
SwingUtilities.invokeAndWait(WrongFrameFocusedOnModalDialogClosing::initUI);
robot.delay(1000); // wait for frames to appear
clickOn(button);
dialogShown.get(5, TimeUnit.SECONDS);
if (result.get(5, TimeUnit.SECONDS)) {
throw new RuntimeException("Wrong frame focused");
}
} finally {
SwingUtilities.invokeAndWait(WrongFrameFocusedOnModalDialogClosing::disposeUI);
}
}
private static void initUI() {
frame1 = new JFrame("WFFOMDC 1");
frame1.addWindowFocusListener(new WindowAdapter() {
@Override
public void windowGainedFocus(WindowEvent e) {
if (result != null) result.complete(false);
}
});
button = new JButton("Open dialog");
button.addActionListener(e -> {
JDialog d = new JDialog(frame1, true);
d.addWindowListener(new WindowAdapter() {
@Override
public void windowOpened(WindowEvent e) {
result = new CompletableFuture<>();
dialogShown.complete(true);
d.dispose();
}
});
d.setVisible(true);
});
frame1.add(button);
frame1.setSize(100, 100);
frame1.setLocation(100, 100);
frame1.setVisible(true);
frame2 = new JFrame("WFFOMDC 2");
frame2.addWindowFocusListener(new WindowAdapter() {
@Override
public void windowGainedFocus(WindowEvent e) {
if (result != null) result.complete(true);
}
});
frame2.setSize(100, 100);
frame2.setLocation(300, 100);
frame2.setVisible(true);
}
private static void disposeUI() {
if (frame1 != null) frame1.dispose();
if (frame2 != null) frame2.dispose();
}
private static void clickAt(int x, int y) {
robot.mouseMove(x, y);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
}
private static void clickOn(Component component) {
Point location = component.getLocationOnScreen();
clickAt(location.x + component.getWidth() / 2, location.y + component.getHeight() / 2);
}
}

View File

@@ -0,0 +1,121 @@
/*
* Copyright 2000-2021 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.
*
* 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.
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.KeyEvent;
import java.io.File;
import java.nio.file.Files;
/**
* @test
* @summary Regression test for JBR-3671 Window order changes for a background app on macOS desktop space switch
* @key headful
* @requires (os.family == "mac")
*/
public class BackgroundWindowOrderOnSpaceChange {
private static Robot robot;
private static JFrame frame1;
private static JFrame frame2;
private static Process otherProcess;
public static void main(String[] args) throws Exception {
robot = new Robot();
try {
SwingUtilities.invokeAndWait(BackgroundWindowOrderOnSpaceChange::initUI);
launchProcessWithWindow();
switchToNextSpace();
switchToPreviousSpace();
Color color = robot.getPixelColor(400, 400);
if (!Color.green.equals(color)) {
throw new RuntimeException("Frame 1 isn't shown on top. Found color: " + color);
}
}
finally {
SwingUtilities.invokeAndWait(BackgroundWindowOrderOnSpaceChange::disposeUI);
}
}
private static void initUI() {
frame1 = new JFrame("BackgroundWindowOrderOnSpaceChange 1");
frame1.getContentPane().setBackground(Color.green);
frame1.setBounds(100, 100, 400, 400);
frame1.setVisible(true);
frame2 = new JFrame("BackgroundWindowOrderOnSpaceChange 2");
frame2.getContentPane().setBackground(Color.red);
frame2.setBounds(300, 300, 400, 400);
frame2.setVisible(true);
frame1.toFront();
}
private static void disposeUI() {
if (frame1 != null) frame1.dispose();
if (frame2 != null) frame2.dispose();
if (otherProcess != null) otherProcess.destroyForcibly();
}
private static void launchProcessWithWindow() throws Exception {
String javaPath = System.getProperty("java.home") + File.separator + "bin" + File.separator + "java";
File tmpFile = File.createTempFile("BackgroundWindowOrderOnSpaceChange", ".java");
tmpFile.deleteOnExit();
Files.writeString(tmpFile.toPath(), "import javax.swing.*;\n" +
"import java.awt.event.*;\n" +
"\n" +
"public class TestWindow {\n" +
" public static void main(String[] args) {\n" +
" SwingUtilities.invokeLater(() -> {\n" +
" JFrame f = new JFrame(\"BackgroundWindowOrderOnSpaceChange 3\");\n" +
" f.addWindowFocusListener(new WindowAdapter() {\n" +
" @Override\n" +
" public void windowGainedFocus(WindowEvent e) {\n" +
" System.out.println();\n" +
" }\n" +
" });\n" +
" f.setBounds(800, 100, 200, 200);\n" +
" f.setVisible(true);\n" +
" });\n" +
" }\n" +
"}\n");
otherProcess = Runtime.getRuntime().exec(new String[]{javaPath, tmpFile.getAbsolutePath()});
if (otherProcess.getInputStream().read() == -1) {
throw new RuntimeException("Error starting process");
}
}
private static void switchToPreviousSpace() {
robot.keyPress(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_LEFT);
robot.keyRelease(KeyEvent.VK_LEFT);
robot.keyRelease(KeyEvent.VK_CONTROL);
robot.delay(1000); // wait for animation to finish
}
private static void switchToNextSpace() {
robot.keyPress(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_RIGHT);
robot.keyRelease(KeyEvent.VK_RIGHT);
robot.keyRelease(KeyEvent.VK_CONTROL);
robot.delay(1000); // wait for animation to finish
}
}

View File

@@ -0,0 +1,129 @@
/*
* Copyright 2021 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.
*
* 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.
*/
import com.apple.eawt.Application;
import com.apple.eawt.FullScreenAdapter;
import com.apple.eawt.FullScreenUtilities;
import com.apple.eawt.event.FullScreenEvent;
import javax.swing.*;
import java.awt.*;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
/**
* @test
* @summary Regression test for JBR-3611 Unexpected workspace switch with dialog in full-screen mode on macOS
* @key headful
* @requires (os.family == "mac")
* @modules java.desktop/com.apple.eawt
* java.desktop/com.apple.eawt.event
*/
public class FullScreenChildWindow {
private static final CompletableFuture<Boolean> shownAtFullScreen = new CompletableFuture<>();
private static final CompletableFuture<Boolean> dialogShown = new CompletableFuture<>();
private static Robot robot;
private static JFrame frame2;
private static JFrame frame1;
private static JButton button;
public static void main(String[] args) throws Exception {
robot = new Robot();
try {
SwingUtilities.invokeAndWait(FullScreenChildWindow::initUI);
shownAtFullScreen.get(5, TimeUnit.SECONDS);
clickAt(button);
dialogShown.get(5, TimeUnit.SECONDS);
switchToPreviousSpace();
robot.delay(2000);
if (!frame1.isFocused()) {
throw new RuntimeException("Unexpected state");
}
} finally {
SwingUtilities.invokeAndWait(FullScreenChildWindow::disposeUI);
}
}
private static void initUI() {
frame1 = new JFrame("FullScreenChildWindow(1)");
frame1.setSize(100, 100);
frame1.setLocation(100, 100);
frame1.setVisible(true);
frame2 = new JFrame("FullScreenChildWindow(2)");
button = new JButton("Open dialog");
button.addActionListener(e -> {
JDialog d = new JDialog(frame2, "dialog", false);
d.setSize(100, 100);
d.setLocationRelativeTo(null);
d.setAutoRequestFocus(false);
d.addWindowListener(new WindowAdapter() {
@Override
public void windowOpened(WindowEvent e) {
dialogShown.complete(true);
}
});
d.setVisible(true);
});
frame2.add(button);
frame2.setSize(100, 100);
frame2.setLocation(100, 300);
frame2.setVisible(true);
FullScreenUtilities.addFullScreenListenerTo(frame2, new FullScreenAdapter() {
@Override
public void windowEnteredFullScreen(FullScreenEvent e) {
shownAtFullScreen.complete(true);
}
});
Application.getApplication().requestToggleFullScreen(frame2);
}
private static void disposeUI() {
if (frame2 != null) frame2.dispose();
if (frame1 != null) frame1.dispose();
}
private static void clickAt(int x, int y) {
robot.mouseMove(x, y);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
}
private static void clickAt(Component component) {
Point location = component.getLocationOnScreen();
clickAt(location.x + component.getWidth() / 2, location.y + component.getHeight() / 2);
}
private static void switchToPreviousSpace() {
robot.keyPress(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_LEFT);
robot.keyRelease(KeyEvent.VK_LEFT);
robot.keyRelease(KeyEvent.VK_CONTROL);
}
}

View File

@@ -0,0 +1,99 @@
/*
* Copyright 2021 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.
*
* 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.
*/
import com.apple.eawt.Application;
import javax.swing.*;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
/**
* @test
* @summary Regression test for JBR-3666 Child window stays on default space
* when full-screen mode is activated for parent window on macOS
* @key headful
* @requires (os.family == "mac")
* @modules java.desktop/com.apple.eawt
*/
public class FullScreenChildWindowShownBefore {
private static final CompletableFuture<Boolean> dialogShown = new CompletableFuture<>();
private static Robot robot;
private static JFrame frame;
private static JDialog dialog;
public static void main(String[] args) throws Exception {
robot = new Robot();
try {
SwingUtilities.invokeAndWait(FullScreenChildWindowShownBefore::initUI);
dialogShown.get(5, TimeUnit.SECONDS);
SwingUtilities.invokeAndWait(() -> Application.getApplication().requestToggleFullScreen(frame));
robot.delay(1000); // wait for transition to full screen to finish
ensureVisible(frame);
ensureVisible(dialog);
} finally {
SwingUtilities.invokeAndWait(FullScreenChildWindowShownBefore::disposeUI);
}
}
private static void initUI() {
frame = new JFrame("FullScreenChildWindowShownBefore");
frame.getContentPane().setBackground(Color.green);
frame.setSize(100, 100);
frame.setLocation(100, 100);
frame.setVisible(true);
dialog = new JDialog(frame, false);
dialog.getContentPane().setBackground(Color.red);
dialog.addWindowListener(new WindowAdapter() {
@Override
public void windowOpened(WindowEvent e) {
dialogShown.complete(true);
}
});
dialog.setSize(100, 100);
dialog.setLocation(100, 300);
dialog.setVisible(true);
}
private static void disposeUI() {
if (frame != null) frame.dispose();
}
private static void ensureVisible(Window window) {
Rectangle bounds = window.getBounds();
Insets insets = window.getInsets();
bounds.x += insets.left;
bounds.y += insets.top;
bounds.width -= insets.left + insets.right;
bounds.height -= insets.top + insets.bottom;
Color colorAtCenter = robot.getPixelColor((int) bounds.getCenterX(), (int) bounds.getCenterY());
if (!colorAtCenter.equals(((RootPaneContainer)window).getContentPane().getBackground())) {
throw new RuntimeException(window + " isn't visible: unexpected color " + colorAtCenter);
}
}
}

View File

@@ -0,0 +1,145 @@
/*
* Copyright 2021 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.
*
* 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.
*/
import com.apple.eawt.Application;
import com.apple.eawt.FullScreenAdapter;
import com.apple.eawt.FullScreenUtilities;
import com.apple.eawt.event.FullScreenEvent;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
/**
* @test
* @summary Regression test for JBR-3633 Modal dialog is shown not at the same space as its parent
* @key headful
* @requires (os.family == "mac")
* @modules java.desktop/com.apple.eawt
* java.desktop/com.apple.eawt.event
*/
public class FullScreenInactiveDialog {
private static final CompletableFuture<Boolean> shownAtFullScreen = new CompletableFuture<>();
private static Robot robot;
private static JFrame frame;
private static JDialog dialog;
public static void main(String[] args) throws Exception {
robot = new Robot();
try {
SwingUtilities.invokeAndWait(FullScreenInactiveDialog::initUI);
shownAtFullScreen.get(5, TimeUnit.SECONDS);
switchToPreviousSpace();
SwingUtilities.invokeLater(FullScreenInactiveDialog::openDialog);
robot.delay(1000);
if (isWindowReallyShowing(dialog)) {
throw new RuntimeException("Dialog is showing earlier than expected");
}
activateApp(); // simulates clicking on app icon in dock or switch using Cmd+Tab
if (!isWindowReallyShowing(dialog)) {
throw new RuntimeException("Dialog isn't showing when expected");
}
if (!isWindowReallyShowing(frame)) {
throw new RuntimeException("Frame isn't showing when expected");
}
} finally {
SwingUtilities.invokeAndWait(FullScreenInactiveDialog::disposeUI);
}
}
private static void initUI() {
frame = new JFrame("FullScreenInactiveDialog");
frame.setSize(300, 100);
frame.setVisible(true);
FullScreenUtilities.addFullScreenListenerTo(frame, new FullScreenAdapter() {
@Override
public void windowEnteredFullScreen(FullScreenEvent e) {
shownAtFullScreen.complete(true);
}
});
Application.getApplication().requestToggleFullScreen(frame);
}
private static void openDialog() {
dialog = new JDialog(frame);
dialog.setSize(100, 100);
dialog.setVisible(true);
}
private static void disposeUI() {
if (frame != null) frame.dispose();
}
private static void switchToPreviousSpace() {
robot.keyPress(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_LEFT);
robot.keyRelease(KeyEvent.VK_LEFT);
robot.keyRelease(KeyEvent.VK_CONTROL);
robot.delay(1000); // wait for animation to finish
}
private static void activateApp() {
Desktop.getDesktop().requestForeground(false);
robot.delay(1000); // wait for animation to finish
}
private static boolean isWindowReallyShowing(Window window) throws Exception {
Point[] location = new Point[1];
AtomicBoolean movementDetected = new AtomicBoolean();
SwingUtilities.invokeAndWait(() -> {
if (window.isVisible()) {
Rectangle bounds = window.getBounds();
Insets insets = window.getInsets();
bounds.x += insets.left;
bounds.y += insets.top;
bounds.width -= insets.left + insets.right;
bounds.height -= insets.top + insets.bottom;
if (!bounds.isEmpty()) {
location[0] = new Point(bounds.x + bounds.width / 2, bounds.y + bounds.height / 2);
window.addMouseMotionListener(new MouseMotionAdapter() {
@Override
public void mouseMoved(MouseEvent e) {
movementDetected.set(true);
}
});
}
}
});
Point target = location[0];
if (target == null) {
return false;
}
robot.mouseMove(target.x, target.y);
robot.delay(100);
robot.mouseMove(target.x + 1, target.y + 1);
robot.delay(1000);
return movementDetected.get();
}
}

View File

@@ -0,0 +1,145 @@
/*
* Copyright 2000-2021 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.
*
* 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.
*/
import com.apple.eawt.Application;
import com.apple.eawt.FullScreenAdapter;
import com.apple.eawt.FullScreenUtilities;
import com.apple.eawt.event.FullScreenEvent;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
/**
* @test
* @summary Regression test for JBR-3633 Modal dialog is shown not at the same space as its parent
* @key headful
* @requires (os.family == "mac")
* @modules java.desktop/com.apple.eawt
* java.desktop/com.apple.eawt.event
*/
public class FullScreenInactiveModalDialog {
private static final CompletableFuture<Boolean> shownAtFullScreen = new CompletableFuture<>();
private static Robot robot;
private static JFrame frame;
private static JDialog dialog;
public static void main(String[] args) throws Exception {
robot = new Robot();
try {
SwingUtilities.invokeAndWait(FullScreenInactiveModalDialog::initUI);
shownAtFullScreen.get(5, TimeUnit.SECONDS);
switchToPreviousSpace();
SwingUtilities.invokeLater(FullScreenInactiveModalDialog::openDialog);
robot.delay(1000);
if (isWindowReallyShowing(dialog)) {
throw new RuntimeException("Dialog is showing earlier than expected");
}
switchToNextSpace();
if (!isWindowReallyShowing(dialog)) {
throw new RuntimeException("Dialog isn't showing when expected");
}
} finally {
SwingUtilities.invokeAndWait(FullScreenInactiveModalDialog::disposeUI);
}
}
private static void initUI() {
frame = new JFrame("FullScreenInactiveModalDialog");
frame.setSize(300, 100);
frame.setVisible(true);
FullScreenUtilities.addFullScreenListenerTo(frame, new FullScreenAdapter() {
@Override
public void windowEnteredFullScreen(FullScreenEvent e) {
shownAtFullScreen.complete(true);
}
});
Application.getApplication().requestToggleFullScreen(frame);
}
private static void openDialog() {
dialog = new JDialog(frame, true);
dialog.setSize(100, 100);
dialog.setVisible(true);
}
private static void disposeUI() {
if (frame != null) frame.dispose();
}
private static void switchToPreviousSpace() {
robot.keyPress(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_LEFT);
robot.keyRelease(KeyEvent.VK_LEFT);
robot.keyRelease(KeyEvent.VK_CONTROL);
robot.delay(1000); // wait for animation to finish
}
private static void switchToNextSpace() {
robot.keyPress(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_RIGHT);
robot.keyRelease(KeyEvent.VK_RIGHT);
robot.keyRelease(KeyEvent.VK_CONTROL);
robot.delay(1000); // wait for animation to finish
}
private static boolean isWindowReallyShowing(Window window) throws Exception {
Point[] location = new Point[1];
AtomicBoolean movementDetected = new AtomicBoolean();
SwingUtilities.invokeAndWait(() -> {
if (window.isVisible()) {
Rectangle bounds = window.getBounds();
Insets insets = window.getInsets();
bounds.x += insets.left;
bounds.y += insets.top;
bounds.width -= insets.left + insets.right;
bounds.height -= insets.top + insets.bottom;
if (!bounds.isEmpty()) {
location[0] = new Point(bounds.x + bounds.width / 2, bounds.y + bounds.height / 2);
window.addMouseMotionListener(new MouseMotionAdapter() {
@Override
public void mouseMoved(MouseEvent e) {
movementDetected.set(true);
}
});
}
}
});
Point target = location[0];
if (target == null) {
return false;
}
robot.mouseMove(target.x, target.y);
robot.delay(100);
robot.mouseMove(target.x + 1, target.y + 1);
robot.delay(1000);
return movementDetected.get();
}
}

View File

@@ -1275,6 +1275,5 @@ jb/java/jcef/MouseEventTest.java
jb/java/jcef/MouseEventAfterHideAndShowBrowserTest.java JBR-2750 linux-all
jb/java/awt/event/TouchScreenEvent/TouchScreenEventsTest.java nobug windows-6.1 not supported on Windows 7
jb/java/awt/Focus/ChainOfPopupsFocusTest.java JBR-1518 linux-all
jb/java/awt/Focus/ModalDialogFromMenuTest.java JBR-2768 macosx-all
java/time/tck/java/time/format/TCKDateTimeFormatterBuilder.java JBR-2842 macosx-10.14,macosx-10.15,macosx-10.16

View File

@@ -211,7 +211,6 @@ jb/javax/swing/JDialog/JDialog705.java
jb/javax/swing/JDialog/JDialog741/JDialog741.html nobug macosx-all,linux-all,windows-all
jb/sun/awt/macos/KeyPressAndHoldTest.java nobug macosx-all
jb/sun/lwawt/macosx/NSEvent/nsevent422.sh nobug macosx-all
jb/java/awt/Focus/ModalDialogFromMenuTest.java JBR-2768 macosx-all
jb/java/jcef/MouseEventTest.java JBR-2750 linux-all
jb/java/jcef/MouseEventAfterHideAndShowBrowserTest.java JBR-2750 linux-all