src/java.datatransfer/share/classes/java/awt/datatransfer/DataFlavor.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -44,12 +44,10 @@
import java.nio.CharBuffer;
import java.util.Arrays;
import java.util.Collections;
import java.util.Objects;
-import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION;
-
/**
* A {@code DataFlavor} provides meta information about data. {@code DataFlavor}
* is typically used to access data on the clipboard, or during
* a drag and drop operation.
* <p>
@@ -135,11 +133,11 @@
{
ReflectUtil.checkPackageAccess(className);
try {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkPermission(GET_CLASSLOADER_PERMISSION);
+ sm.checkPermission(new RuntimePermission("getClassLoader"));
}
ClassLoader loader = ClassLoader.getSystemClassLoader();
try {
// bootstrap class loader and system class loader if present
return Class.forName(className, true, loader);