Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
jenkins
提交
a0d6e528
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,发现更多精彩内容 >>
提交
a0d6e528
编写于
2月 27, 2014
作者:
J
Jesse Glick
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed outstanding uses in core of deprecations from #1135 & #1138.
上级
f9953add
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
40 addition
and
40 deletion
+40
-40
core/src/main/java/hudson/FilePath.java
core/src/main/java/hudson/FilePath.java
+8
-8
core/src/main/java/hudson/cli/ConsoleCommand.java
core/src/main/java/hudson/cli/ConsoleCommand.java
+2
-2
core/src/main/java/hudson/model/DownloadService.java
core/src/main/java/hudson/model/DownloadService.java
+1
-1
core/src/main/java/hudson/model/UpdateSite.java
core/src/main/java/hudson/model/UpdateSite.java
+1
-1
core/src/main/java/hudson/slaves/SlaveComputer.java
core/src/main/java/hudson/slaves/SlaveComputer.java
+1
-1
core/src/main/java/hudson/util/TextFile.java
core/src/main/java/hudson/util/TextFile.java
+1
-1
core/src/main/java/jenkins/diagnosis/HsErrPidList.java
core/src/main/java/jenkins/diagnosis/HsErrPidList.java
+1
-1
core/src/main/java/jenkins/security/DefaultConfidentialStore.java
.../main/java/jenkins/security/DefaultConfidentialStore.java
+1
-1
core/src/main/resources/META-INF/upgrade/IOUtils.hint
core/src/main/resources/META-INF/upgrade/IOUtils.hint
+23
-23
core/src/test/java/jenkins/RemotingJarSignatureTest.java
core/src/test/java/jenkins/RemotingJarSignatureTest.java
+1
-1
未找到文件。
core/src/main/java/hudson/FilePath.java
浏览文件 @
a0d6e528
...
...
@@ -665,7 +665,7 @@ public final class FilePath implements Serializable {
private
static
final
long
serialVersionUID
=
1L
;
});
}
finally
{
IOUtils
.
closeQuietly
(
_in
);
org
.
apache
.
commons
.
io
.
IOUtils
.
closeQuietly
(
_in
);
}
}
...
...
@@ -815,7 +815,7 @@ public final class FilePath implements Serializable {
public
void
copyFrom
(
InputStream
in
)
throws
IOException
,
InterruptedException
{
OutputStream
os
=
write
();
try
{
IOUtils
.
copy
(
in
,
os
);
org
.
apache
.
commons
.
io
.
IOUtils
.
copy
(
in
,
os
);
}
finally
{
os
.
close
();
}
...
...
@@ -846,7 +846,7 @@ public final class FilePath implements Serializable {
InputStream
i
=
file
.
getInputStream
();
OutputStream
o
=
write
();
try
{
IOUtils
.
copy
(
i
,
o
);
org
.
apache
.
commons
.
io
.
IOUtils
.
copy
(
i
,
o
);
}
finally
{
try
{
o
.
close
();
...
...
@@ -1640,8 +1640,8 @@ public final class FilePath implements Serializable {
Util
.
copyStream
(
fis
,
p
.
getOut
());
return
null
;
}
finally
{
IOUtils
.
closeQuietly
(
fis
);
IOUtils
.
closeQuietly
(
p
.
getOut
());
org
.
apache
.
commons
.
io
.
IOUtils
.
closeQuietly
(
fis
);
org
.
apache
.
commons
.
io
.
IOUtils
.
closeQuietly
(
p
.
getOut
());
}
}
});
...
...
@@ -1655,7 +1655,7 @@ public final class FilePath implements Serializable {
public
String
readToString
()
throws
IOException
{
InputStream
in
=
read
();
try
{
return
IOUtils
.
toString
(
in
);
return
org
.
apache
.
commons
.
io
.
IOUtils
.
toString
(
in
);
}
finally
{
in
.
close
();
}
...
...
@@ -1815,8 +1815,8 @@ public final class FilePath implements Serializable {
Util
.
copyStream
(
fis
,
out
);
return
null
;
}
finally
{
IOUtils
.
closeQuietly
(
fis
);
IOUtils
.
closeQuietly
(
out
);
org
.
apache
.
commons
.
io
.
IOUtils
.
closeQuietly
(
fis
);
org
.
apache
.
commons
.
io
.
IOUtils
.
closeQuietly
(
out
);
}
}
});
...
...
core/src/main/java/hudson/cli/ConsoleCommand.java
浏览文件 @
a0d6e528
...
...
@@ -77,7 +77,7 @@ public class ConsoleCommand extends CLICommand {
}
else
{
InputStream
in
=
run
.
getLogInputStream
();
IOUtils
.
skip
(
in
,
pos
);
IOUtils
.
copy
(
new
InputStreamReader
(
in
,
run
.
getCharset
()),
w
);
org
.
apache
.
commons
.
io
.
IOUtils
.
copy
(
new
InputStreamReader
(
in
,
run
.
getCharset
()),
w
);
}
}
finally
{
w
.
flush
();
// this pointless flush needed to work around SSHD-154
...
...
@@ -134,7 +134,7 @@ public class ConsoleCommand extends CLICommand {
return
rb
.
get
();
}
finally
{
IOUtils
.
closeQuietly
(
in
);
org
.
apache
.
commons
.
io
.
IOUtils
.
closeQuietly
(
in
);
}
}
...
...
core/src/main/java/hudson/model/DownloadService.java
浏览文件 @
a0d6e528
...
...
@@ -28,7 +28,6 @@ import hudson.ExtensionList;
import
hudson.ExtensionPoint
;
import
hudson.util.FormValidation
;
import
hudson.util.FormValidation.Kind
;
import
hudson.util.IOUtils
;
import
hudson.util.QuotedStringTokenizer
;
import
hudson.util.TextFile
;
import
jenkins.model.Jenkins
;
...
...
@@ -45,6 +44,7 @@ import org.kohsuke.stapler.StaplerRequest;
import
org.kohsuke.stapler.StaplerResponse
;
import
static
hudson
.
util
.
TimeUnit2
.
DAYS
;
import
org.apache.commons.io.IOUtils
;
/**
* Service for plugins to periodically retrieve update data files
...
...
core/src/main/java/hudson/model/UpdateSite.java
浏览文件 @
a0d6e528
...
...
@@ -33,7 +33,6 @@ import hudson.model.UpdateCenter.UpdateCenterJob;
import
hudson.util.FormValidation
;
import
hudson.util.FormValidation.Kind
;
import
hudson.util.HttpResponses
;
import
hudson.util.IOUtils
;
import
hudson.util.TextFile
;
import
hudson.util.VersionNumber
;
import
jenkins.model.Jenkins
;
...
...
@@ -69,6 +68,7 @@ import java.util.logging.Level;
import
java.util.logging.Logger
;
import
static
hudson
.
util
.
TimeUnit2
.*;
import
org.apache.commons.io.IOUtils
;
/**
...
...
core/src/main/java/hudson/slaves/SlaveComputer.java
浏览文件 @
a0d6e528
...
...
@@ -24,7 +24,6 @@
package
hudson.slaves
;
import
hudson.model.*
;
import
hudson.util.IOUtils
;
import
hudson.util.io.ReopenableRotatingFileOutputStream
;
import
jenkins.model.Jenkins.MasterComputer
;
import
hudson.remoting.Channel
;
...
...
@@ -82,6 +81,7 @@ import javax.servlet.ServletOutputStream;
import
javax.servlet.http.HttpServletResponseWrapper
;
import
org.acegisecurity.context.SecurityContext
;
import
org.acegisecurity.context.SecurityContextHolder
;
import
org.apache.commons.io.IOUtils
;
import
org.kohsuke.stapler.ResponseImpl
;
import
org.kohsuke.stapler.WebMethod
;
import
org.kohsuke.stapler.compression.FilterServletOutputStream
;
...
...
core/src/main/java/hudson/util/TextFile.java
浏览文件 @
a0d6e528
...
...
@@ -108,7 +108,7 @@ public class TextFile {
return
new
String
(
buf
,
0
,
read
);
}
finally
{
IOUtils
.
closeQuietly
(
r
);
org
.
apache
.
commons
.
io
.
IOUtils
.
closeQuietly
(
r
);
}
}
...
...
core/src/main/java/jenkins/diagnosis/HsErrPidList.java
浏览文件 @
a0d6e528
...
...
@@ -5,7 +5,6 @@ import hudson.Extension;
import
hudson.Functions
;
import
hudson.Util
;
import
hudson.model.AdministrativeMonitor
;
import
hudson.util.IOUtils
;
import
hudson.util.jna.Kernel32Utils
;
import
jenkins.model.Jenkins
;
import
org.apache.tools.ant.DirectoryScanner
;
...
...
@@ -24,6 +23,7 @@ import java.util.ArrayList;
import
java.util.List
;
import
java.util.logging.Level
;
import
java.util.logging.Logger
;
import
org.apache.commons.io.IOUtils
;
/**
* Finds crash dump reports and show them in the UI.
...
...
core/src/main/java/jenkins/security/DefaultConfidentialStore.java
浏览文件 @
a0d6e528
...
...
@@ -2,7 +2,6 @@ package jenkins.security;
import
hudson.FilePath
;
import
hudson.Util
;
import
hudson.util.IOUtils
;
import
hudson.util.Secret
;
import
hudson.util.TextFile
;
import
jenkins.model.Jenkins
;
...
...
@@ -17,6 +16,7 @@ import java.io.FileOutputStream;
import
java.io.IOException
;
import
java.security.GeneralSecurityException
;
import
java.security.SecureRandom
;
import
org.apache.commons.io.IOUtils
;
/**
* Default portable implementation of {@link ConfidentialStore} that uses
...
...
core/src/main/resources/META-INF/upgrade/IOUtils.hint
浏览文件 @
a0d6e528
<!description="PRs #1135, #1138: use IOUtils from Apache commons">
hudson.util.IOUtils.DIR_SEPARATOR_UNIX => org.apache.commons.io.IOUtils.DIR_SEPARATOR_UNIX;
hudson.util.IOUtils.DIR_SEPARATOR_WINDOWS => org.apache.commons.io.IOUtils.DIR_SEPARATOR_WINDOWS;
hudson.util.IOUtils.DIR_SEPARATOR => org.apache.commons.io.IOUtils.DIR_SEPARATOR;
hudson.util.IOUtils.LINE_SEPARATOR_UNIX => org.apache.commons.io.IOUtils.LINE_SEPARATOR_UNIX;
hudson.util.IOUtils.LINE_SEPARATOR_WINDOWS => org.apache.commons.io.IOUtils.LINE_SEPARATOR_WINDOWS;
hudson.util.IOUtils.LINE_SEPARATOR => org.apache.commons.io.IOUtils.LINE_SEPARATOR;
hudson.util.IOUtils.closeQuietly($args$) => org.apache.commons.io.IOUtils.closeQuietly($args$);
hudson.util.IOUtils.toByteArray($args$) => org.apache.commons.io.IOUtils.toByteArray($args$);
hudson.util.IOUtils.toCharArray($args$) => org.apache.commons.io.IOUtils.toCharArray($args$);
hudson.util.IOUtils.toString($args$) => org.apache.commons.io.IOUtils.toString($args$);
hudson.util.IOUtils.readLines($args$) => org.apache.commons.io.IOUtils.readLines($args$);
hudson.util.IOUtils.lineIterator($args$) => org.apache.commons.io.IOUtils.lineIterator($args$);
hudson.util.IOUtils.toInputStream($args$) => org.apache.commons.io.IOUtils.toInputStream($args$);
hudson.util.IOUtils.write($args$) => org.apache.commons.io.IOUtils.write($args$);
hudson.util.IOUtils.writeLines($args$) => org.apache.commons.io.IOUtils.writeLines($args$);
hudson.util.IOUtils.DIR_SEPARATOR_UNIX => org.apache.commons.io.IOUtils.DIR_SEPARATOR_UNIX;
;
hudson.util.IOUtils.DIR_SEPARATOR_WINDOWS => org.apache.commons.io.IOUtils.DIR_SEPARATOR_WINDOWS;
;
hudson.util.IOUtils.DIR_SEPARATOR => org.apache.commons.io.IOUtils.DIR_SEPARATOR;
;
hudson.util.IOUtils.LINE_SEPARATOR_UNIX => org.apache.commons.io.IOUtils.LINE_SEPARATOR_UNIX;
;
hudson.util.IOUtils.LINE_SEPARATOR_WINDOWS => org.apache.commons.io.IOUtils.LINE_SEPARATOR_WINDOWS;
;
hudson.util.IOUtils.LINE_SEPARATOR => org.apache.commons.io.IOUtils.LINE_SEPARATOR;
;
hudson.util.IOUtils.closeQuietly($args$) => org.apache.commons.io.IOUtils.closeQuietly($args$);
;
hudson.util.IOUtils.toByteArray($args$) => org.apache.commons.io.IOUtils.toByteArray($args$);
;
hudson.util.IOUtils.toCharArray($args$) => org.apache.commons.io.IOUtils.toCharArray($args$);
;
hudson.util.IOUtils.toString($args$) => org.apache.commons.io.IOUtils.toString($args$);
;
hudson.util.IOUtils.readLines($args$) => org.apache.commons.io.IOUtils.readLines($args$);
;
hudson.util.IOUtils.lineIterator($args$) => org.apache.commons.io.IOUtils.lineIterator($args$);
;
hudson.util.IOUtils.toInputStream($args$) => org.apache.commons.io.IOUtils.toInputStream($args$);
;
hudson.util.IOUtils.write($args$) => org.apache.commons.io.IOUtils.write($args$);
;
hudson.util.IOUtils.writeLines($args$) => org.apache.commons.io.IOUtils.writeLines($args$);
;
// Cannot use $args$ wildcard for copy since there are two non-deprecated overloads:
hudson.util.IOUtils.copy($input, $output) :: $input instanceof java.io.InputStream && $output instanceof java.io.OutputStream => org.apache.commons.io.IOUtils.copy($input, $output);
hudson.util.IOUtils.copy($input, $output) :: $input instanceof java.io.InputStream && $output instanceof java.io.Writer => org.apache.commons.io.IOUtils.copy($input, $output);
hudson.util.IOUtils.copy($input, $output, $encoding) :: $input instanceof java.io.InputStream && $output instanceof java.io.Writer && $encoding instanceof java.lang.String => org.apache.commons.io.IOUtils.copy($input, $output, $encoding);
hudson.util.IOUtils.copy($input, $output) :: $input instanceof java.io.Reader && $output instanceof java.io.Writer => org.apache.commons.io.IOUtils.copy($input, $output);
hudson.util.IOUtils.copy($input, $output) :: $input instanceof java.io.Reader && $output instanceof java.io.OutputStream => org.apache.commons.io.IOUtils.copy($input, $output);
hudson.util.IOUtils.copy($input, $output, $encoding) :: $input instanceof java.io.Reader && $output instanceof java.io.OutputStream && $encoding instanceof java.lang.String => org.apache.commons.io.IOUtils.copy($input, $output, $encoding);
hudson.util.IOUtils.copyLarge($args$) => org.apache.commons.io.IOUtils.copyLarge($args$);
hudson.util.IOUtils.contentEquals($args$) => org.apache.commons.io.IOUtils.contentEquals($args$);
hudson.util.IOUtils.copy($input, $output) :: $input instanceof java.io.InputStream && $output instanceof java.io.OutputStream => org.apache.commons.io.IOUtils.copy($input, $output);
;
hudson.util.IOUtils.copy($input, $output) :: $input instanceof java.io.InputStream && $output instanceof java.io.Writer => org.apache.commons.io.IOUtils.copy($input, $output);
;
hudson.util.IOUtils.copy($input, $output, $encoding) :: $input instanceof java.io.InputStream && $output instanceof java.io.Writer && $encoding instanceof java.lang.String => org.apache.commons.io.IOUtils.copy($input, $output, $encoding);
;
hudson.util.IOUtils.copy($input, $output) :: $input instanceof java.io.Reader && $output instanceof java.io.Writer => org.apache.commons.io.IOUtils.copy($input, $output);
;
hudson.util.IOUtils.copy($input, $output) :: $input instanceof java.io.Reader && $output instanceof java.io.OutputStream => org.apache.commons.io.IOUtils.copy($input, $output);
;
hudson.util.IOUtils.copy($input, $output, $encoding) :: $input instanceof java.io.Reader && $output instanceof java.io.OutputStream && $encoding instanceof java.lang.String => org.apache.commons.io.IOUtils.copy($input, $output, $encoding);
;
hudson.util.IOUtils.copyLarge($args$) => org.apache.commons.io.IOUtils.copyLarge($args$);
;
hudson.util.IOUtils.contentEquals($args$) => org.apache.commons.io.IOUtils.contentEquals($args$);
;
core/src/test/java/jenkins/RemotingJarSignatureTest.java
浏览文件 @
a0d6e528
...
...
@@ -2,7 +2,6 @@ package jenkins;
import
hudson.remoting.Channel
;
import
hudson.remoting.Which
;
import
hudson.util.IOUtils
;
import
org.apache.commons.io.output.NullOutputStream
;
import
org.junit.Assert
;
import
org.junit.Test
;
...
...
@@ -11,6 +10,7 @@ import java.io.File;
import
java.util.Enumeration
;
import
java.util.jar.JarEntry
;
import
java.util.jar.JarFile
;
import
org.apache.commons.io.IOUtils
;
/**
* @author Kohsuke Kawaguchi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录