diff --git a/core/src/main/java/hudson/ClassicPluginStrategy.java b/core/src/main/java/hudson/ClassicPluginStrategy.java index 3a13408698ff347e49f66089d98d5ee5cdf5ddbb..59e4e6a7ce6cffb14e42acb73797b6fb409aab08 100644 --- a/core/src/main/java/hudson/ClassicPluginStrategy.java +++ b/core/src/main/java/hudson/ClassicPluginStrategy.java @@ -340,7 +340,7 @@ public class ClassicPluginStrategy implements PluginStrategy { List> r = Lists.newArrayList(); for (ExtensionFinder finder : finders) { try { - r.addAll(finder._find(type, hudson)); + r.addAll(finder.find(type, hudson)); } catch (AbstractMethodError e) { // backward compatibility for (T t : finder.findExtensions(type, hudson)) diff --git a/core/src/main/java/hudson/ExtensionFinder.java b/core/src/main/java/hudson/ExtensionFinder.java index c63c9488987e71630d242e657dd4a154ea11bf14..921a815d1b101107e148333442ab43edc0b8d0cb 100644 --- a/core/src/main/java/hudson/ExtensionFinder.java +++ b/core/src/main/java/hudson/ExtensionFinder.java @@ -143,10 +143,7 @@ public abstract class ExtensionFinder implements ExtensionPoint { */ public abstract Collection> find(Class type, Hudson jenkins); - /** - * A pointless function to work around what appears to be a HotSpot problem. See JENKINS-5756 and bug 6933067 - * on BugParade for more details. - */ + @Deprecated public Collection> _find(Class type, Hudson hudson) { return find(type, hudson); } diff --git a/core/src/main/java/hudson/FilePath.java b/core/src/main/java/hudson/FilePath.java index e42035bd4f45dce00abd31e623ae64287c6c875b..e6bd9f50e52923e50454c74ade828f0723840088 100644 --- a/core/src/main/java/hudson/FilePath.java +++ b/core/src/main/java/hudson/FilePath.java @@ -1856,7 +1856,7 @@ public final class FilePath implements Serializable { private void syncIO() throws InterruptedException { try { if (channel!=null) - _syncIO(); + channel.syncLocalIO(); } catch (AbstractMethodError e) { // legacy slave.jar. Handle this gracefully try { @@ -1867,14 +1867,6 @@ public final class FilePath implements Serializable { } } - /** - * 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 _syncIO() throws InterruptedException { - channel.syncLocalIO(); - } - /** * Remoting interface used for {@link FilePath#copyRecursiveTo(String, FilePath)}. * diff --git a/core/src/main/java/hudson/model/AbstractItem.java b/core/src/main/java/hudson/model/AbstractItem.java index 115a01e63597ffbd3b9236f39732e71b386bf2c1..6c670da4c0f428916d085162362542664bd7218e 100644 --- a/core/src/main/java/hudson/model/AbstractItem.java +++ b/core/src/main/java/hudson/model/AbstractItem.java @@ -301,25 +301,17 @@ public abstract class AbstractItem extends Actionable implements Item, HttpDelet doSetName(oldName); } - callOnRenamed(newName, parent, oldName); + try { + parent.onRenamed(this, oldName, newName); + } catch (AbstractMethodError _) { + // ignore + } ItemListener.fireLocationChange(this, oldFullName); } } } - /** - * 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 { - try { - parent.onRenamed(this, oldName, newName); - } catch (AbstractMethodError _) { - // ignore - } - } - /** * Gets all the jobs that this {@link Item} contains as descendants. */ @@ -560,16 +552,8 @@ public abstract class AbstractItem extends Actionable implements Item, HttpDelet synchronized (this) { // could just make performDelete synchronized but overriders might not honor that performDelete(); } // JENKINS-19446: leave synch block, but JENKINS-22001: still notify synchronously - invokeOnDeleted(); - Jenkins.getInstance().rebuildDependencyGraphAsync(); - } - - /** - * 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 { getParent().onDeleted(AbstractItem.this); + Jenkins.getInstance().rebuildDependencyGraphAsync(); } /** diff --git a/core/src/main/java/hudson/model/AbstractProject.java b/core/src/main/java/hudson/model/AbstractProject.java index 947c5179f782d9aed64470267b9ef202d8494047..f55e916d0620efda6aa2e06453837f6d8159ae29 100644 --- a/core/src/main/java/hudson/model/AbstractProject.java +++ b/core/src/main/java/hudson/model/AbstractProject.java @@ -1266,7 +1266,7 @@ public abstract class AbstractProject

,R extends A SCMRevisionState baseline = build.getAction(SCMRevisionState.class); if (baseline==null) { try { - baseline = getScm()._calcRevisionsFromBuild(build, launcher, listener); + baseline = getScm().calcRevisionsFromBuild(build, launcher, listener); } catch (AbstractMethodError e) { baseline = SCMRevisionState.NONE; // pre-1.345 SCM implementations, which doesn't use the baseline in polling } diff --git a/core/src/main/java/hudson/model/View.java b/core/src/main/java/hudson/model/View.java index ae586e49991d565d9debb931fdeba7fa4d32b3e9..d03727af6cf4a31a9743576756e479947c3776d1 100644 --- a/core/src/main/java/hudson/model/View.java +++ b/core/src/main/java/hudson/model/View.java @@ -255,20 +255,12 @@ public abstract class View extends AbstractModelObject implements AccessControll */ public ItemGroup getOwnerItemGroup() { try { - return _getOwnerItemGroup(); + return owner.getItemGroup(); } catch (AbstractMethodError e) { return Jenkins.getInstance(); } } - /** - * 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 ItemGroup _getOwnerItemGroup() { - return owner.getItemGroup(); - } - public View getOwnerPrimaryView() { try { return _getOwnerPrimaryView(); diff --git a/core/src/main/java/hudson/model/queue/Executables.java b/core/src/main/java/hudson/model/queue/Executables.java index dc07c0cc15ff68d69f7ca63a671157dbbb647503..a8a524bc8e7d31246c80a7c4390b6c109d7683bb 100644 --- a/core/src/main/java/hudson/model/queue/Executables.java +++ b/core/src/main/java/hudson/model/queue/Executables.java @@ -40,7 +40,7 @@ public class Executables { */ public static @Nonnull SubTask getParentOf(Executable e) { try { - return _getParentOf(e); + return e.getParent(); } catch (AbstractMethodError _) { try { Method m = e.getClass().getMethod("getParent"); @@ -59,14 +59,6 @@ public class Executables { } } - /** - * 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) { - return e.getParent(); - } - /** * Returns the estimated duration for the executable. * Protects against {@link AbstractMethodError}s if the {@link Executable} implementation @@ -74,17 +66,10 @@ public class Executables { */ public static long getEstimatedDurationFor(Executable e) { try { - return _getEstimatedDuration(e); + return e.getEstimatedDuration(); } catch (AbstractMethodError error) { return e.getParent().getEstimatedDuration(); } } - /** - * 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) { - return e.getEstimatedDuration(); - } } diff --git a/core/src/main/java/hudson/model/queue/Tasks.java b/core/src/main/java/hudson/model/queue/Tasks.java index 19c419ed7f11c48ffd6d2d264830d8ada9e2eb6d..51eff22caec57e95915123c544ba47c0ad5da499 100644 --- a/core/src/main/java/hudson/model/queue/Tasks.java +++ b/core/src/main/java/hudson/model/queue/Tasks.java @@ -41,62 +41,30 @@ import jenkins.security.QueueItemAuthenticatorConfiguration; */ public class Tasks { - /** - * 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 _getSubTasksOf(Task task) { - return task.getSubTasks(); - } - public static Collection getSubTasksOf(Task task) { try { - return _getSubTasksOf(task); + return task.getSubTasks(); } catch (AbstractMethodError e) { return Collections.singleton(task); } } - /** - * 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) { - return t.getSameNodeConstraint(); - } - public static Object getSameNodeConstraintOf(SubTask t) { try { - return _getSameNodeConstraintOf(t); + return t.getSameNodeConstraint(); } catch (AbstractMethodError e) { return null; } } - /** - * 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) { - return t.getOwnerTask(); - } - public static @Nonnull Task getOwnerTaskOf(@Nonnull SubTask t) { try { - return _getOwnerTaskOf(t); + return t.getOwnerTask(); } catch (AbstractMethodError e) { return (Task)t; } } - /** - * 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 Authentication _getDefaultAuthenticationOf(Task t) { - return t.getDefaultAuthentication(); - } - /** * @param t a task * @return {@link Task#getDefaultAuthentication}, or {@link ACL#SYSTEM} @@ -104,7 +72,7 @@ public class Tasks { */ public static Authentication getDefaultAuthenticationOf(Task t) { try { - return _getDefaultAuthenticationOf(t); + return t.getDefaultAuthentication(); } catch (AbstractMethodError e) { return ACL.SYSTEM; } diff --git a/core/src/main/java/hudson/scm/SCM.java b/core/src/main/java/hudson/scm/SCM.java index 630ad53e00064501adacd7939141efdaafd47742..d005ac1255ff56b61758f2686a450ba1618129af 100644 --- a/core/src/main/java/hudson/scm/SCM.java +++ b/core/src/main/java/hudson/scm/SCM.java @@ -321,10 +321,6 @@ public abstract class SCM implements Describable, ExtensionPoint { return calcRevisionsFromBuild(build, launcher != null ? build.getWorkspace() : null, launcher, listener); } - /** - * A pointless function to work around what appears to be a HotSpot problem. See JENKINS-5756 and bug 6933067 - * on BugParade for more details. - */ @Deprecated public SCMRevisionState _calcRevisionsFromBuild(AbstractBuild build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException { return calcRevisionsFromBuild(build, launcher, listener); @@ -395,7 +391,7 @@ public abstract class SCM implements Describable, ExtensionPoint { if (baseline!=SCMRevisionState.NONE) { baseline2 = baseline; } else { - baseline2 = _calcRevisionsFromBuild(project.getLastBuild(), launcher, listener); + baseline2 = calcRevisionsFromBuild(project.getLastBuild(), launcher, listener); } return compareRemoteRevisionWith(project, launcher, workspace, listener, baseline2);