Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LinuxSuRen
jenkins
提交
22b27200
J
jenkins
项目概览
LinuxSuRen
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
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,发现更多精彩内容 >>
提交
22b27200
编写于
2月 20, 2019
作者:
J
Josh Soref
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Java 5: foreach
上级
893e5c08
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
29 addition
and
33 deletion
+29
-33
core/src/main/java/hudson/ExtensionList.java
core/src/main/java/hudson/ExtensionList.java
+1
-2
core/src/main/java/hudson/Util.java
core/src/main/java/hudson/Util.java
+2
-2
core/src/main/java/hudson/model/DependencyGraph.java
core/src/main/java/hudson/model/DependencyGraph.java
+2
-3
core/src/main/java/hudson/security/TokenBasedRememberMeServices2.java
...n/java/hudson/security/TokenBasedRememberMeServices2.java
+3
-3
core/src/main/java/hudson/tasks/Fingerprinter.java
core/src/main/java/hudson/tasks/Fingerprinter.java
+2
-2
core/src/main/java/hudson/util/MultipartFormDataParser.java
core/src/main/java/hudson/util/MultipartFormDataParser.java
+2
-2
core/src/main/java/hudson/util/RobustReflectionConverter.java
.../src/main/java/hudson/util/RobustReflectionConverter.java
+1
-2
core/src/main/java/jenkins/org/apache/commons/validator/routines/RegexValidator.java
...org/apache/commons/validator/routines/RegexValidator.java
+8
-8
core/src/main/java/jenkins/org/apache/commons/validator/routines/UrlValidator.java
...s/org/apache/commons/validator/routines/UrlValidator.java
+2
-2
core/src/main/java/jenkins/security/LastGrantedAuthoritiesProperty.java
...java/jenkins/security/LastGrantedAuthoritiesProperty.java
+3
-3
core/src/main/java/jenkins/util/TreeString.java
core/src/main/java/jenkins/util/TreeString.java
+2
-2
core/src/main/java/jenkins/util/VirtualFile.java
core/src/main/java/jenkins/util/VirtualFile.java
+1
-2
未找到文件。
core/src/main/java/hudson/ExtensionList.java
浏览文件 @
22b27200
...
...
@@ -245,8 +245,7 @@ public class ExtensionList<T> extends AbstractList<T> implements OnMaster {
}
private
<
T
>
boolean
removeComponent
(
Collection
<
ExtensionComponent
<
T
>>
collection
,
Object
t
)
{
for
(
Iterator
<
ExtensionComponent
<
T
>>
itr
=
collection
.
iterator
();
itr
.
hasNext
();)
{
ExtensionComponent
<
T
>
c
=
itr
.
next
();
for
(
ExtensionComponent
<
T
>
c
:
collection
)
{
if
(
c
.
getInstance
().
equals
(
t
))
{
return
collection
.
remove
(
c
);
}
...
...
core/src/main/java/hudson/Util.java
浏览文件 @
22b27200
...
...
@@ -1463,9 +1463,9 @@ public class Util {
public
static
int
permissionsToMode
(
Set
<
PosixFilePermission
>
permissions
)
{
PosixFilePermission
[]
allPermissions
=
PosixFilePermission
.
values
();
int
result
=
0
;
for
(
int
i
=
0
;
i
<
allPermissions
.
length
;
i
++
)
{
for
(
PosixFilePermission
allPermission
:
allPermissions
)
{
result
<<=
1
;
result
|=
permissions
.
contains
(
allPermission
s
[
i
]
)
?
1
:
0
;
result
|=
permissions
.
contains
(
allPermission
)
?
1
:
0
;
}
return
result
;
}
...
...
core/src/main/java/hudson/model/DependencyGraph.java
浏览文件 @
22b27200
...
...
@@ -339,10 +339,9 @@ public class DependencyGraph implements Comparator<AbstractProject> {
set
=
new
ArrayList
<
DependencyGroup
>();
map
.
put
(
key
,
set
);
}
for
(
ListIterator
<
DependencyGroup
>
it
=
set
.
listIterator
();
it
.
hasNext
();)
{
DependencyGroup
d
=
it
.
next
();
for
(
DependencyGroup
d
:
set
)
{
// Check for existing edge that connects the same two projects:
if
(
d
.
getUpstreamProject
()
==
dep
.
getUpstreamProject
()
&&
d
.
getDownstreamProject
()==
dep
.
getDownstreamProject
())
{
if
(
d
.
getUpstreamProject
()
==
dep
.
getUpstreamProject
()
&&
d
.
getDownstreamProject
()
==
dep
.
getDownstreamProject
())
{
d
.
add
(
dep
);
return
;
}
...
...
core/src/main/java/hudson/security/TokenBasedRememberMeServices2.java
浏览文件 @
22b27200
...
...
@@ -189,9 +189,9 @@ public class TokenBasedRememberMeServices2 extends TokenBasedRememberMeServices
return
null
;
}
for
(
int
i
=
0
;
i
<
cookies
.
length
;
i
++
)
{
if
(
ACEGI_SECURITY_HASHED_REMEMBER_ME_COOKIE_KEY
.
equals
(
cookie
s
[
i
]
.
getName
()))
{
return
cookie
s
[
i
]
.
getValue
();
for
(
Cookie
cookie
:
cookies
)
{
if
(
ACEGI_SECURITY_HASHED_REMEMBER_ME_COOKIE_KEY
.
equals
(
cookie
.
getName
()))
{
return
cookie
.
getValue
();
}
}
...
...
core/src/main/java/hudson/tasks/Fingerprinter.java
浏览文件 @
22b27200
...
...
@@ -154,8 +154,8 @@ public class Fingerprinter extends Recorder implements Serializable, DependencyD
RunList
builds
=
owner
.
getBuilds
();
Set
<
String
>
seenUpstreamProjects
=
new
HashSet
<
String
>();
for
(
ListIterator
iter
=
builds
.
listIterator
();
iter
.
hasNext
();
)
{
Run
build
=
(
Run
)
iter
.
next
()
;
for
(
Object
build1
:
builds
)
{
Run
build
=
(
Run
)
build1
;
for
(
FingerprintAction
action
:
build
.
getActions
(
FingerprintAction
.
class
))
{
for
(
AbstractProject
key
:
action
.
getDependencies
().
keySet
())
{
if
(
key
==
owner
)
{
...
...
core/src/main/java/hudson/util/MultipartFormDataParser.java
浏览文件 @
22b27200
...
...
@@ -96,8 +96,8 @@ public class MultipartFormDataParser implements AutoCloseable {
return
false
;
}
for
(
int
i
=
0
;
i
<
parts
.
length
;
i
++
)
{
if
(
"multipart/form-data"
.
equals
(
part
s
[
i
]
))
{
for
(
String
part
:
parts
)
{
if
(
"multipart/form-data"
.
equals
(
part
))
{
return
true
;
}
}
...
...
core/src/main/java/hudson/util/RobustReflectionConverter.java
浏览文件 @
22b27200
...
...
@@ -212,8 +212,7 @@ public class RobustReflectionConverter implements Converter {
if
(
mapping
!=
null
)
{
if
(
mapping
.
getItemFieldName
()
!=
null
)
{
Collection
list
=
(
Collection
)
newObj
;
for
(
Iterator
iter
=
list
.
iterator
();
iter
.
hasNext
();)
{
Object
obj
=
iter
.
next
();
for
(
Object
obj
:
list
)
{
writeField
(
fieldName
,
mapping
.
getItemFieldName
(),
mapping
.
getItemType
(),
definedIn
,
obj
);
}
}
else
{
...
...
core/src/main/java/jenkins/org/apache/commons/validator/routines/RegexValidator.java
浏览文件 @
22b27200
...
...
@@ -149,8 +149,8 @@ public class RegexValidator implements Serializable {
if
(
value
==
null
)
{
return
false
;
}
for
(
int
i
=
0
;
i
<
patterns
.
length
;
i
++
)
{
if
(
pattern
s
[
i
]
.
matcher
(
value
).
matches
())
{
for
(
Pattern
pattern
:
patterns
)
{
if
(
pattern
.
matcher
(
value
).
matches
())
{
return
true
;
}
}
...
...
@@ -169,13 +169,13 @@ public class RegexValidator implements Serializable {
if
(
value
==
null
)
{
return
null
;
}
for
(
int
i
=
0
;
i
<
patterns
.
length
;
i
++
)
{
Matcher
matcher
=
pattern
s
[
i
]
.
matcher
(
value
);
for
(
Pattern
pattern
:
patterns
)
{
Matcher
matcher
=
pattern
.
matcher
(
value
);
if
(
matcher
.
matches
())
{
int
count
=
matcher
.
groupCount
();
String
[]
groups
=
new
String
[
count
];
for
(
int
j
=
0
;
j
<
count
;
j
++)
{
groups
[
j
]
=
matcher
.
group
(
j
+
1
);
groups
[
j
]
=
matcher
.
group
(
j
+
1
);
}
return
groups
;
}
...
...
@@ -196,8 +196,8 @@ public class RegexValidator implements Serializable {
if
(
value
==
null
)
{
return
null
;
}
for
(
int
i
=
0
;
i
<
patterns
.
length
;
i
++
)
{
Matcher
matcher
=
pattern
s
[
i
]
.
matcher
(
value
);
for
(
Pattern
pattern
:
patterns
)
{
Matcher
matcher
=
pattern
.
matcher
(
value
);
if
(
matcher
.
matches
())
{
int
count
=
matcher
.
groupCount
();
if
(
count
==
1
)
{
...
...
@@ -205,7 +205,7 @@ public class RegexValidator implements Serializable {
}
StringBuilder
buffer
=
new
StringBuilder
();
for
(
int
j
=
0
;
j
<
count
;
j
++)
{
String
component
=
matcher
.
group
(
j
+
1
);
String
component
=
matcher
.
group
(
j
+
1
);
if
(
component
!=
null
)
{
buffer
.
append
(
component
);
}
...
...
core/src/main/java/jenkins/org/apache/commons/validator/routines/UrlValidator.java
浏览文件 @
22b27200
...
...
@@ -284,8 +284,8 @@ public class UrlValidator implements Serializable {
schemes
=
DEFAULT_SCHEMES
;
}
allowedSchemes
=
new
HashSet
<
String
>(
schemes
.
length
);
for
(
int
i
=
0
;
i
<
schemes
.
length
;
i
++
)
{
allowedSchemes
.
add
(
scheme
s
[
i
]
.
toLowerCase
(
Locale
.
ENGLISH
));
for
(
String
scheme
:
schemes
)
{
allowedSchemes
.
add
(
scheme
.
toLowerCase
(
Locale
.
ENGLISH
));
}
}
...
...
core/src/main/java/jenkins/security/LastGrantedAuthoritiesProperty.java
浏览文件 @
22b27200
...
...
@@ -56,10 +56,10 @@ public class LastGrantedAuthoritiesProperty extends UserProperty {
List
<
GrantedAuthority
>
grantedAuthorities
=
new
ArrayList
<>(
roles
.
length
+
1
);
grantedAuthorities
.
add
(
new
GrantedAuthorityImpl
(
authenticatedRole
));
for
(
int
i
=
0
;
i
<
roles
.
length
;
i
++)
{
for
(
String
role
:
roles
)
{
// to avoid having twice that role
if
(!
authenticatedRole
.
equals
(
roles
[
i
]))
{
grantedAuthorities
.
add
(
new
GrantedAuthorityImpl
(
role
s
[
i
]
));
if
(!
authenticatedRole
.
equals
(
role
))
{
grantedAuthorities
.
add
(
new
GrantedAuthorityImpl
(
role
));
}
}
...
...
core/src/main/java/jenkins/util/TreeString.java
浏览文件 @
22b27200
...
...
@@ -124,8 +124,8 @@ public final class TreeString implements Serializable {
public
int
hashCode
()
{
int
h
=
parent
==
null
?
0
:
parent
.
hashCode
();
for
(
int
i
=
0
;
i
<
label
.
length
;
i
++
)
{
h
=
31
*
h
+
label
[
i
]
;
for
(
char
c
:
label
)
{
h
=
31
*
h
+
c
;
}
assert
toString
().
hashCode
()
==
h
;
...
...
core/src/main/java/jenkins/util/VirtualFile.java
浏览文件 @
22b27200
...
...
@@ -191,8 +191,7 @@ public abstract class VirtualFile implements Comparable<VirtualFile>, Serializab
public
@Nonnull
List
<
VirtualFile
>
listOnlyDescendants
()
throws
IOException
{
VirtualFile
[]
children
=
list
();
List
<
VirtualFile
>
result
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
children
.
length
;
i
++)
{
VirtualFile
child
=
children
[
i
];
for
(
VirtualFile
child
:
children
)
{
if
(
child
.
isDescendant
(
""
))
{
result
.
add
(
child
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录