jdk/src/share/classes/java/awt/Robot.java
changeset 23276 add6f5c93bc6
parent 23274 3b6993da89df
parent 22060 cd4f9d7dbeda
child 23717 6457189cd574
--- 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);
         }
     }