Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
247027a8
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
247027a8
编写于
3月 13, 2014
作者:
M
malenkov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8035699: File choosers should be choosier
Reviewed-by: alexsch, art, skoivu
上级
f5768513
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
20 addition
and
2 deletion
+20
-2
src/share/classes/javax/swing/filechooser/FileSystemView.java
...share/classes/javax/swing/filechooser/FileSystemView.java
+2
-1
src/windows/classes/sun/awt/shell/Win32ShellFolder2.java
src/windows/classes/sun/awt/shell/Win32ShellFolder2.java
+8
-1
src/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java
...ndows/classes/sun/awt/shell/Win32ShellFolderManager2.java
+10
-0
未找到文件。
src/share/classes/javax/swing/filechooser/FileSystemView.java
浏览文件 @
247027a8
...
...
@@ -718,7 +718,8 @@ class WindowsFileSystemView extends FileSystemView {
* @return the Desktop folder.
*/
public
File
getHomeDirectory
()
{
return
getRoots
()[
0
];
File
[]
roots
=
getRoots
();
return
(
roots
.
length
==
0
)
?
null
:
roots
[
0
];
}
/**
...
...
src/windows/classes/sun/awt/shell/Win32ShellFolder2.java
浏览文件 @
247027a8
...
...
@@ -583,11 +583,18 @@ final class Win32ShellFolder2 extends ShellFolder {
// Needs to be accessible to Win32ShellFolderManager2
static
String
getFileSystemPath
(
final
int
csidl
)
throws
IOException
,
InterruptedException
{
return
invoke
(
new
Callable
<
String
>()
{
String
path
=
invoke
(
new
Callable
<
String
>()
{
public
String
call
()
throws
IOException
{
return
getFileSystemPath0
(
csidl
);
}
},
IOException
.
class
);
if
(
path
!=
null
)
{
SecurityManager
security
=
System
.
getSecurityManager
();
if
(
security
!=
null
)
{
security
.
checkRead
(
path
);
}
}
return
path
;
}
// NOTE: this method uses COM and must be called on the 'COM thread'. See ComInvoker for the details
...
...
src/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java
浏览文件 @
247027a8
...
...
@@ -142,6 +142,8 @@ public class Win32ShellFolderManager2 extends ShellFolderManager {
if
(
desktop
==
null
)
{
try
{
desktop
=
new
Win32ShellFolder2
(
DESKTOP
);
}
catch
(
SecurityException
e
)
{
// Ignore error
}
catch
(
IOException
e
)
{
// Ignore error
}
catch
(
InterruptedException
e
)
{
...
...
@@ -155,6 +157,8 @@ public class Win32ShellFolderManager2 extends ShellFolderManager {
if
(
drives
==
null
)
{
try
{
drives
=
new
Win32ShellFolder2
(
DRIVES
);
}
catch
(
SecurityException
e
)
{
// Ignore error
}
catch
(
IOException
e
)
{
// Ignore error
}
catch
(
InterruptedException
e
)
{
...
...
@@ -171,6 +175,8 @@ public class Win32ShellFolderManager2 extends ShellFolderManager {
if
(
path
!=
null
)
{
recent
=
createShellFolder
(
getDesktop
(),
new
File
(
path
));
}
}
catch
(
SecurityException
e
)
{
// Ignore error
}
catch
(
InterruptedException
e
)
{
// Ignore error
}
catch
(
IOException
e
)
{
...
...
@@ -184,6 +190,8 @@ public class Win32ShellFolderManager2 extends ShellFolderManager {
if
(
network
==
null
)
{
try
{
network
=
new
Win32ShellFolder2
(
NETWORK
);
}
catch
(
SecurityException
e
)
{
// Ignore error
}
catch
(
IOException
e
)
{
// Ignore error
}
catch
(
InterruptedException
e
)
{
...
...
@@ -207,6 +215,8 @@ public class Win32ShellFolderManager2 extends ShellFolderManager {
personal
.
setIsPersonal
();
}
}
}
catch
(
SecurityException
e
)
{
// Ignore error
}
catch
(
InterruptedException
e
)
{
// Ignore error
}
catch
(
IOException
e
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录