diff --git a/changelog.html b/changelog.html
index be6f129bb7..67231825a0 100644
--- a/changelog.html
+++ b/changelog.html
@@ -60,6 +60,8 @@ Upcoming changes
+ -
+ Fixed an AbstractMethodError in ItemGroupMixin.create when using some older plugins.
-
The "last duration" column was broken since 1.403.
-
diff --git a/core/src/main/java/hudson/ExtensionFinder.java b/core/src/main/java/hudson/ExtensionFinder.java
index d13e954faf..7f1f078321 100644
--- a/core/src/main/java/hudson/ExtensionFinder.java
+++ b/core/src/main/java/hudson/ExtensionFinder.java
@@ -87,7 +87,7 @@ public abstract class ExtensionFinder implements ExtensionPoint {
public abstract Collection> find(Class 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 Collection> _find(Class type, Hudson hudson) {
diff --git a/core/src/main/java/hudson/model/AbstractItem.java b/core/src/main/java/hudson/model/AbstractItem.java
index df287c0524..b21cb06334 100644
--- a/core/src/main/java/hudson/model/AbstractItem.java
+++ b/core/src/main/java/hudson/model/AbstractItem.java
@@ -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 {
diff --git a/core/src/main/java/hudson/model/Item.java b/core/src/main/java/hudson/model/Item.java
index f4f2e17002..9eaf70e009 100644
--- a/core/src/main/java/hudson/model/Item.java
+++ b/core/src/main/java/hudson/model/Item.java
@@ -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();
diff --git a/core/src/main/java/hudson/model/ItemGroupMixIn.java b/core/src/main/java/hudson/model/ItemGroupMixIn.java
index 0f63ca3ff4..173fd2f2ae 100644
--- a/core/src/main/java/hudson/model/ItemGroupMixIn.java
+++ b/core/src/main/java/hudson/model/ItemGroupMixIn.java
@@ -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();
+ }
}
diff --git a/core/src/main/java/hudson/model/queue/Executables.java b/core/src/main/java/hudson/model/queue/Executables.java
index efa041203e..926169c9fb 100644
--- a/core/src/main/java/hudson/model/queue/Executables.java
+++ b/core/src/main/java/hudson/model/queue/Executables.java
@@ -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) {
diff --git a/core/src/main/java/hudson/model/queue/Tasks.java b/core/src/main/java/hudson/model/queue/Tasks.java
index 6cd2097cde..cfa99357a0 100644
--- a/core/src/main/java/hudson/model/queue/Tasks.java
+++ b/core/src/main/java/hudson/model/queue/Tasks.java
@@ -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) {
diff --git a/core/src/main/java/hudson/scm/SCM.java b/core/src/main/java/hudson/scm/SCM.java
index 4fce8e8946..1ddd94068a 100644
--- a/core/src/main/java/hudson/scm/SCM.java
+++ b/core/src/main/java/hudson/scm/SCM.java
@@ -297,7 +297,7 @@ public abstract class SCM implements Describable, 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, 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 {