Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
2e027391
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看板
提交
2e027391
编写于
4月 30, 2013
作者:
A
alanb
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8013647: JPRT unable to clean-up after tests that leave file trees with loops
Reviewed-by: chegar, tbell
上级
57cc8031
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
40 addition
and
8 deletion
+40
-8
test/java/nio/file/Files/walkFileTree/MaxDepth.java
test/java/nio/file/Files/walkFileTree/MaxDepth.java
+10
-2
test/java/nio/file/Files/walkFileTree/SkipSiblings.java
test/java/nio/file/Files/walkFileTree/SkipSiblings.java
+10
-2
test/java/nio/file/Files/walkFileTree/SkipSubtree.java
test/java/nio/file/Files/walkFileTree/SkipSubtree.java
+10
-2
test/java/nio/file/Files/walkFileTree/TerminateWalk.java
test/java/nio/file/Files/walkFileTree/TerminateWalk.java
+10
-2
未找到文件。
test/java/nio/file/Files/walkFileTree/MaxDepth.java
浏览文件 @
2e027391
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
/*
/*
* @test
* @test
* @summary Unit test for Files.walkFileTree to test maxDepth parameter
* @summary Unit test for Files.walkFileTree to test maxDepth parameter
* @library ../..
* @compile MaxDepth.java CreateFileTree.java
* @compile MaxDepth.java CreateFileTree.java
* @run main MaxDepth
* @run main MaxDepth
*/
*/
...
@@ -34,9 +35,16 @@ import java.io.IOException;
...
@@ -34,9 +35,16 @@ import java.io.IOException;
import
java.util.*
;
import
java.util.*
;
public
class
MaxDepth
{
public
class
MaxDepth
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
IOException
{
final
Path
top
=
CreateFileTree
.
create
();
Path
top
=
CreateFileTree
.
create
();
try
{
test
(
top
);
}
finally
{
TestUtil
.
removeAll
(
top
);
}
}
static
void
test
(
final
Path
top
)
throws
IOException
{
for
(
int
i
=
0
;
i
<
5
;
i
++)
{
for
(
int
i
=
0
;
i
<
5
;
i
++)
{
Set
<
FileVisitOption
>
opts
=
Collections
.
emptySet
();
Set
<
FileVisitOption
>
opts
=
Collections
.
emptySet
();
final
int
maxDepth
=
i
;
final
int
maxDepth
=
i
;
...
...
test/java/nio/file/Files/walkFileTree/SkipSiblings.java
浏览文件 @
2e027391
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
/*
/*
* @test
* @test
* @summary Unit test for Files.walkFileTree to test SKIP_SIBLINGS return value
* @summary Unit test for Files.walkFileTree to test SKIP_SIBLINGS return value
* @library ../..
* @compile SkipSiblings.java CreateFileTree.java
* @compile SkipSiblings.java CreateFileTree.java
* @run main SkipSiblings
* @run main SkipSiblings
*/
*/
...
@@ -55,9 +56,16 @@ public class SkipSiblings {
...
@@ -55,9 +56,16 @@ public class SkipSiblings {
}
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
Path
dir
=
CreateFileTree
.
create
();
Path
top
=
CreateFileTree
.
create
();
try
{
test
(
top
);
}
finally
{
TestUtil
.
removeAll
(
top
);
}
}
Files
.
walkFileTree
(
dir
,
new
SimpleFileVisitor
<
Path
>()
{
static
void
test
(
final
Path
start
)
throws
IOException
{
Files
.
walkFileTree
(
start
,
new
SimpleFileVisitor
<
Path
>()
{
@Override
@Override
public
FileVisitResult
preVisitDirectory
(
Path
dir
,
BasicFileAttributes
attrs
)
{
public
FileVisitResult
preVisitDirectory
(
Path
dir
,
BasicFileAttributes
attrs
)
{
check
(
dir
);
check
(
dir
);
...
...
test/java/nio/file/Files/walkFileTree/SkipSubtree.java
浏览文件 @
2e027391
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
/*
/*
* @test
* @test
* @summary Unit test for Files.walkFileTree to test SKIP_SUBTREE return value
* @summary Unit test for Files.walkFileTree to test SKIP_SUBTREE return value
* @library ../..
* @compile SkipSubtree.java CreateFileTree.java
* @compile SkipSubtree.java CreateFileTree.java
* @run main SkipSubtree
* @run main SkipSubtree
*/
*/
...
@@ -58,9 +59,16 @@ public class SkipSubtree {
...
@@ -58,9 +59,16 @@ public class SkipSubtree {
}
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
Path
dir
=
CreateFileTree
.
create
();
Path
top
=
CreateFileTree
.
create
();
try
{
test
(
top
);
}
finally
{
TestUtil
.
removeAll
(
top
);
}
}
Files
.
walkFileTree
(
dir
,
new
SimpleFileVisitor
<
Path
>()
{
static
void
test
(
final
Path
start
)
throws
IOException
{
Files
.
walkFileTree
(
start
,
new
SimpleFileVisitor
<
Path
>()
{
@Override
@Override
public
FileVisitResult
preVisitDirectory
(
Path
dir
,
BasicFileAttributes
attrs
)
{
public
FileVisitResult
preVisitDirectory
(
Path
dir
,
BasicFileAttributes
attrs
)
{
check
(
dir
);
check
(
dir
);
...
...
test/java/nio/file/Files/walkFileTree/TerminateWalk.java
浏览文件 @
2e027391
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
/*
/*
* @test
* @test
* @summary Unit test for Files.walkFileTree to test TERMINATE return value
* @summary Unit test for Files.walkFileTree to test TERMINATE return value
* @library ../..
* @compile TerminateWalk.java CreateFileTree.java
* @compile TerminateWalk.java CreateFileTree.java
* @run main TerminateWalk
* @run main TerminateWalk
*/
*/
...
@@ -50,9 +51,16 @@ public class TerminateWalk {
...
@@ -50,9 +51,16 @@ public class TerminateWalk {
}
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
Path
dir
=
CreateFileTree
.
create
();
Path
top
=
CreateFileTree
.
create
();
try
{
test
(
top
);
}
finally
{
TestUtil
.
removeAll
(
top
);
}
}
Files
.
walkFileTree
(
dir
,
new
SimpleFileVisitor
<
Path
>()
{
static
void
test
(
Path
start
)
throws
IOException
{
Files
.
walkFileTree
(
start
,
new
SimpleFileVisitor
<
Path
>()
{
@Override
@Override
public
FileVisitResult
preVisitDirectory
(
Path
dir
,
BasicFileAttributes
attrs
)
{
public
FileVisitResult
preVisitDirectory
(
Path
dir
,
BasicFileAttributes
attrs
)
{
return
maybeTerminate
();
return
maybeTerminate
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录