Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
dca2798b
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看板
提交
dca2798b
编写于
2月 15, 2010
作者:
M
mchung
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
99d68f9a
2490d6a9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
45 addition
and
24 deletion
+45
-24
src/share/classes/com/sun/java/util/jar/pack/PackageReader.java
...are/classes/com/sun/java/util/jar/pack/PackageReader.java
+1
-2
src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java
...are/classes/com/sun/java/util/jar/pack/PackageWriter.java
+1
-2
src/share/classes/com/sun/java/util/jar/pack/Utils.java
src/share/classes/com/sun/java/util/jar/pack/Utils.java
+43
-20
未找到文件。
src/share/classes/com/sun/java/util/jar/pack/PackageReader.java
浏览文件 @
dca2798b
...
@@ -27,7 +27,6 @@ package com.sun.java.util.jar.pack;
...
@@ -27,7 +27,6 @@ package com.sun.java.util.jar.pack;
import
java.io.*
;
import
java.io.*
;
import
java.util.*
;
import
java.util.*
;
import
java.util.logging.Level
;
import
com.sun.java.util.jar.pack.Package.Class
;
import
com.sun.java.util.jar.pack.Package.Class
;
import
com.sun.java.util.jar.pack.Package.File
;
import
com.sun.java.util.jar.pack.Package.File
;
import
com.sun.java.util.jar.pack.Package.InnerClass
;
import
com.sun.java.util.jar.pack.Package.InnerClass
;
...
@@ -162,7 +161,7 @@ class PackageReader extends BandStructure {
...
@@ -162,7 +161,7 @@ class PackageReader extends BandStructure {
ok
=
true
;
ok
=
true
;
}
catch
(
Exception
ee
)
{
}
catch
(
Exception
ee
)
{
Utils
.
log
.
log
(
Level
.
WARNING
,
"Error on input: "
+
ee
,
ee
);
Utils
.
log
.
warning
(
"Error on input: "
+
ee
,
ee
);
if
(
verbose
>
0
)
if
(
verbose
>
0
)
Utils
.
log
.
info
(
"Stream offsets:"
+
Utils
.
log
.
info
(
"Stream offsets:"
+
" served="
+
in
.
getBytesServed
()+
" served="
+
in
.
getBytesServed
()+
...
...
src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java
浏览文件 @
dca2798b
...
@@ -27,7 +27,6 @@ package com.sun.java.util.jar.pack;
...
@@ -27,7 +27,6 @@ package com.sun.java.util.jar.pack;
import
java.io.*
;
import
java.io.*
;
import
java.util.*
;
import
java.util.*
;
import
java.util.logging.Level
;
import
com.sun.java.util.jar.pack.Package.Class
;
import
com.sun.java.util.jar.pack.Package.Class
;
import
com.sun.java.util.jar.pack.Package.File
;
import
com.sun.java.util.jar.pack.Package.File
;
import
com.sun.java.util.jar.pack.Package.InnerClass
;
import
com.sun.java.util.jar.pack.Package.InnerClass
;
...
@@ -84,7 +83,7 @@ class PackageWriter extends BandStructure {
...
@@ -84,7 +83,7 @@ class PackageWriter extends BandStructure {
ok
=
true
;
ok
=
true
;
}
catch
(
Exception
ee
)
{
}
catch
(
Exception
ee
)
{
Utils
.
log
.
log
(
Level
.
WARNING
,
"Error on output: "
+
ee
,
ee
);
Utils
.
log
.
warning
(
"Error on output: "
+
ee
,
ee
);
//if (verbose > 0) ee.printStackTrace();
//if (verbose > 0) ee.printStackTrace();
// Write partial output only if we are verbose.
// Write partial output only if we are verbose.
if
(
verbose
>
0
)
finalOut
.
close
();
if
(
verbose
>
0
)
finalOut
.
close
();
...
...
src/share/classes/com/sun/java/util/jar/pack/Utils.java
浏览文件 @
dca2798b
...
@@ -28,9 +28,10 @@ package com.sun.java.util.jar.pack;
...
@@ -28,9 +28,10 @@ package com.sun.java.util.jar.pack;
import
java.util.*
;
import
java.util.*
;
import
java.util.jar.*
;
import
java.util.jar.*
;
import
java.util.zip.*
;
import
java.util.zip.*
;
import
java.util.logging.*
;
import
java.io.*
;
import
java.io.*
;
import
sun.util.logging.PlatformLogger
;
class
Utils
{
class
Utils
{
static
final
String
COM_PREFIX
=
"com.sun.java.util.jar.pack."
;
static
final
String
COM_PREFIX
=
"com.sun.java.util.jar.pack."
;
static
final
String
METAINF
=
"META-INF"
;
static
final
String
METAINF
=
"META-INF"
;
...
@@ -130,31 +131,53 @@ class Utils {
...
@@ -130,31 +131,53 @@ class Utils {
=
Boolean
.
getBoolean
(
Utils
.
COM_PREFIX
+
"nolog"
);
=
Boolean
.
getBoolean
(
Utils
.
COM_PREFIX
+
"nolog"
);
static
final
Logger
log
static
class
Pack200Logger
{
=
new
Logger
(
"java.util.jar.Pack200"
,
null
)
{
private
final
String
name
;
public
void
log
(
LogRecord
record
)
{
private
PlatformLogger
log
;
int
verbose
=
currentPropMap
().
getInteger
(
DEBUG_VERBOSE
);
Pack200Logger
(
String
name
)
{
if
(
verbose
>
0
)
{
this
.
name
=
name
;
if
(
nolog
&&
}
record
.
getLevel
().
intValue
()
<
Level
.
WARNING
.
intValue
())
{
System
.
out
.
println
(
record
.
getMessage
());
private
synchronized
PlatformLogger
getLogger
()
{
}
else
{
if
(
log
==
null
)
{
super
.
log
(
record
);
log
=
PlatformLogger
.
getLogger
(
name
);
}
}
}
}
return
log
;
}
public
void
warning
(
String
msg
,
Object
param
)
{
int
verbose
=
currentPropMap
().
getInteger
(
DEBUG_VERBOSE
);
if
(
verbose
>
0
)
{
getLogger
().
warning
(
msg
,
param
);
}
}
public
void
fine
(
String
msg
)
{
public
void
warning
(
String
msg
)
{
int
verbose
=
currentPropMap
().
getInteger
(
DEBUG_VERBOSE
);
warning
(
msg
,
null
);
if
(
verbose
>
0
)
{
}
System
.
out
.
println
(
msg
);
public
void
info
(
String
msg
)
{
int
verbose
=
currentPropMap
().
getInteger
(
DEBUG_VERBOSE
);
if
(
verbose
>
0
)
{
if
(
nolog
)
{
System
.
out
.
println
(
msg
);
}
else
{
getLogger
().
info
(
msg
);
}
}
}
}
};
}
static
{
LogManager
.
getLogManager
().
addLogger
(
log
);
public
void
fine
(
String
msg
)
{
int
verbose
=
currentPropMap
().
getInteger
(
DEBUG_VERBOSE
);
if
(
verbose
>
0
)
{
System
.
out
.
println
(
msg
);
}
}
}
}
static
final
Pack200Logger
log
=
new
Pack200Logger
(
"java.util.jar.Pack200"
);
// Returns the Max Version String of this implementation
// Returns the Max Version String of this implementation
static
String
getVersionString
()
{
static
String
getVersionString
()
{
return
"Pack200, Vendor: Sun Microsystems, Version: "
+
return
"Pack200, Vendor: Sun Microsystems, Version: "
+
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录