Details
-
Bug
-
Resolution: Fixed
-
P4
-
11.0.21
Description
In the fix for JDK-8312462, in line 113, `{` is missing.
This is causing compilation failure in ChildAlwaysOnTopTest.java.
----------System.err:(187/13177)*----------
ChildAlwaysOnTopTest.java:116: error: illegal start of type
else {
^
ChildAlwaysOnTopTest.java:122: error: class, interface, or enum expected
public static void test(Window parent) throws Exception {
^
ChildAlwaysOnTopTest.java:126: error: class, interface, or enum expected
public void run() {
^
ChildAlwaysOnTopTest.java:128: error: class, interface, or enum expected
win1.setName("Top");
^
ChildAlwaysOnTopTest.java:130: error: class, interface, or enum expected
win2 = parent == null ? new JDialog() : new JDialog(parent);
^
ChildAlwaysOnTopTest.java:131: error: class, interface, or enum expected
win2.setName("Behind");
^
ChildAlwaysOnTopTest.java:133: error: class, interface, or enum expected
JLabel label = new JLabel("TOP WINDOW");
^
ChildAlwaysOnTopTest.java:135: error: class, interface, or enum expected
win1.setSize(200, 200);
^
ChildAlwaysOnTopTest.java:136: error: class, interface, or enum expected
Panel panel = new Panel();
^
ChildAlwaysOnTopTest.java:137: error: class, interface, or enum expected
panel.setBackground(Color.GREEN);
^
ChildAlwaysOnTopTest.java:138: error: class, interface, or enum expected
panel.add(label);
^
ChildAlwaysOnTopTest.java:139: error: class, interface, or enum expected
win1.add(panel);
^
ChildAlwaysOnTopTest.java:140: error: class, interface, or enum expected
win1.setAlwaysOnTop(true);
^
ChildAlwaysOnTopTest.java:143: error: class, interface, or enum expected
label = new JLabel("BEHIND WINDOW");
^
ChildAlwaysOnTopTest.java:144: error: class, interface, or enum expected
win2.setSize(300, 300);
^
ChildAlwaysOnTopTest.java:145: error: class, interface, or enum expected
panel = new Panel();
^
ChildAlwaysOnTopTest.java:146: error: class, interface, or enum expected
panel.setBackground(Color.RED);
^
ChildAlwaysOnTopTest.java:147: error: class, interface, or enum expected
panel.add(label);
^
ChildAlwaysOnTopTest.java:148: error: class, interface, or enum expected
win2.add(panel);
^
ChildAlwaysOnTopTest.java:150: error: class, interface, or enum expected
win1.setVisible(true);
^
ChildAlwaysOnTopTest.java:151: error: class, interface, or enum expected
win2.setVisible(true);
^
ChildAlwaysOnTopTest.java:152: error: class, interface, or enum expected
}
^
ChildAlwaysOnTopTest.java:155: error: class, interface, or enum expected
robot = new Robot();
^
ChildAlwaysOnTopTest.java:156: error: class, interface, or enum expected
robot.setAutoDelay(300);
^
ChildAlwaysOnTopTest.java:157: error: class, interface, or enum expected
robot.waitForIdle();
^
ChildAlwaysOnTopTest.java:161: error: class, interface, or enum expected
System.out.println(" >> Testing Scenario 1 ...");
^
ChildAlwaysOnTopTest.java:162: error: class, interface, or enum expected
SwingUtilities.invokeAndWait(()-> {
^
ChildAlwaysOnTopTest.java:164: error: class, interface, or enum expected
win2.setVisible(true);
^
ChildAlwaysOnTopTest.java:165: error: class, interface, or enum expected
});
^
ChildAlwaysOnTopTest.java:167: error: class, interface, or enum expected
checkTopWindow(caseNo, 1, Color.GREEN);
^
ChildAlwaysOnTopTest.java:173: error: class, interface, or enum expected
System.out.println(" >> Testing Scenario 2 ...");
^
ChildAlwaysOnTopTest.java:174: error: class, interface, or enum expected
SwingUtilities.invokeAndWait(()-> {
^
ChildAlwaysOnTopTest.java:176: error: class, interface, or enum expected
if (parent != null) {
^
ChildAlwaysOnTopTest.java:178: error: class, interface, or enum expected
parent.toFront();
^
ChildAlwaysOnTopTest.java:179: error: class, interface, or enum expected
}
^
ChildAlwaysOnTopTest.java:182: error: class, interface, or enum expected
checkTopWindow(caseNo, 2, Color.GREEN);
^
ChildAlwaysOnTopTest.java:189: error: class, interface, or enum expected
System.out.println(" >> Testing Scenario 3 ...");
^
ChildAlwaysOnTopTest.java:190: error: class, interface, or enum expected
SwingUtilities.invokeAndWait(new Runnable() {
^
ChildAlwaysOnTopTest.java:192: error: class, interface, or enum expected
public void run() {
^
ChildAlwaysOnTopTest.java:194: error: class, interface, or enum expected
if (parent != null) {
^
ChildAlwaysOnTopTest.java:196: error: class, interface, or enum expected
parent.setVisible(true);
^
ChildAlwaysOnTopTest.java:197: error: class, interface, or enum expected
}
^
ChildAlwaysOnTopTest.java:201: error: class, interface, or enum expected
robot.delay(300);
^
ChildAlwaysOnTopTest.java:202: error: class, interface, or enum expected
robot.waitForIdle();
^
ChildAlwaysOnTopTest.java:204: error: class, interface, or enum expected
SwingUtilities.invokeAndWait(new Runnable() {
^
ChildAlwaysOnTopTest.java:206: error: class, interface, or enum expected
public void run() {
^
ChildAlwaysOnTopTest.java:208: error: class, interface, or enum expected
}
^
ChildAlwaysOnTopTest.java:211: error: class, interface, or enum expected
checkTopWindow(caseNo, 3, Color.RED);
^
ChildAlwaysOnTopTest.java:213: error: class, interface, or enum expected
} finally {
^
ChildAlwaysOnTopTest.java:216: error: class, interface, or enum expected
}
^
ChildAlwaysOnTopTest.java:219: error: class, interface, or enum expected
}
^
ChildAlwaysOnTopTest.java:228: error: class, interface, or enum expected
robot.waitForIdle();
^
ChildAlwaysOnTopTest.java:229: error: class, interface, or enum expected
Color actualColor = robot.getPixelColor(point.x + 100, point.y + 100);
^
ChildAlwaysOnTopTest.java:231: error: class, interface, or enum expected
saveScreenCapture(caseNo , scenarioNo);
^
ChildAlwaysOnTopTest.java:233: error: class, interface, or enum expected
if (!actualColor.equals(expectedColor)) {
^
ChildAlwaysOnTopTest.java:235: error: class, interface, or enum expected
errorLog.append("Case "+ caseNo + errorMsg[scenarioNo - 1]
^
ChildAlwaysOnTopTest.java:238: error: class, interface, or enum expected
}
^
ChildAlwaysOnTopTest.java:241: error: class, interface, or enum expected
}
^
ChildAlwaysOnTopTest.java:248: error: class, interface, or enum expected
BufferedImage image = robot.createScreenCapture(
^
ChildAlwaysOnTopTest.java:250: error: class, interface, or enum expected
try {
^
ChildAlwaysOnTopTest.java:252: error: class, interface, or enum expected
} catch (IOException e) {
^
ChildAlwaysOnTopTest.java:254: error: class, interface, or enum expected
}
^
62 errors
result: Failed. Compilation failed: Compilation failed
This is causing compilation failure in ChildAlwaysOnTopTest.java.
----------System.err:(187/13177)*----------
ChildAlwaysOnTopTest.java:116: error: illegal start of type
else {
^
ChildAlwaysOnTopTest.java:122: error: class, interface, or enum expected
public static void test(Window parent) throws Exception {
^
ChildAlwaysOnTopTest.java:126: error: class, interface, or enum expected
public void run() {
^
ChildAlwaysOnTopTest.java:128: error: class, interface, or enum expected
win1.setName("Top");
^
ChildAlwaysOnTopTest.java:130: error: class, interface, or enum expected
win2 = parent == null ? new JDialog() : new JDialog(parent);
^
ChildAlwaysOnTopTest.java:131: error: class, interface, or enum expected
win2.setName("Behind");
^
ChildAlwaysOnTopTest.java:133: error: class, interface, or enum expected
JLabel label = new JLabel("TOP WINDOW");
^
ChildAlwaysOnTopTest.java:135: error: class, interface, or enum expected
win1.setSize(200, 200);
^
ChildAlwaysOnTopTest.java:136: error: class, interface, or enum expected
Panel panel = new Panel();
^
ChildAlwaysOnTopTest.java:137: error: class, interface, or enum expected
panel.setBackground(Color.GREEN);
^
ChildAlwaysOnTopTest.java:138: error: class, interface, or enum expected
panel.add(label);
^
ChildAlwaysOnTopTest.java:139: error: class, interface, or enum expected
win1.add(panel);
^
ChildAlwaysOnTopTest.java:140: error: class, interface, or enum expected
win1.setAlwaysOnTop(true);
^
ChildAlwaysOnTopTest.java:143: error: class, interface, or enum expected
label = new JLabel("BEHIND WINDOW");
^
ChildAlwaysOnTopTest.java:144: error: class, interface, or enum expected
win2.setSize(300, 300);
^
ChildAlwaysOnTopTest.java:145: error: class, interface, or enum expected
panel = new Panel();
^
ChildAlwaysOnTopTest.java:146: error: class, interface, or enum expected
panel.setBackground(Color.RED);
^
ChildAlwaysOnTopTest.java:147: error: class, interface, or enum expected
panel.add(label);
^
ChildAlwaysOnTopTest.java:148: error: class, interface, or enum expected
win2.add(panel);
^
ChildAlwaysOnTopTest.java:150: error: class, interface, or enum expected
win1.setVisible(true);
^
ChildAlwaysOnTopTest.java:151: error: class, interface, or enum expected
win2.setVisible(true);
^
ChildAlwaysOnTopTest.java:152: error: class, interface, or enum expected
}
^
ChildAlwaysOnTopTest.java:155: error: class, interface, or enum expected
robot = new Robot();
^
ChildAlwaysOnTopTest.java:156: error: class, interface, or enum expected
robot.setAutoDelay(300);
^
ChildAlwaysOnTopTest.java:157: error: class, interface, or enum expected
robot.waitForIdle();
^
ChildAlwaysOnTopTest.java:161: error: class, interface, or enum expected
System.out.println(" >> Testing Scenario 1 ...");
^
ChildAlwaysOnTopTest.java:162: error: class, interface, or enum expected
SwingUtilities.invokeAndWait(()-> {
^
ChildAlwaysOnTopTest.java:164: error: class, interface, or enum expected
win2.setVisible(true);
^
ChildAlwaysOnTopTest.java:165: error: class, interface, or enum expected
});
^
ChildAlwaysOnTopTest.java:167: error: class, interface, or enum expected
checkTopWindow(caseNo, 1, Color.GREEN);
^
ChildAlwaysOnTopTest.java:173: error: class, interface, or enum expected
System.out.println(" >> Testing Scenario 2 ...");
^
ChildAlwaysOnTopTest.java:174: error: class, interface, or enum expected
SwingUtilities.invokeAndWait(()-> {
^
ChildAlwaysOnTopTest.java:176: error: class, interface, or enum expected
if (parent != null) {
^
ChildAlwaysOnTopTest.java:178: error: class, interface, or enum expected
parent.toFront();
^
ChildAlwaysOnTopTest.java:179: error: class, interface, or enum expected
}
^
ChildAlwaysOnTopTest.java:182: error: class, interface, or enum expected
checkTopWindow(caseNo, 2, Color.GREEN);
^
ChildAlwaysOnTopTest.java:189: error: class, interface, or enum expected
System.out.println(" >> Testing Scenario 3 ...");
^
ChildAlwaysOnTopTest.java:190: error: class, interface, or enum expected
SwingUtilities.invokeAndWait(new Runnable() {
^
ChildAlwaysOnTopTest.java:192: error: class, interface, or enum expected
public void run() {
^
ChildAlwaysOnTopTest.java:194: error: class, interface, or enum expected
if (parent != null) {
^
ChildAlwaysOnTopTest.java:196: error: class, interface, or enum expected
parent.setVisible(true);
^
ChildAlwaysOnTopTest.java:197: error: class, interface, or enum expected
}
^
ChildAlwaysOnTopTest.java:201: error: class, interface, or enum expected
robot.delay(300);
^
ChildAlwaysOnTopTest.java:202: error: class, interface, or enum expected
robot.waitForIdle();
^
ChildAlwaysOnTopTest.java:204: error: class, interface, or enum expected
SwingUtilities.invokeAndWait(new Runnable() {
^
ChildAlwaysOnTopTest.java:206: error: class, interface, or enum expected
public void run() {
^
ChildAlwaysOnTopTest.java:208: error: class, interface, or enum expected
}
^
ChildAlwaysOnTopTest.java:211: error: class, interface, or enum expected
checkTopWindow(caseNo, 3, Color.RED);
^
ChildAlwaysOnTopTest.java:213: error: class, interface, or enum expected
} finally {
^
ChildAlwaysOnTopTest.java:216: error: class, interface, or enum expected
}
^
ChildAlwaysOnTopTest.java:219: error: class, interface, or enum expected
}
^
ChildAlwaysOnTopTest.java:228: error: class, interface, or enum expected
robot.waitForIdle();
^
ChildAlwaysOnTopTest.java:229: error: class, interface, or enum expected
Color actualColor = robot.getPixelColor(point.x + 100, point.y + 100);
^
ChildAlwaysOnTopTest.java:231: error: class, interface, or enum expected
saveScreenCapture(caseNo , scenarioNo);
^
ChildAlwaysOnTopTest.java:233: error: class, interface, or enum expected
if (!actualColor.equals(expectedColor)) {
^
ChildAlwaysOnTopTest.java:235: error: class, interface, or enum expected
errorLog.append("Case "+ caseNo + errorMsg[scenarioNo - 1]
^
ChildAlwaysOnTopTest.java:238: error: class, interface, or enum expected
}
^
ChildAlwaysOnTopTest.java:241: error: class, interface, or enum expected
}
^
ChildAlwaysOnTopTest.java:248: error: class, interface, or enum expected
BufferedImage image = robot.createScreenCapture(
^
ChildAlwaysOnTopTest.java:250: error: class, interface, or enum expected
try {
^
ChildAlwaysOnTopTest.java:252: error: class, interface, or enum expected
} catch (IOException e) {
^
ChildAlwaysOnTopTest.java:254: error: class, interface, or enum expected
}
^
62 errors
result: Failed. Compilation failed: Compilation failed
Attachments
Issue Links
- relates to
-
JDK-8312462 ChildAlwaysOnTopTest.java fails with "RuntimeException: Failed to unset alwaysOnTop"
-
- Resolved
-