diff --git a/src/share/classes/sun/awt/shell/ShellFolder.java b/src/share/classes/sun/awt/shell/ShellFolder.java index 209974ed948869eed5ed4bd1c19d64758928b0f2..f8ca809728f9558d6c19bc618df8d4edee04cdfe 100644 --- a/src/share/classes/sun/awt/shell/ShellFolder.java +++ b/src/share/classes/sun/awt/shell/ShellFolder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, 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 @@ -33,8 +33,6 @@ import java.io.FileNotFoundException; import java.util.*; import java.util.concurrent.Callable; -import sun.reflect.misc.ReflectUtil; - /** * @author Michael Martak * @since 1.4 @@ -201,16 +199,19 @@ public abstract class ShellFolder extends File { // Static - private static ShellFolderManager shellFolderManager; + private static final ShellFolderManager shellFolderManager; - private static Invoker invoker; + private static final Invoker invoker; static { String managerClassName = (String)Toolkit.getDefaultToolkit(). getDesktopProperty("Shell.shellFolderManager"); Class managerClass = null; try { - managerClass = ReflectUtil.forName(managerClassName); + managerClass = Class.forName(managerClassName, false, null); + if (!ShellFolderManager.class.isAssignableFrom(managerClass)) { + managerClass = null; + } // swallow the exceptions below and use default shell folder } catch(ClassNotFoundException e) { } catch(NullPointerException e) {