提交 ef550c80 编写于 作者: A azvegint

8042094: Test javax/swing/JFileChooser/7036025/bug7036025.java fails with...

8042094: Test javax/swing/JFileChooser/7036025/bug7036025.java fails with java.lang.NullPointerException on Windows x86
Reviewed-by: ahgross, art, pchelko, mschoene
上级 b2deb441
/*
* 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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册