Skip to content
Permalink
Browse files

Merge pull request #3154 from oleg-nenashev/bug/JENKINS-48116

[JENKINS-48116] - Restore AbstractTaskListener binary compatibility in the core.
  • Loading branch information...
oleg-nenashev committed Nov 26, 2017
2 parents b431eb4 + 60085a0 commit f33506f4f6b428a49aeef4574df00ce483a65257
@@ -1,11 +1,16 @@
package hudson.util;

import hudson.RestrictedSince;
import hudson.model.TaskListener;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;


/**
* @deprecated implement {@link TaskListener} directly
*/
@Deprecated
@Restricted(NoExternalUse.class)
@RestrictedSince("2.91")
public abstract class AbstractTaskListener implements TaskListener {
}
@@ -35,10 +35,13 @@
import java.util.logging.LogRecord;
import java.util.logging.Logger;

// TODO: AbstractTaskListener is empty now, but there are dependencies on that e.g. Ruby Runtime - JENKINS-48116)
// The change needs API deprecation policy or external usages cleanup.

/**
* {@link TaskListener} which sends messages to a {@link Logger}.
*/
public class LogTaskListener implements TaskListener, Closeable {
public class LogTaskListener extends AbstractTaskListener implements TaskListener, Closeable {

// would be simpler to delegate to the LogOutputStream but this would incompatibly change the serial form
private final TaskListener delegate;
@@ -44,6 +44,9 @@
import java.util.logging.Logger;
import org.kohsuke.stapler.framework.io.WriterOutputStream;

// TODO: AbstractTaskListener is empty now, but there are dependencies on that e.g. Ruby Runtime - JENKINS-48116)
// The change needs API deprecation policy or external usages cleanup.

/**
* {@link TaskListener} that generates output into a single stream.
*
@@ -52,7 +55,7 @@
*
* @author Kohsuke Kawaguchi
*/
public class StreamTaskListener implements TaskListener, Closeable {
public class StreamTaskListener extends AbstractTaskListener implements TaskListener, Closeable {
private PrintStream out;
private Charset charset;

0 comments on commit f33506f

Please sign in to comment.
You can’t perform that action at this time.