Hi Phil,
We have an exact task to get rid of all internal dependencies in client
tests [1]
One of these dependencies is realSync() method usage that will no longer
be available for use since Jigsaw project is fully integrated. One can
grep realSync through the jdk/test directory to access the scales of the
disaster. And there is no any method in public class we can call to use
realSync.
As for javadoc, there are a few types of internal warnings that realSync
can throw. I've mentioned all of them.
We can prevent it by catching them all and throwing some public Exception.
Thanks,
Dima
[1]https://bugs.openjdk.java.net/browse/JDK-8049568
On 08/29/2014 07:33 PM, Phil Race wrote:
So you are proposing adding a new *public* API for this narrow purpose.
And it calls out a whole bunch of internal classes in its apI doc !?!
2642 * <p> The method calls {@link sun.awt.SunToolkit#realSync} to
2643 * sync with native event queue
@throws sun.awt.SunToolkit.IllegalThreadException if called on the AWT event
2646 * dispatching thread
2647 * @throws sun.awt.SunToolkit.OperationTimedOut if the
2648 * {@link sun.awt.SunToolkit.OperationTimedOut} exception
occurs in
2649 * {@link sun.awt.SunToolkit#realSync}
2650 * @throws sun.awt.SunToolkit.InfiniteLoop if the
2651 * {@link sun.awt.SunToolkit.InfiniteLoop} exception occurs in
2652 * {@link sun.awt.SunToolkit#realSync}
2653 * @throws ClassCastException if default toolkit is not SunToolkit
I am also not sure how confident I am that the statement
his method guarantees that after
2637 * return no additional Java events will be generated, unless
2638 * cause by user.
is actually guaranteed.
My initial reaction to such a proposal is instead look hard for a better
way even if it means re-writing all the tests.
There's also the proposed 'jdk.*' name space that can be considered
but re-writing the tests would be better.
-phil.
On 8/29/14 8:11 AM, Dmitriy Ermashov wrote:
Hi awt team,
Please review a fix for 8056911, remove internal API usage from
ExtendedRobot class.
We have to throw out all calls of sun.* packages from tests because
of incompatibility with Jigsaw project.
http://cr.openjdk.java.net/~dermashov/8056911/webrev.00/
The CCC request will take place after the review process will be
completed.
Thanks,
Dima