--- a/jdk/src/share/classes/java/awt/Robot.java Wed Jan 29 18:32:10 2014 +0400
+++ b/jdk/src/share/classes/java/awt/Robot.java Thu Jan 30 10:36:40 2014 -0500
@@ -34,10 +34,10 @@
import java.awt.image.WritableRaster;
import java.awt.peer.RobotPeer;
import java.lang.reflect.InvocationTargetException;
+import sun.awt.AWTPermissions;
import sun.awt.ComponentFactory;
import sun.awt.SunToolkit;
import sun.awt.image.SunWritableRaster;
-import sun.security.util.SecurityConstants;
/**
* This class is used to generate native system input events
@@ -163,7 +163,7 @@
private void checkRobotAllowed() {
SecurityManager security = System.getSecurityManager();
if (security != null) {
- security.checkPermission(SecurityConstants.AWT.CREATE_ROBOT_PERMISSION);
+ security.checkPermission(AWTPermissions.CREATE_ROBOT_PERMISSION);
}
}
@@ -458,8 +458,7 @@
private static void checkScreenCaptureAllowed() {
SecurityManager security = System.getSecurityManager();
if (security != null) {
- security.checkPermission(
- SecurityConstants.AWT.READ_DISPLAY_PIXELS_PERMISSION);
+ security.checkPermission(AWTPermissions.READ_DISPLAY_PIXELS_PERMISSION);
}
}