Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FIY695
jenkins
提交
108f2c4b
J
jenkins
项目概览
FIY695
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
108f2c4b
编写于
9月 10, 2015
作者:
S
Stephen Connolly
提交者:
Oliver Gondža
9月 15, 2015
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[JENKINS-30139] Add @Restricted to prevent external use of internal data
(cherry picked from commit
9a57858a
)
上级
d68bbfcf
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
3 deletion
+14
-3
core/src/main/java/hudson/diagnosis/OldDataMonitor.java
core/src/main/java/hudson/diagnosis/OldDataMonitor.java
+14
-3
未找到文件。
core/src/main/java/hudson/diagnosis/OldDataMonitor.java
浏览文件 @
108f2c4b
...
@@ -55,6 +55,8 @@ import javax.annotation.CheckForNull;
...
@@ -55,6 +55,8 @@ import javax.annotation.CheckForNull;
import
jenkins.model.Jenkins
;
import
jenkins.model.Jenkins
;
import
org.acegisecurity.context.SecurityContext
;
import
org.acegisecurity.context.SecurityContext
;
import
org.acegisecurity.context.SecurityContextHolder
;
import
org.acegisecurity.context.SecurityContextHolder
;
import
org.kohsuke.accmod.Restricted
;
import
org.kohsuke.accmod.restrictions.NoExternalUse
;
import
org.kohsuke.stapler.HttpRedirect
;
import
org.kohsuke.stapler.HttpRedirect
;
import
org.kohsuke.stapler.HttpResponse
;
import
org.kohsuke.stapler.HttpResponse
;
import
org.kohsuke.stapler.HttpResponses
;
import
org.kohsuke.stapler.HttpResponses
;
...
@@ -229,8 +231,13 @@ public class OldDataMonitor extends AdministrativeMonitor {
...
@@ -229,8 +231,13 @@ public class OldDataMonitor extends AdministrativeMonitor {
public
static
class
VersionRange
{
public
static
class
VersionRange
{
private
static
VersionNumber
currentVersion
=
Jenkins
.
getVersion
();
private
static
VersionNumber
currentVersion
=
Jenkins
.
getVersion
();
VersionNumber
min
,
max
;
@Restricted
(
NoExternalUse
.
class
)
VersionNumber
min
;
@Restricted
(
NoExternalUse
.
class
)
VersionNumber
max
;
@Restricted
(
NoExternalUse
.
class
)
boolean
single
=
true
;
boolean
single
=
true
;
@Restricted
(
NoExternalUse
.
class
)
public
String
extra
;
public
String
extra
;
public
VersionRange
(
String
version
,
String
extra
)
{
public
VersionRange
(
String
version
,
String
extra
)
{
...
@@ -263,10 +270,12 @@ public class OldDataMonitor extends AdministrativeMonitor {
...
@@ -263,10 +270,12 @@ public class OldDataMonitor extends AdministrativeMonitor {
&&
currentVersion
.
digit
(
1
)
-
min
.
digit
(
1
)
>=
threshold
));
&&
currentVersion
.
digit
(
1
)
-
min
.
digit
(
1
)
>=
threshold
));
}
}
@Restricted
(
NoExternalUse
.
class
)
synchronized
VersionNumber
getMax
()
{
synchronized
VersionNumber
getMax
()
{
return
max
;
return
max
;
}
}
@Restricted
(
NoExternalUse
.
class
)
synchronized
VersionNumber
getMin
()
{
synchronized
VersionNumber
getMin
()
{
return
min
;
return
min
;
}
}
...
@@ -275,11 +284,13 @@ public class OldDataMonitor extends AdministrativeMonitor {
...
@@ -275,11 +284,13 @@ public class OldDataMonitor extends AdministrativeMonitor {
/**
/**
* Sorted list of unique max-versions in the data set. For select list in jelly.
* Sorted list of unique max-versions in the data set. For select list in jelly.
*/
*/
@Restricted
(
NoExternalUse
.
class
)
public
Iterator
<
VersionNumber
>
getVersionList
()
{
public
Iterator
<
VersionNumber
>
getVersionList
()
{
TreeSet
<
VersionNumber
>
set
=
new
TreeSet
<
VersionNumber
>();
TreeSet
<
VersionNumber
>
set
=
new
TreeSet
<
VersionNumber
>();
for
(
VersionRange
vr
:
data
.
values
())
{
for
(
VersionRange
vr
:
data
.
values
())
{
if
(
vr
.
getMax
()
!=
null
)
{
VersionNumber
max
=
vr
.
getMax
();
set
.
add
(
vr
.
getMax
());
if
(
max
!=
null
)
{
set
.
add
(
max
);
}
}
}
}
return
set
.
iterator
();
return
set
.
iterator
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录