Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LinuxSuRen
jenkins
提交
fd31a5d8
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,发现更多精彩内容 >>
提交
fd31a5d8
编写于
4月 30, 2013
作者:
J
Jesse Glick
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FIXED JENKINS-15309] Be robust against serialized ListView with jobNames==null.
上级
0c4fe2dd
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
101 addition
and
1 deletion
+101
-1
changelog.html
changelog.html
+3
-0
core/src/main/java/hudson/model/ListView.java
core/src/main/java/hudson/model/ListView.java
+4
-1
test/src/test/java/hudson/model/ListViewTest.java
test/src/test/java/hudson/model/ListViewTest.java
+44
-0
test/src/test/resources/hudson/model/ListViewTest/nullJobNames/config.xml
...sources/hudson/model/ListViewTest/nullJobNames/config.xml
+50
-0
未找到文件。
changelog.html
浏览文件 @
fd31a5d8
...
...
@@ -58,6 +58,9 @@ Upcoming changes</a>
<li
class=
bug
>
Display Name is not shown.
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-17715"
>
issue 17715
</a>
)
<li
class=
bug
>
List views missing a required field were unloadable.
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-15309"
>
issue 15309
</a>
)
<li
class=
'major bug'
>
Properly find parent POMs when fingerprinting a Maven project.
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-17775"
>
issue 17775
</a>
)
...
...
core/src/main/java/hudson/model/ListView.java
浏览文件 @
fd31a5d8
...
...
@@ -66,7 +66,7 @@ public class ListView extends View implements Saveable {
* List of job names. This is what gets serialized.
*/
@GuardedBy
(
"this"
)
/*package*/
final
SortedSet
<
String
>
jobNames
=
new
TreeSet
<
String
>(
CaseInsensitiveComparator
.
INSTANCE
);
/*package*/
/*almost-final*/
SortedSet
<
String
>
jobNames
=
new
TreeSet
<
String
>(
CaseInsensitiveComparator
.
INSTANCE
);
private
DescribableList
<
ViewJobFilter
,
Descriptor
<
ViewJobFilter
>>
jobFilters
;
...
...
@@ -108,6 +108,9 @@ public class ListView extends View implements Saveable {
private
Object
readResolve
()
{
if
(
includeRegex
!=
null
)
includePattern
=
Pattern
.
compile
(
includeRegex
);
if
(
jobNames
==
null
)
{
jobNames
=
new
TreeSet
<
String
>(
CaseInsensitiveComparator
.
INSTANCE
);
}
initColumns
();
initJobFilters
();
return
this
;
...
...
test/src/test/java/hudson/model/ListViewTest.java
0 → 100644
浏览文件 @
fd31a5d8
/*
* The MIT License
*
* Copyright 2013 Jesse Glick.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package
hudson.model
;
import
static
org
.
junit
.
Assert
.*;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.jvnet.hudson.test.Bug
;
import
org.jvnet.hudson.test.JenkinsRule
;
import
org.jvnet.hudson.test.recipes.LocalData
;
public
class
ListViewTest
{
@Rule
public
JenkinsRule
j
=
new
JenkinsRule
();
@Bug
(
15309
)
@LocalData
@Test
public
void
nullJobNames
()
throws
Exception
{
assertTrue
(
j
.
jenkins
.
getView
(
"v"
).
getItems
().
isEmpty
());
}
}
test/src/test/resources/hudson/model/ListViewTest/nullJobNames/config.xml
0 → 100644
浏览文件 @
fd31a5d8
<?xml version='1.0' encoding='UTF-8'?>
<hudson>
<disabledAdministrativeMonitors/>
<version>
1.0
</version>
<numExecutors>
2
</numExecutors>
<mode>
NORMAL
</mode>
<useSecurity>
true
</useSecurity>
<authorizationStrategy
class=
"hudson.security.AuthorizationStrategy$Unsecured"
/>
<securityRealm
class=
"hudson.security.SecurityRealm$None"
/>
<projectNamingStrategy
class=
"jenkins.model.ProjectNamingStrategy$DefaultProjectNamingStrategy"
/>
<workspaceDir>
${JENKINS_HOME}/workspace/${ITEM_FULLNAME}
</workspaceDir>
<buildsDir>
${ITEM_ROOTDIR}/builds
</buildsDir>
<jdks/>
<viewsTabBar
class=
"hudson.views.DefaultViewsTabBar"
/>
<myViewsTabBar
class=
"hudson.views.DefaultMyViewsTabBar"
/>
<clouds/>
<slaves/>
<scmCheckoutRetryCount>
0
</scmCheckoutRetryCount>
<views>
<hudson.model.AllView>
<owner
class=
"hudson"
reference=
"../../.."
/>
<name>
All
</name>
<filterExecutors>
false
</filterExecutors>
<filterQueue>
false
</filterQueue>
<properties
class=
"hudson.model.View$PropertyList"
/>
</hudson.model.AllView>
<listView>
<owner
class=
"hudson"
reference=
"../../.."
/>
<name>
v
</name>
<filterExecutors>
false
</filterExecutors>
<filterQueue>
false
</filterQueue>
<properties
class=
"hudson.model.View$PropertyList"
/>
<jobFilters/>
<columns>
<hudson.views.StatusColumn/>
<hudson.views.WeatherColumn/>
<hudson.views.JobColumn/>
<hudson.views.LastSuccessColumn/>
<hudson.views.LastFailureColumn/>
<hudson.views.LastDurationColumn/>
<hudson.views.BuildButtonColumn/>
</columns>
</listView>
</views>
<primaryView>
All
</primaryView>
<slaveAgentPort>
0
</slaveAgentPort>
<label></label>
<nodeProperties/>
<globalNodeProperties/>
</hudson>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录