Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
89d4b110
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看板
提交
89d4b110
编写于
7月 09, 2012
作者:
R
robm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7179305: (fs) Method name sun.nio.fs.UnixPath.getPathForExecptionMessage is misspelled
Reviewed-by: dholmes, chegar
上级
e3e5d641
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
41 addition
and
41 deletion
+41
-41
src/solaris/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java
...classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java
+7
-7
src/solaris/classes/sun/nio/fs/LinuxWatchService.java
src/solaris/classes/sun/nio/fs/LinuxWatchService.java
+2
-2
src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java
...laris/classes/sun/nio/fs/SolarisAclFileAttributeView.java
+3
-3
src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java
...asses/sun/nio/fs/SolarisUserDefinedFileAttributeView.java
+7
-7
src/solaris/classes/sun/nio/fs/SolarisWatchService.java
src/solaris/classes/sun/nio/fs/SolarisWatchService.java
+2
-2
src/solaris/classes/sun/nio/fs/UnixCopyFile.java
src/solaris/classes/sun/nio/fs/UnixCopyFile.java
+8
-8
src/solaris/classes/sun/nio/fs/UnixException.java
src/solaris/classes/sun/nio/fs/UnixException.java
+4
-4
src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java
src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java
+5
-5
src/solaris/classes/sun/nio/fs/UnixPath.java
src/solaris/classes/sun/nio/fs/UnixPath.java
+3
-3
未找到文件。
src/solaris/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java
浏览文件 @
89d4b110
/*
* Copyright (c) 2008, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 201
2
, 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
...
...
@@ -55,7 +55,7 @@ class LinuxUserDefinedFileAttributeView
name
=
USER_NAMESPACE
+
name
;
byte
[]
bytes
=
name
.
getBytes
();
if
(
bytes
.
length
>
XATTR_NAME_MAX
)
{
throw
new
FileSystemException
(
file
.
getPathForEx
ec
ptionMessage
(),
throw
new
FileSystemException
(
file
.
getPathForEx
ce
ptionMessage
(),
null
,
"'"
+
name
+
"' is too big"
);
}
return
bytes
;
...
...
@@ -116,7 +116,7 @@ class LinuxUserDefinedFileAttributeView
buffer
=
NativeBuffers
.
getNativeBuffer
(
size
);
continue
;
}
throw
new
FileSystemException
(
file
.
getPathForEx
ec
ptionMessage
(),
throw
new
FileSystemException
(
file
.
getPathForEx
ce
ptionMessage
(),
null
,
"Unable to get list of extended attributes: "
+
x
.
getMessage
());
}
...
...
@@ -138,7 +138,7 @@ class LinuxUserDefinedFileAttributeView
// fgetxattr returns size if called with size==0
return
fgetxattr
(
fd
,
nameAsBytes
(
file
,
name
),
0L
,
0
);
}
catch
(
UnixException
x
)
{
throw
new
FileSystemException
(
file
.
getPathForEx
ec
ptionMessage
(),
throw
new
FileSystemException
(
file
.
getPathForEx
ce
ptionMessage
(),
null
,
"Unable to get size of extended attribute '"
+
name
+
"': "
+
x
.
getMessage
());
}
finally
{
...
...
@@ -191,7 +191,7 @@ class LinuxUserDefinedFileAttributeView
}
catch
(
UnixException
x
)
{
String
msg
=
(
x
.
errno
()
==
ERANGE
)
?
"Insufficient space in buffer"
:
x
.
getMessage
();
throw
new
FileSystemException
(
file
.
getPathForEx
ec
ptionMessage
(),
throw
new
FileSystemException
(
file
.
getPathForEx
ce
ptionMessage
(),
null
,
"Error reading extended attribute '"
+
name
+
"': "
+
msg
);
}
finally
{
close
(
fd
);
...
...
@@ -243,7 +243,7 @@ class LinuxUserDefinedFileAttributeView
src
.
position
(
pos
+
rem
);
return
rem
;
}
catch
(
UnixException
x
)
{
throw
new
FileSystemException
(
file
.
getPathForEx
ec
ptionMessage
(),
throw
new
FileSystemException
(
file
.
getPathForEx
ce
ptionMessage
(),
null
,
"Error writing extended attribute '"
+
name
+
"': "
+
x
.
getMessage
());
}
finally
{
...
...
@@ -264,7 +264,7 @@ class LinuxUserDefinedFileAttributeView
try
{
fremovexattr
(
fd
,
nameAsBytes
(
file
,
name
));
}
catch
(
UnixException
x
)
{
throw
new
FileSystemException
(
file
.
getPathForEx
ec
ptionMessage
(),
throw
new
FileSystemException
(
file
.
getPathForEx
ce
ptionMessage
(),
null
,
"Unable to delete extended attribute '"
+
name
+
"': "
+
x
.
getMessage
());
}
finally
{
close
(
fd
);
...
...
src/solaris/classes/sun/nio/fs/LinuxWatchService.java
浏览文件 @
89d4b110
/*
* Copyright (c) 2008, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 201
2
, 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
...
...
@@ -246,7 +246,7 @@ class LinuxWatchService
return
x
.
asIOException
(
dir
);
}
if
(!
attrs
.
isDirectory
())
{
return
new
NotDirectoryException
(
dir
.
getPathForEx
ec
ptionMessage
());
return
new
NotDirectoryException
(
dir
.
getPathForEx
ce
ptionMessage
());
}
// register with inotify (replaces existing mask if already registered)
...
...
src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java
浏览文件 @
89d4b110
/*
* Copyright (c) 2008, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 201
2
, 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
...
...
@@ -324,7 +324,7 @@ class SolarisAclFileAttributeView
return
decode
(
address
,
n
);
}
catch
(
UnixException
x
)
{
if
((
x
.
errno
()
==
ENOSYS
)
||
!
isAclsEnabled
(
fd
))
{
throw
new
FileSystemException
(
file
.
getPathForEx
ec
ptionMessage
(),
throw
new
FileSystemException
(
file
.
getPathForEx
ce
ptionMessage
(),
null
,
x
.
getMessage
()
+
" (file system does not support NFSv4 ACLs)"
);
}
x
.
rethrowAsIOException
(
file
);
...
...
@@ -355,7 +355,7 @@ class SolarisAclFileAttributeView
facl
(
fd
,
ACE_SETACL
,
n
,
address
);
}
catch
(
UnixException
x
)
{
if
((
x
.
errno
()
==
ENOSYS
)
||
!
isAclsEnabled
(
fd
))
{
throw
new
FileSystemException
(
file
.
getPathForEx
ec
ptionMessage
(),
throw
new
FileSystemException
(
file
.
getPathForEx
ce
ptionMessage
(),
null
,
x
.
getMessage
()
+
" (file system does not support NFSv4 ACLs)"
);
}
if
(
x
.
errno
()
==
EINVAL
&&
(
n
<
3
))
...
...
src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java
浏览文件 @
89d4b110
/*
* Copyright (c) 2008, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 201
2
, 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
...
...
@@ -49,7 +49,7 @@ class SolarisUserDefinedFileAttributeView
if
(
bytes
.
length
<=
1
||
(
bytes
.
length
==
2
&&
bytes
[
1
]
==
'.'
))
{
throw
new
FileSystemException
(
file
.
getPathForEx
ec
ptionMessage
(),
throw
new
FileSystemException
(
file
.
getPathForEx
ce
ptionMessage
(),
null
,
"'"
+
name
+
"' is not a valid name"
);
}
}
...
...
@@ -96,7 +96,7 @@ class SolarisUserDefinedFileAttributeView
}
return
Collections
.
unmodifiableList
(
list
);
}
catch
(
UnixException
x
)
{
throw
new
FileSystemException
(
file
.
getPathForEx
ec
ptionMessage
(),
throw
new
FileSystemException
(
file
.
getPathForEx
ce
ptionMessage
(),
null
,
"Unable to get list of extended attributes: "
+
x
.
getMessage
());
}
...
...
@@ -126,7 +126,7 @@ class SolarisUserDefinedFileAttributeView
close
(
afd
);
}
}
catch
(
UnixException
x
)
{
throw
new
FileSystemException
(
file
.
getPathForEx
ec
ptionMessage
(),
throw
new
FileSystemException
(
file
.
getPathForEx
ce
ptionMessage
(),
null
,
"Unable to get size of extended attribute '"
+
name
+
"': "
+
x
.
getMessage
());
}
...
...
@@ -165,7 +165,7 @@ class SolarisUserDefinedFileAttributeView
fc
.
close
();
}
}
catch
(
UnixException
x
)
{
throw
new
FileSystemException
(
file
.
getPathForEx
ec
ptionMessage
(),
throw
new
FileSystemException
(
file
.
getPathForEx
ce
ptionMessage
(),
null
,
"Unable to read extended attribute '"
+
name
+
"': "
+
x
.
getMessage
());
}
...
...
@@ -201,7 +201,7 @@ class SolarisUserDefinedFileAttributeView
fc
.
close
();
}
}
catch
(
UnixException
x
)
{
throw
new
FileSystemException
(
file
.
getPathForEx
ec
ptionMessage
(),
throw
new
FileSystemException
(
file
.
getPathForEx
ce
ptionMessage
(),
null
,
"Unable to write extended attribute '"
+
name
+
"': "
+
x
.
getMessage
());
}
...
...
@@ -224,7 +224,7 @@ class SolarisUserDefinedFileAttributeView
close
(
dfd
);
}
}
catch
(
UnixException
x
)
{
throw
new
FileSystemException
(
file
.
getPathForEx
ec
ptionMessage
(),
throw
new
FileSystemException
(
file
.
getPathForEx
ce
ptionMessage
(),
null
,
"Unable to delete extended attribute '"
+
name
+
"': "
+
x
.
getMessage
());
}
finally
{
...
...
src/solaris/classes/sun/nio/fs/SolarisWatchService.java
浏览文件 @
89d4b110
/*
* Copyright (c) 2008, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 201
2
, 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
...
...
@@ -288,7 +288,7 @@ class SolarisWatchService
return
x
.
asIOException
(
dir
);
}
if
(!
attrs
.
isDirectory
())
{
return
new
NotDirectoryException
(
dir
.
getPathForEx
ec
ptionMessage
());
return
new
NotDirectoryException
(
dir
.
getPathForEx
ce
ptionMessage
());
}
// return existing watch key after updating events if already
...
...
src/solaris/classes/sun/nio/fs/UnixCopyFile.java
浏览文件 @
89d4b110
/*
* Copyright (c) 2008, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 201
2
, 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
...
...
@@ -383,8 +383,8 @@ class UnixCopyFile {
}
catch
(
UnixException
x
)
{
if
(
x
.
errno
()
==
EXDEV
)
{
throw
new
AtomicMoveNotSupportedException
(
source
.
getPathForEx
ec
ptionMessage
(),
target
.
getPathForEx
ec
ptionMessage
(),
source
.
getPathForEx
ce
ptionMessage
(),
target
.
getPathForEx
ce
ptionMessage
(),
x
.
errorString
());
}
x
.
rethrowAsIOException
(
source
,
target
);
...
...
@@ -420,7 +420,7 @@ class UnixCopyFile {
return
;
// nothing to do as files are identical
if
(!
flags
.
replaceExisting
)
{
throw
new
FileAlreadyExistsException
(
target
.
getPathForEx
ec
ptionMessage
());
target
.
getPathForEx
ce
ptionMessage
());
}
// attempt to delete target
...
...
@@ -436,7 +436,7 @@ class UnixCopyFile {
(
x
.
errno
()
==
EEXIST
||
x
.
errno
()
==
ENOTEMPTY
))
{
throw
new
DirectoryNotEmptyException
(
target
.
getPathForEx
ec
ptionMessage
());
target
.
getPathForEx
ce
ptionMessage
());
}
x
.
rethrowAsIOException
(
target
);
}
...
...
@@ -489,7 +489,7 @@ class UnixCopyFile {
(
x
.
errno
()
==
EEXIST
||
x
.
errno
()
==
ENOTEMPTY
))
{
throw
new
DirectoryNotEmptyException
(
source
.
getPathForEx
ec
ptionMessage
());
source
.
getPathForEx
ce
ptionMessage
());
}
x
.
rethrowAsIOException
(
source
);
}
...
...
@@ -542,7 +542,7 @@ class UnixCopyFile {
return
;
// nothing to do as files are identical
if
(!
flags
.
replaceExisting
)
throw
new
FileAlreadyExistsException
(
target
.
getPathForEx
ec
ptionMessage
());
target
.
getPathForEx
ce
ptionMessage
());
try
{
if
(
targetAttrs
.
isDirectory
())
{
rmdir
(
target
);
...
...
@@ -555,7 +555,7 @@ class UnixCopyFile {
(
x
.
errno
()
==
EEXIST
||
x
.
errno
()
==
ENOTEMPTY
))
{
throw
new
DirectoryNotEmptyException
(
target
.
getPathForEx
ec
ptionMessage
());
target
.
getPathForEx
ce
ptionMessage
());
}
x
.
rethrowAsIOException
(
target
);
}
...
...
src/solaris/classes/sun/nio/fs/UnixException.java
浏览文件 @
89d4b110
/*
* Copyright (c) 2008, 20
09
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 20
12
, 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
...
...
@@ -97,8 +97,8 @@ class UnixException extends Exception {
}
void
rethrowAsIOException
(
UnixPath
file
,
UnixPath
other
)
throws
IOException
{
String
a
=
(
file
==
null
)
?
null
:
file
.
getPathForEx
ec
ptionMessage
();
String
b
=
(
other
==
null
)
?
null
:
other
.
getPathForEx
ec
ptionMessage
();
String
a
=
(
file
==
null
)
?
null
:
file
.
getPathForEx
ce
ptionMessage
();
String
b
=
(
other
==
null
)
?
null
:
other
.
getPathForEx
ce
ptionMessage
();
IOException
x
=
translateToIOException
(
a
,
b
);
throw
x
;
}
...
...
@@ -108,6 +108,6 @@ class UnixException extends Exception {
}
IOException
asIOException
(
UnixPath
file
)
{
return
translateToIOException
(
file
.
getPathForEx
ec
ptionMessage
(),
null
);
return
translateToIOException
(
file
.
getPathForEx
ce
ptionMessage
(),
null
);
}
}
src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java
浏览文件 @
89d4b110
/*
* Copyright (c) 2008, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 201
2
, 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
...
...
@@ -238,7 +238,7 @@ public abstract class UnixFileSystemProvider
// DirectoryNotEmptyException if not empty
if
(
attrs
!=
null
&&
attrs
.
isDirectory
()
&&
(
x
.
errno
()
==
EEXIST
||
x
.
errno
()
==
ENOTEMPTY
))
throw
new
DirectoryNotEmptyException
(
file
.
getPathForEx
ec
ptionMessage
());
throw
new
DirectoryNotEmptyException
(
file
.
getPathForEx
ce
ptionMessage
());
x
.
rethrowAsIOException
(
file
);
return
false
;
...
...
@@ -401,7 +401,7 @@ public abstract class UnixFileSystemProvider
return
new
UnixDirectoryStream
(
dir
,
ptr
,
filter
);
}
catch
(
UnixException
x
)
{
if
(
x
.
errno
()
==
ENOTDIR
)
throw
new
NotDirectoryException
(
dir
.
getPathForEx
ec
ptionMessage
());
throw
new
NotDirectoryException
(
dir
.
getPathForEx
ce
ptionMessage
());
x
.
rethrowAsIOException
(
dir
);
}
}
...
...
@@ -421,7 +421,7 @@ public abstract class UnixFileSystemProvider
if
(
dfd2
!=
-
1
)
UnixNativeDispatcher
.
close
(
dfd2
);
if
(
x
.
errno
()
==
UnixConstants
.
ENOTDIR
)
throw
new
NotDirectoryException
(
dir
.
getPathForEx
ec
ptionMessage
());
throw
new
NotDirectoryException
(
dir
.
getPathForEx
ce
ptionMessage
());
x
.
rethrowAsIOException
(
dir
);
}
return
new
UnixSecureDirectoryStream
(
dir
,
dp
,
dfd2
,
filter
);
...
...
@@ -490,7 +490,7 @@ public abstract class UnixFileSystemProvider
return
new
UnixPath
(
link
.
getFileSystem
(),
target
);
}
catch
(
UnixException
x
)
{
if
(
x
.
errno
()
==
UnixConstants
.
EINVAL
)
throw
new
NotLinkException
(
link
.
getPathForEx
ec
ptionMessage
());
throw
new
NotLinkException
(
link
.
getPathForEx
ce
ptionMessage
());
x
.
rethrowAsIOException
(
link
);
return
null
;
// keep compiler happy
}
...
...
src/solaris/classes/sun/nio/fs/UnixPath.java
浏览文件 @
89d4b110
/*
* Copyright (c) 2008, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 201
2
, 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
...
...
@@ -179,7 +179,7 @@ class UnixPath
}
// use this message when throwing exceptions
String
getPathForEx
ec
ptionMessage
()
{
String
getPathForEx
ce
ptionMessage
()
{
return
toString
();
}
...
...
@@ -780,7 +780,7 @@ class UnixPath
x
.
setError
(
ELOOP
);
if
(
x
.
errno
()
==
ELOOP
)
throw
new
FileSystemException
(
getPathForEx
ec
ptionMessage
(),
null
,
throw
new
FileSystemException
(
getPathForEx
ce
ptionMessage
(),
null
,
x
.
getMessage
()
+
" or unable to access attributes of symbolic link"
);
x
.
rethrowAsIOException
(
this
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录