提交 c8d7af2d 编写于 作者: K Kohsuke Kawaguchi

Fixed an AbstractMethodError in ItemGroupMixin.create when using some

older plugins.
上级 6f413a35
......@@ -60,6 +60,8 @@ Upcoming changes</a>
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=bug>
Fixed an AbstractMethodError in ItemGroupMixin.create when using some older plugins.
<li class=bug>
The "last duration" column was broken since 1.403.
<li class=bug>
......
......@@ -87,7 +87,7 @@ public abstract class ExtensionFinder implements ExtensionPoint {
public abstract <T> Collection<ExtensionComponent<T>> find(Class<T> type, Hudson hudson);
/**
* A pointless function to work around what appears to be a HotSpot problem. See HUDSON-5756 and bug 6933067
* A pointless function to work around what appears to be a HotSpot problem. See JENKINS-5756 and bug 6933067
* on BugParade for more details.
*/
public <T> Collection<ExtensionComponent<T>> _find(Class<T> type, Hudson hudson) {
......
......@@ -255,7 +255,7 @@ public abstract class AbstractItem extends Actionable implements Item, HttpDelet
}
/**
* A pointless function to work around what appears to be a HotSpot problem. See HUDSON-5756 and bug 6933067
* A pointless function to work around what appears to be a HotSpot problem. See JENKINS-5756 and bug 6933067
* on BugParade for more details.
*/
private void callOnRenamed(String newName, ItemGroup parent, String oldName) throws IOException {
......@@ -424,7 +424,7 @@ public abstract class AbstractItem extends Actionable implements Item, HttpDelet
}
/**
* A pointless function to work around what appears to be a HotSpot problem. See HUDSON-5756 and bug 6933067
* A pointless function to work around what appears to be a HotSpot problem. See JENKINS-5756 and bug 6933067
* on BugParade for more details.
*/
private void invokeOnDeleted() throws IOException {
......
......@@ -181,6 +181,8 @@ public interface Item extends PersistenceRoot, SearchableModelObject, AccessCont
/**
* When an item is created from scratch (instead of copied),
* this method will be invoked. Used as the post-construction initialization.
*
* @since 1.374
*/
void onCreatedFromScratch();
......
......@@ -247,7 +247,11 @@ public abstract class ItemGroupMixIn {
} catch (Exception e) {
throw new IllegalArgumentException(e);
}
item.onCreatedFromScratch();
try {
callOnCreatedFromScratch(item);
} catch (AbstractMethodError e) {
// ignore this error. Must be older plugin that doesn't have this method
}
item.save();
add(item);
......@@ -256,4 +260,11 @@ public abstract class ItemGroupMixIn {
return item;
}
/**
* Pointless wrapper to avoid HotSpot problem. See JENKINS-5756
*/
private void callOnCreatedFromScratch(TopLevelItem item) {
item.onCreatedFromScratch();
}
}
......@@ -59,7 +59,7 @@ public class Executables {
}
/**
* A pointless function to work around what appears to be a HotSpot problem. See HUDSON-5756 and bug 6933067
* A pointless function to work around what appears to be a HotSpot problem. See JENKINS-5756 and bug 6933067
* on BugParade for more details.
*/
private static SubTask _getParentOf(Executable e) {
......@@ -80,7 +80,7 @@ public class Executables {
}
/**
* A pointless function to work around what appears to be a HotSpot problem. See HUDSON-5756 and bug 6933067
* A pointless function to work around what appears to be a HotSpot problem. See JENKINS-5756 and bug 6933067
* on BugParade for more details.
*/
private static long _getEstimatedDuration(Executable e) {
......
......@@ -37,7 +37,7 @@ import java.util.Collections;
public class Tasks {
/**
* A pointless function to work around what appears to be a HotSpot problem. See HUDSON-5756 and bug 6933067
* A pointless function to work around what appears to be a HotSpot problem. See JENKINS-5756 and bug 6933067
* on BugParade for more details.
*/
private static Collection<? extends SubTask> _getSubTasksOf(Task task) {
......@@ -53,7 +53,7 @@ public class Tasks {
}
/**
* A pointless function to work around what appears to be a HotSpot problem. See HUDSON-5756 and bug 6933067
* A pointless function to work around what appears to be a HotSpot problem. See JENKINS-5756 and bug 6933067
* on BugParade for more details.
*/
private static Object _getSameNodeConstraintOf(SubTask t) {
......@@ -69,7 +69,7 @@ public class Tasks {
}
/**
* A pointless function to work around what appears to be a HotSpot problem. See HUDSON-5756 and bug 6933067
* A pointless function to work around what appears to be a HotSpot problem. See JENKINS-5756 and bug 6933067
* on BugParade for more details.
*/
public static Task _getOwnerTaskOf(SubTask t) {
......
......@@ -297,7 +297,7 @@ public abstract class SCM implements Describable<SCM>, ExtensionPoint {
public abstract SCMRevisionState calcRevisionsFromBuild(AbstractBuild<?,?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException;
/**
* A pointless function to work around what appears to be a HotSpot problem. See HUDSON-5756 and bug 6933067
* A pointless function to work around what appears to be a HotSpot problem. See JENKINS-5756 and bug 6933067
* on BugParade for more details.
*/
public SCMRevisionState _calcRevisionsFromBuild(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException {
......@@ -347,7 +347,7 @@ public abstract class SCM implements Describable<SCM>, ExtensionPoint {
protected abstract PollingResult compareRemoteRevisionWith(AbstractProject<?,?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline) throws IOException, InterruptedException;
/**
* A pointless function to work around what appears to be a HotSpot problem. See HUDSON-5756 and bug 6933067
* A pointless function to work around what appears to be a HotSpot problem. See JENKINS-5756 and bug 6933067
* on BugParade for more details.
*/
private PollingResult _compareRemoteRevisionWith(AbstractProject<?, ?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline2) throws IOException, InterruptedException {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册