Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
13d3df04
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看板
提交
13d3df04
编写于
2月 07, 2012
作者:
D
darcy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7143629: JDK jar/zip code should use unsigned library support
Reviewed-by: sherman
上级
260dbba1
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
10 addition
and
10 deletion
+10
-10
src/share/classes/java/util/jar/JarOutputStream.java
src/share/classes/java/util/jar/JarOutputStream.java
+2
-2
src/share/classes/java/util/jar/Manifest.java
src/share/classes/java/util/jar/Manifest.java
+2
-2
src/share/classes/java/util/zip/InflaterInputStream.java
src/share/classes/java/util/zip/InflaterInputStream.java
+2
-2
src/share/classes/java/util/zip/ZipInputStream.java
src/share/classes/java/util/zip/ZipInputStream.java
+2
-2
src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipConstants.java
...re/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipConstants.java
+2
-2
未找到文件。
src/share/classes/java/util/jar/JarOutputStream.java
浏览文件 @
13d3df04
/*
* Copyright (c) 1997, 20
06
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
...
...
@@ -135,7 +135,7 @@ class JarOutputStream extends ZipOutputStream {
* The bytes are assumed to be in Intel (little-endian) byte order.
*/
private
static
int
get16
(
byte
[]
b
,
int
off
)
{
return
(
b
[
off
]
&
0xff
)
|
((
b
[
off
+
1
]
&
0xff
)
<<
8
);
return
Byte
.
toUnsignedInt
(
b
[
off
])
|
(
Byte
.
toUnsignedInt
(
b
[
off
+
1
]
)
<<
8
);
}
/*
...
...
src/share/classes/java/util/jar/Manifest.java
浏览文件 @
13d3df04
/*
* Copyright (c) 1997, 20
06
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
...
...
@@ -339,7 +339,7 @@ public class Manifest implements Cloneable {
return
-
1
;
}
}
return
buf
[
pos
++]
&
0xff
;
return
Byte
.
toUnsignedInt
(
buf
[
pos
++])
;
}
public
int
read
(
byte
[]
b
,
int
off
,
int
len
)
throws
IOException
{
...
...
src/share/classes/java/util/zip/InflaterInputStream.java
浏览文件 @
13d3df04
/*
* Copyright (c) 1996, 20
06
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
...
...
@@ -119,7 +119,7 @@ class InflaterInputStream extends FilterInputStream {
*/
public
int
read
()
throws
IOException
{
ensureOpen
();
return
read
(
singleByteBuf
,
0
,
1
)
==
-
1
?
-
1
:
singleByteBuf
[
0
]
&
0xff
;
return
read
(
singleByteBuf
,
0
,
1
)
==
-
1
?
-
1
:
Byte
.
toUnsignedInt
(
singleByteBuf
[
0
])
;
}
/**
...
...
src/share/classes/java/util/zip/ZipInputStream.java
浏览文件 @
13d3df04
/*
* Copyright (c) 1996, 20
09
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
...
...
@@ -435,7 +435,7 @@ class ZipInputStream extends InflaterInputStream implements ZipConstants {
* The bytes are assumed to be in Intel (little-endian) byte order.
*/
private
static
final
int
get16
(
byte
b
[],
int
off
)
{
return
(
b
[
off
]
&
0xff
)
|
((
b
[
off
+
1
]
&
0xff
)
<<
8
);
return
Byte
.
toUnsignedInt
(
b
[
off
])
|
(
Byte
.
toUnsignedInt
(
b
[
off
+
1
]
)
<<
8
);
}
/*
...
...
src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipConstants.java
浏览文件 @
13d3df04
...
...
@@ -185,11 +185,11 @@ class ZipConstants {
*/
///////////////////////////////////////////////////////
static
final
int
CH
(
byte
[]
b
,
int
n
)
{
return
b
[
n
]
&
0xff
;
return
Byte
.
toUnsignedInt
(
b
[
n
])
;
}
static
final
int
SH
(
byte
[]
b
,
int
n
)
{
return
(
b
[
n
]
&
0xff
)
|
((
b
[
n
+
1
]
&
0xff
)
<<
8
);
return
Byte
.
toUnsignedInt
(
b
[
n
])
|
(
Byte
.
toUnsignedInt
(
b
[
n
+
1
]
)
<<
8
);
}
static
final
long
LG
(
byte
[]
b
,
int
n
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录