Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
野花太放肆
jenkins
提交
08efdf5d
J
jenkins
项目概览
野花太放肆
/
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,发现更多精彩内容 >>
提交
08efdf5d
编写于
1月 14, 2013
作者:
J
Jesse Glick
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[JENKINS-16341] Amelioration of memory leak by at least interning some heavily redundant strings.
上级
2eed671b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
6 deletion
+11
-6
changelog.html
changelog.html
+3
-0
core/src/main/java/hudson/widgets/RenderOnDemandClosure.java
core/src/main/java/hudson/widgets/RenderOnDemandClosure.java
+8
-6
未找到文件。
changelog.html
浏览文件 @
08efdf5d
...
@@ -55,6 +55,9 @@ Upcoming changes</a>
...
@@ -55,6 +55,9 @@ Upcoming changes</a>
<!-- Record your changes in the trunk here. -->
<!-- Record your changes in the trunk here. -->
<div
id=
"trunk"
style=
"display:none"
>
<!--=TRUNK-BEGIN=-->
<div
id=
"trunk"
style=
"display:none"
>
<!--=TRUNK-BEGIN=-->
<ul
class=
image
>
<ul
class=
image
>
<li
class=
bug
>
Reduced size of memory leak in render-on-demand functionality used e.g. in configuration pages.
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-16341"
>
issue 16341
</a>
)
<li
class=
bug
>
<li
class=
bug
>
Improved logging and error output from SSHD in Jenkins.
Improved logging and error output from SSHD in Jenkins.
</ul>
</ul>
...
...
core/src/main/java/hudson/widgets/RenderOnDemandClosure.java
浏览文件 @
08efdf5d
...
@@ -25,15 +25,12 @@ package hudson.widgets;
...
@@ -25,15 +25,12 @@ package hudson.widgets;
import
hudson.Util
;
import
hudson.Util
;
import
hudson.model.Descriptor
;
import
hudson.model.Descriptor
;
import
hudson.model.DescriptorByNameOwner
;
import
hudson.util.IOException2
;
import
hudson.util.IOException2
;
import
hudson.util.PackedMap
;
import
hudson.util.PackedMap
;
import
org.apache.commons.jelly.JellyContext
;
import
org.apache.commons.jelly.JellyContext
;
import
org.apache.commons.jelly.JellyTagException
;
import
org.apache.commons.jelly.JellyTagException
;
import
org.apache.commons.jelly.Script
;
import
org.apache.commons.jelly.Script
;
import
org.kohsuke.stapler.Ancestor
;
import
org.kohsuke.stapler.HttpResponse
;
import
org.kohsuke.stapler.HttpResponse
;
import
org.kohsuke.stapler.Stapler
;
import
org.kohsuke.stapler.StaplerRequest
;
import
org.kohsuke.stapler.StaplerRequest
;
import
org.kohsuke.stapler.StaplerResponse
;
import
org.kohsuke.stapler.StaplerResponse
;
import
org.kohsuke.stapler.bind.JavaScriptMethod
;
import
org.kohsuke.stapler.bind.JavaScriptMethod
;
...
@@ -64,7 +61,7 @@ public class RenderOnDemandClosure {
...
@@ -64,7 +61,7 @@ public class RenderOnDemandClosure {
private
final
Map
<
String
,
Object
>
variables
;
private
final
Map
<
String
,
Object
>
variables
;
private
final
String
currentDescriptorByNameUrl
;
private
final
String
currentDescriptorByNameUrl
;
private
final
S
et
<
String
>
adjuncts
;
private
final
S
tring
[]
adjuncts
;
public
RenderOnDemandClosure
(
JellyContext
context
,
String
attributesToCapture
)
{
public
RenderOnDemandClosure
(
JellyContext
context
,
String
attributesToCapture
)
{
List
<
Script
>
bodyStack
=
new
ArrayList
<
Script
>();
List
<
Script
>
bodyStack
=
new
ArrayList
<
Script
>();
...
@@ -77,14 +74,19 @@ public class RenderOnDemandClosure {
...
@@ -77,14 +74,19 @@ public class RenderOnDemandClosure {
Map
<
String
,
Object
>
variables
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
variables
=
new
HashMap
<
String
,
Object
>();
for
(
String
v
:
Util
.
fixNull
(
attributesToCapture
).
split
(
","
))
for
(
String
v
:
Util
.
fixNull
(
attributesToCapture
).
split
(
","
))
variables
.
put
(
v
,
context
.
getVariable
(
v
));
variables
.
put
(
v
.
intern
()
,
context
.
getVariable
(
v
));
// capture the current base of context for descriptors
// capture the current base of context for descriptors
currentDescriptorByNameUrl
=
Descriptor
.
getCurrentDescriptorByNameUrl
();
currentDescriptorByNameUrl
=
Descriptor
.
getCurrentDescriptorByNameUrl
();
this
.
variables
=
PackedMap
.
of
(
variables
);
this
.
variables
=
PackedMap
.
of
(
variables
);
this
.
adjuncts
=
AdjunctsInPage
.
get
().
getIncluded
();
Set
<
String
>
_adjuncts
=
AdjunctsInPage
.
get
().
getIncluded
();
this
.
adjuncts
=
new
String
[
_adjuncts
.
size
()];
int
i
=
0
;
for
(
String
adjunct
:
_adjuncts
)
{
this
.
adjuncts
[
i
++]
=
adjunct
.
intern
();
}
}
}
/**
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录