提交 833c4232 编写于 作者: J Jesse Glick

[JENKINS-18678] Tweaking API, adding @since & changelog for #1075, fixing...

[JENKINS-18678] Tweaking API, adding @since & changelog for #1075, fixing purgeCache so that test can pass.
上级 fa039957
......@@ -55,7 +55,9 @@ Upcoming changes</a>
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=>
<li class="major bug">
Builds disappear after renaming a job.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-18678">issue 18678</a>)
</ul>
</div><!--=TRUNK-END=-->
......
......@@ -1680,7 +1680,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
public void renameTo(String newName) throws IOException {
super.renameTo(newName);
// Update locations inside builds cache
builds.updateBaseDir(getBuildDir(), false);
builds.updateBaseDir(getBuildDir());
}
protected final synchronized <T extends Describable<T>>
......
......@@ -214,11 +214,10 @@ public abstract class AbstractLazyLoadRunMap<R> extends AbstractMap<Integer,R> i
* Updates base directory location after directory changes.
* This method should be used on jobs renaming, etc.
* @param dir Directory location
* @param reloadBuilds Purges cache after the directory update
* @since 1.546
*/
public final void updateBaseDir(File dir, boolean reloadBuilds) {
public final void updateBaseDir(File dir) {
this.dir = dir;
purgeCache();
}
/**
......@@ -230,6 +229,7 @@ public abstract class AbstractLazyLoadRunMap<R> extends AbstractMap<Integer,R> i
*/
public void purgeCache() {
index = new Index();
fullyLoaded = false;
loadIdOnDisk();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册