<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Sergey,<br>
<br>
I made the KeyboardFocusManager initialized lazy on the peer level.
Maybe you'll find it more acceptable.<br>
<a class="moz-txt-link-freetext" href="http://cr.openjdk.java.net/~ssadetsky/8130895/webrev.01/">http://cr.openjdk.java.net/~ssadetsky/8130895/webrev.01/</a><br>
It is not possible to decouple KFM and the app context it belongs. <br>
<br>
--Semyon<br>
<br>
<div class="moz-cite-prefix">On 7/23/2015 7:38 AM, Semyon Sadetsky
wrote:<br>
</div>
<blockquote cite="mid:55B06FAD.9050503@oracle.com" type="cite">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
Hi Sergey,<br>
<br>
As you said there are 2 issues here. The first is about
KeyboardFocusManager initialization in the main event loop. <br>
And the second about initialization of the KeyboardManagerManager
itself where keystrokes are shared between contexts. <br>
Or do you mean if I remove the keystrokes sharing then the
KeyboardFocusManager can be initialized in the toolkit thread? Is
that what you mean?<br>
<br>
--Semyon<br>
<br>
<div class="moz-cite-prefix">On 7/22/2015 8:20 PM, Sergey Bylokhov
wrote:<br>
</div>
<blockquote cite="mid:55AFD0DD.1000508@oracle.com" type="cite">
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type">
<div class="moz-cite-prefix">It is unclear why it is unrelated,
the stack trace from the bug:<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
java.lang.ExceptionInInitializerError <br>
at sun.misc.Unsafe.ensureClassInitialized(Native Method) <br>
at
sun.awt.AWTAccessor.getKeyboardFocusManagerAccessor(AWTAccessor.java:966)<br>
at
sun.awt.KeyboardFocusManagerPeerImpl.<clinit>(KeyboardFocusManagerPeerImpl.java:46)<br>
at sun.awt.X11.XToolkit.run(XToolkit.java:611) <br>
at sun.awt.X11.XToolkit.run(XToolkit.java:550) <br>
at java.lang.Thread.run(Thread.java:745) <br>
Caused by: java.lang.NullPointerException <br>
at
java.awt.AWTKeyStroke.getCachedStroke(AWTKeyStroke.java:255) <br>
at
java.awt.AWTKeyStroke.getAWTKeyStroke(AWTKeyStroke.java:394) <br>
at
java.awt.KeyboardFocusManager.<clinit>(KeyboardFocusManager.java:332)<br>
... 6 more <br>
<br>
<br>
On 22.07.15 17:09, Semyon Sadetsky wrote:<br>
</div>
<blockquote cite="mid:55AFA415.8080505@oracle.com" type="cite">
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type">
Hi Sergey,<br>
<br>
From the process point of view it's better to fix the issue
you've found in another ticket. The failed test is not related
to the keystrokes caching. <br>
So I suggest to push this fix as it is and file another JIRA
for the keystrokes.<br>
<br>
--Semyon<br>
<br>
<br>
<div class="moz-cite-prefix">On 7/22/2015 3:58 PM, Sergey
Bylokhov wrote:<br>
</div>
<blockquote cite="mid:55AF936A.8020404@oracle.com" type="cite">
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Hi, Semyon.<br>
NPE occurs when we initialize KFM on the Toolkit thread,
but this is only a part of the bug, another issue is that
we will use cached keystrokes on the toolkit thread. But
this keystrokes is bound to the appcontext so we should
not use objects which connect to the application on the
toolkit thread. This code should be carefully checked to
remove appcontext related stuff from the toolkit thread.<br>
<br>
On 21.07.15 12:40, Semyon Sadetsky wrote:<br>
</div>
<blockquote cite="mid:55AE1397.4070709@oracle.com"
type="cite">
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
Hello, <br>
<br>
Please review fix for JDK9:<br>
bug: <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="https://bugs.openjdk.java.net/browse/JDK-8130895">https://bugs.openjdk.java.net/browse/JDK-8130895</a><br>
webrev: <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/%7Essadetsky/8130895/webrev.00/">http://cr.openjdk.java.net/~ssadetsky/8130895/webrev.00/</a><br>
<br>
realSync() used in the test's
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
TestRunnable class causes events come to the XAWT event
loop but there are no any windows created at the moment
and the system application context is not initialized.
This results in attempt to create the KeyboardFocusManager
instance on the XAWT's thread group during the XEvent
dispatching. That in its turn causes NPE. <br>
The solution: since KeyboardFocusManager should never be
instantiated in the toolkit event loop, the corresponding
check was added.<br>
<br>
--Semyon<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Best regards, Sergey. </pre>
</blockquote>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Best regards, Sergey. </pre>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>