Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
jenkins
提交
a43efeab
J
jenkins
项目概览
xxadev
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a43efeab
编写于
2月 20, 2019
作者:
J
Josh Soref
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use java style array declaration instead of C style
上级
007dca59
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
30 addition
and
26 deletion
+30
-26
core/src/main/java/hudson/model/UsageStatistics.java
core/src/main/java/hudson/model/UsageStatistics.java
+1
-1
core/src/main/java/hudson/tools/AbstractCommandInstaller.java
.../src/main/java/hudson/tools/AbstractCommandInstaller.java
+1
-1
core/src/main/java/hudson/util/AtomicFileWriter.java
core/src/main/java/hudson/util/AtomicFileWriter.java
+1
-1
core/src/main/java/hudson/util/ByteBuffer.java
core/src/main/java/hudson/util/ByteBuffer.java
+2
-2
core/src/main/java/hudson/util/CharSpool.java
core/src/main/java/hudson/util/CharSpool.java
+1
-1
core/src/main/java/hudson/util/ChunkedInputStream.java
core/src/main/java/hudson/util/ChunkedInputStream.java
+1
-1
core/src/main/java/hudson/util/ChunkedOutputStream.java
core/src/main/java/hudson/util/ChunkedOutputStream.java
+14
-10
core/src/main/java/hudson/util/FileChannelWriter.java
core/src/main/java/hudson/util/FileChannelWriter.java
+1
-1
core/src/main/java/hudson/util/HeadBufferingStream.java
core/src/main/java/hudson/util/HeadBufferingStream.java
+1
-1
core/src/main/java/hudson/util/LineEndNormalizingWriter.java
core/src/main/java/hudson/util/LineEndNormalizingWriter.java
+2
-2
core/src/main/java/hudson/util/NullStream.java
core/src/main/java/hudson/util/NullStream.java
+2
-2
core/src/main/java/hudson/util/WriterOutputStream.java
core/src/main/java/hudson/util/WriterOutputStream.java
+1
-1
core/src/main/java/jenkins/org/apache/commons/validator/routines/DomainValidator.java
...rg/apache/commons/validator/routines/DomainValidator.java
+1
-1
core/src/main/java/jenkins/util/MarkFindingOutputStream.java
core/src/main/java/jenkins/util/MarkFindingOutputStream.java
+1
-1
未找到文件。
core/src/main/java/hudson/model/UsageStatistics.java
浏览文件 @
a43efeab
...
...
@@ -159,7 +159,7 @@ public class UsageStatistics extends PageDecorator implements PersistentDescript
// capture the descriptors as these should be small compared with the number of items
// so we will walk all items only once and we can short-cut the search of descriptors
TopLevelItemDescriptor
[]
descriptors
=
Items
.
all
().
toArray
(
new
TopLevelItemDescriptor
[
0
]);
int
counts
[]
=
new
int
[
descriptors
.
length
];
int
[]
counts
=
new
int
[
descriptors
.
length
];
for
(
TopLevelItem
item:
j
.
allItems
(
TopLevelItem
.
class
))
{
TopLevelItemDescriptor
d
=
item
.
getDescriptor
();
for
(
int
i
=
0
;
i
<
descriptors
.
length
;
i
++)
{
...
...
core/src/main/java/hudson/tools/AbstractCommandInstaller.java
浏览文件 @
a43efeab
...
...
@@ -73,7 +73,7 @@ public abstract class AbstractCommandInstaller extends ToolInstaller {
// TODO support Unix scripts with interpreter line (see Shell.buildCommandLine)
FilePath
script
=
dir
.
createTextTempFile
(
"hudson"
,
getCommandFileExtension
(),
command
);
try
{
String
cmd
[]
=
getCommandCall
(
script
);
String
[]
cmd
=
getCommandCall
(
script
);
int
r
=
node
.
createLauncher
(
log
).
launch
().
cmds
(
cmd
).
stdout
(
log
).
pwd
(
dir
).
join
();
if
(
r
!=
0
)
{
throw
new
IOException
(
"Command returned status "
+
r
);
...
...
core/src/main/java/hudson/util/AtomicFileWriter.java
浏览文件 @
a43efeab
...
...
@@ -162,7 +162,7 @@ public class AtomicFileWriter extends Writer {
core
.
write
(
str
,
off
,
len
);
}
public
void
write
(
char
cbuf
[]
,
int
off
,
int
len
)
throws
IOException
{
public
void
write
(
char
[]
cbuf
,
int
off
,
int
len
)
throws
IOException
{
core
.
write
(
cbuf
,
off
,
len
);
}
...
...
core/src/main/java/hudson/util/ByteBuffer.java
浏览文件 @
a43efeab
...
...
@@ -46,7 +46,7 @@ public class ByteBuffer extends OutputStream {
private
int
size
=
0
;
public
synchronized
void
write
(
byte
b
[]
,
int
off
,
int
len
)
throws
IOException
{
public
synchronized
void
write
(
byte
[]
b
,
int
off
,
int
len
)
throws
IOException
{
ensureCapacity
(
len
);
System
.
arraycopy
(
b
,
off
,
buf
,
size
,
len
);
size
+=
len
;
...
...
@@ -94,7 +94,7 @@ public class ByteBuffer extends OutputStream {
}
}
public
int
read
(
byte
b
[]
,
int
off
,
int
len
)
throws
IOException
{
public
int
read
(
byte
[]
b
,
int
off
,
int
len
)
throws
IOException
{
synchronized
(
ByteBuffer
.
this
)
{
if
(
size
==
pos
)
return
-
1
;
...
...
core/src/main/java/hudson/util/CharSpool.java
浏览文件 @
a43efeab
...
...
@@ -41,7 +41,7 @@ public final class CharSpool extends Writer {
private
char
[]
last
=
new
char
[
1024
];
private
int
pos
;
public
void
write
(
char
cbuf
[]
,
int
off
,
int
len
)
{
public
void
write
(
char
[]
cbuf
,
int
off
,
int
len
)
{
while
(
len
>
0
)
{
int
sz
=
Math
.
min
(
last
.
length
-
pos
,
len
);
System
.
arraycopy
(
cbuf
,
off
,
last
,
pos
,
sz
);
...
...
core/src/main/java/hudson/util/ChunkedInputStream.java
浏览文件 @
a43efeab
...
...
@@ -342,7 +342,7 @@ public class ChunkedInputStream extends InputStream {
*/
static
void
exhaustInputStream
(
InputStream
inStream
)
throws
IOException
{
// read and discard the remainder of the message
byte
buffer
[]
=
new
byte
[
1024
];
byte
[]
buffer
=
new
byte
[
1024
];
while
(
inStream
.
read
(
buffer
)
>=
0
)
{
;
}
...
...
core/src/main/java/hudson/util/ChunkedOutputStream.java
浏览文件 @
a43efeab
...
...
@@ -42,13 +42,17 @@ import java.io.OutputStream;
public
class
ChunkedOutputStream
extends
OutputStream
{
// ------------------------------------------------------- Static Variables
private
static
final
byte
CRLF
[]
=
new
byte
[]
{(
byte
)
13
,
(
byte
)
10
};
private
static
final
byte
[]
CRLF
=
new
byte
[]
{(
byte
)
13
,
(
byte
)
10
};
/** End chunk */
private
static
final
byte
ENDCHUNK
[]
=
CRLF
;
/**
* End chunk
*/
private
static
final
byte
[]
ENDCHUNK
=
CRLF
;
/** 0 */
private
static
final
byte
ZERO
[]
=
new
byte
[]
{(
byte
)
'0'
};
/**
* 0
*/
private
static
final
byte
[]
ZERO
=
new
byte
[]{(
byte
)
'0'
};
// ----------------------------------------------------- Instance Variables
private
OutputStream
stream
=
null
;
...
...
@@ -92,7 +96,7 @@ public class ChunkedOutputStream extends OutputStream {
*/
protected
void
flushCache
()
throws
IOException
{
if
(
cachePosition
>
0
)
{
byte
chunkHeader
[]
=
(
Integer
.
toHexString
(
cachePosition
)
+
"\r\n"
).
getBytes
(
"US-ASCII"
);
byte
[]
chunkHeader
=
(
Integer
.
toHexString
(
cachePosition
)
+
"\r\n"
).
getBytes
(
"US-ASCII"
);
stream
.
write
(
chunkHeader
,
0
,
chunkHeader
.
length
);
stream
.
write
(
cache
,
0
,
cachePosition
);
stream
.
write
(
ENDCHUNK
,
0
,
ENDCHUNK
.
length
);
...
...
@@ -110,8 +114,8 @@ public class ChunkedOutputStream extends OutputStream {
*
* @since 3.0
*/
protected
void
flushCacheWithAppend
(
byte
bufferToAppend
[]
,
int
off
,
int
len
)
throws
IOException
{
byte
chunkHeader
[]
=
(
Integer
.
toHexString
(
cachePosition
+
len
)
+
"\r\n"
).
getBytes
(
"US-ASCII"
);
protected
void
flushCacheWithAppend
(
byte
[]
bufferToAppend
,
int
off
,
int
len
)
throws
IOException
{
byte
[]
chunkHeader
=
(
Integer
.
toHexString
(
cachePosition
+
len
)
+
"\r\n"
).
getBytes
(
"US-ASCII"
);
stream
.
write
(
chunkHeader
,
0
,
chunkHeader
.
length
);
stream
.
write
(
cache
,
0
,
cachePosition
);
stream
.
write
(
bufferToAppend
,
off
,
len
);
...
...
@@ -167,12 +171,12 @@ public class ChunkedOutputStream extends OutputStream {
* @since 3.0
*/
@Override
public
void
write
(
byte
b
[]
)
throws
IOException
{
public
void
write
(
byte
[]
b
)
throws
IOException
{
this
.
write
(
b
,
0
,
b
.
length
);
}
@Override
public
void
write
(
byte
src
[]
,
int
off
,
int
len
)
throws
IOException
{
public
void
write
(
byte
[]
src
,
int
off
,
int
len
)
throws
IOException
{
if
(
len
>=
cache
.
length
-
cachePosition
)
{
flushCacheWithAppend
(
src
,
off
,
len
);
}
else
{
...
...
core/src/main/java/hudson/util/FileChannelWriter.java
浏览文件 @
a43efeab
...
...
@@ -66,7 +66,7 @@ public class FileChannelWriter extends Writer {
}
@Override
public
void
write
(
char
cbuf
[]
,
int
off
,
int
len
)
throws
IOException
{
public
void
write
(
char
[]
cbuf
,
int
off
,
int
len
)
throws
IOException
{
final
CharBuffer
charBuffer
=
CharBuffer
.
wrap
(
cbuf
,
off
,
len
);
ByteBuffer
byteBuffer
=
charset
.
encode
(
charBuffer
);
channel
.
write
(
byteBuffer
);
...
...
core/src/main/java/hudson/util/HeadBufferingStream.java
浏览文件 @
a43efeab
...
...
@@ -57,7 +57,7 @@ public class HeadBufferingStream extends FilterInputStream {
}
@Override
public
int
read
(
byte
b
[]
,
int
off
,
int
len
)
throws
IOException
{
public
int
read
(
byte
[]
b
,
int
off
,
int
len
)
throws
IOException
{
int
r
=
in
.
read
(
b
,
off
,
len
);
if
(
r
>
0
)
{
int
sp
=
space
();
...
...
core/src/main/java/hudson/util/LineEndNormalizingWriter.java
浏览文件 @
a43efeab
...
...
@@ -48,7 +48,7 @@ public class LineEndNormalizingWriter extends FilterWriter {
super
(
out
);
}
public
void
write
(
char
cbuf
[]
)
throws
IOException
{
public
void
write
(
char
[]
cbuf
)
throws
IOException
{
write
(
cbuf
,
0
,
cbuf
.
length
);
}
...
...
@@ -64,7 +64,7 @@ public class LineEndNormalizingWriter extends FilterWriter {
seenCR
=
(
c
==
CR
);
}
public
void
write
(
char
cbuf
[]
,
int
off
,
int
len
)
throws
IOException
{
public
void
write
(
char
[]
cbuf
,
int
off
,
int
len
)
throws
IOException
{
int
end
=
off
+
len
;
int
writeBegin
=
off
;
...
...
core/src/main/java/hudson/util/NullStream.java
浏览文件 @
a43efeab
...
...
@@ -32,11 +32,11 @@ public final class NullStream extends OutputStream {
public
NullStream
()
{}
@Override
public
void
write
(
byte
b
[]
)
{
public
void
write
(
byte
[]
b
)
{
}
@Override
public
void
write
(
byte
b
[]
,
int
off
,
int
len
)
{
public
void
write
(
byte
[]
b
,
int
off
,
int
len
)
{
}
public
void
write
(
int
b
)
{
...
...
core/src/main/java/hudson/util/WriterOutputStream.java
浏览文件 @
a43efeab
...
...
@@ -62,7 +62,7 @@ public class WriterOutputStream extends OutputStream {
buf
.
put
((
byte
)
b
);
}
public
void
write
(
byte
b
[]
,
int
off
,
int
len
)
throws
IOException
{
public
void
write
(
byte
[]
b
,
int
off
,
int
len
)
throws
IOException
{
while
(
len
>
0
)
{
if
(
buf
.
remaining
()==
0
)
decode
(
false
);
...
...
core/src/main/java/jenkins/org/apache/commons/validator/routines/DomainValidator.java
浏览文件 @
a43efeab
...
...
@@ -1961,7 +1961,7 @@ public class DomainValidator implements Serializable {
* @since 1.5.1
*/
public
static
String
[]
getTLDEntries
(
DomainValidator
.
ArrayType
table
)
{
final
String
array
[]
;
final
String
[]
array
;
switch
(
table
)
{
case
COUNTRY_CODE_MINUS:
array
=
countryCodeTLDsMinus
;
...
...
core/src/main/java/jenkins/util/MarkFindingOutputStream.java
浏览文件 @
a43efeab
...
...
@@ -46,7 +46,7 @@ public abstract class MarkFindingOutputStream extends OutputStream {
}
}
public
void
write
(
byte
b
[]
,
int
off
,
int
len
)
throws
IOException
{
public
void
write
(
byte
[]
b
,
int
off
,
int
len
)
throws
IOException
{
final
int
start
=
off
;
final
int
end
=
off
+
len
;
for
(
int
i
=
off
;
i
<
end
;
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录