From 8fe8a5c0df366b25868a341f0017dea2acafff69 Mon Sep 17 00:00:00 2001 From: jglick Date: Mon, 9 Mar 2009 19:43:33 +0000 Subject: [PATCH] Correcting some warnings. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@16133 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/tasks/Notifier.java | 2 ++ core/src/main/java/hudson/tasks/Publisher.java | 6 ++++-- core/src/main/java/hudson/tasks/Recorder.java | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/hudson/tasks/Notifier.java b/core/src/main/java/hudson/tasks/Notifier.java index f1776d4398..6c44ccc23e 100644 --- a/core/src/main/java/hudson/tasks/Notifier.java +++ b/core/src/main/java/hudson/tasks/Notifier.java @@ -44,6 +44,8 @@ import hudson.ExtensionPoint; * @see Recorder */ public abstract class Notifier extends Publisher implements ExtensionPoint { + @SuppressWarnings("deprecation") // super only @Deprecated to discourage other subclasses + protected Notifier() {} public BuildStepDescriptor getDescriptor() { return (BuildStepDescriptor)super.getDescriptor(); } diff --git a/core/src/main/java/hudson/tasks/Publisher.java b/core/src/main/java/hudson/tasks/Publisher.java index b17646c5db..ab65e8aa7a 100644 --- a/core/src/main/java/hudson/tasks/Publisher.java +++ b/core/src/main/java/hudson/tasks/Publisher.java @@ -23,7 +23,6 @@ */ package hudson.tasks; -import hudson.Launcher; import hudson.DescriptorExtensionList; import hudson.Extension; import hudson.maven.MavenReporter; @@ -32,7 +31,6 @@ import hudson.model.Build; import hudson.model.BuildListener; import hudson.model.Describable; import hudson.model.Project; -import hudson.model.AbstractBuild; import hudson.model.Descriptor; import hudson.model.Hudson; @@ -77,6 +75,8 @@ public abstract class Publisher extends BuildStepCompatibilityLayer implements B /** * Default implementation that does nothing. */ + @Deprecated + @Override public boolean prebuild(Build build, BuildListener listener) { return true; } @@ -84,6 +84,8 @@ public abstract class Publisher extends BuildStepCompatibilityLayer implements B /** * Default implementation that does nothing. */ + @Deprecated + @Override public Action getProjectAction(Project project) { return null; } diff --git a/core/src/main/java/hudson/tasks/Recorder.java b/core/src/main/java/hudson/tasks/Recorder.java index 46b3a491dd..11c85cb069 100644 --- a/core/src/main/java/hudson/tasks/Recorder.java +++ b/core/src/main/java/hudson/tasks/Recorder.java @@ -45,6 +45,8 @@ import hudson.ExtensionPoint; * @see Notifier */ public abstract class Recorder extends Publisher implements ExtensionPoint { + @SuppressWarnings("deprecation") // super only @Deprecated to discourage other subclasses + protected Recorder() {} public BuildStepDescriptor getDescriptor() { return (BuildStepDescriptor)super.getDescriptor(); }