Skip to content
Permalink
Browse files
[JENKINS-18678] Tweaking API, adding @SInCE & changelog for #1075, fi…
…xing purgeCache so that test can pass.
  • Loading branch information
jglick committed Dec 23, 2013
1 parent fa03995 commit 833c423268635ba79672ccdf6d17977a2a4d4181
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
@@ -55,7 +55,9 @@
<!-- 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 @@ void addToList( T item, List<T> collection ) throws IOException {
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 final boolean baseDirInitialized() {
* 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 final void updateBaseDir(File dir, boolean reloadBuilds) {
*/
public void purgeCache() {
index = new Index();
fullyLoaded = false;
loadIdOnDisk();
}

0 comments on commit 833c423

Please sign in to comment.