Repository: jenkinsci/jenkins
File: core/src/main/java/hudson/model/StreamBuildListener.java (Java)

Code before:

import hudson.util.StreamTaskListener;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.nio.charset.Charset;

/**
 * {@link BuildListener} that writes to an {@link OutputStream}.
 *
 * This class is remotable.
 *
 * @author Kohsuke Kawaguchi
 */
public class StreamBuildListener extends StreamTaskListener implements BuildListener {
    public StreamBuildListener(OutputStream out, Charset charset) {
        super(out, charset);
    }

    public StreamBuildListener(File out, Charset charset) throws IOException {
        super(out, charset);
    }

    /**
     * @deprecated as of 2.328
     *      The caller should use {@link #StreamBuildListener(OutputStream, Charset)} to pass in
     *      the charset and output stream separately, so that this class can handle encoding correctly.
     */
    @Deprecated
    public StreamBuildListener(OutputStream w) {
        super(w);
    }

    /**
     * @deprecated as of 1.349
     *      The caller should use {@link #StreamBuildListener(OutputStream, Charset)} to pass in
     *      the charset and output stream separately, so that this class can handle encoding correctly.
     */
    @Deprecated
    public StreamBuildListener(PrintStream w) {
        super(w);
    }

    public StreamBuildListener(PrintStream w, Charset charset) {
        super(w, charset);
    }

    private static final long serialVersionUID = 1L;
}


Review comment (suggestion):
The deprecation was added in 2.329 as far as I can tell, commit 3b29e9d460381f83eba9e939f6053b8336d946f4
```suggestion
     * @deprecated as of 2.329
```

Code after:

import hudson.util.StreamTaskListener;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.nio.charset.Charset;

/**
 * {@link BuildListener} that writes to an {@link OutputStream}.
 *
 * This class is remotable.
 *
 * @author Kohsuke Kawaguchi
 */
public class StreamBuildListener extends StreamTaskListener implements BuildListener {
    public StreamBuildListener(OutputStream out, Charset charset) {
        super(out, charset);
    }

    public StreamBuildListener(File out, Charset charset) throws IOException {
        super(out, charset);
    }

    /**
     * @deprecated as of 2.329
     *      The caller should use {@link #StreamBuildListener(OutputStream, Charset)} to pass in
     *      the charset and output stream separately, so that this class can handle encoding correctly.
     */
    @Deprecated
    public StreamBuildListener(OutputStream w) {
        super(w);
    }

    /**
     * @deprecated as of 1.349
     *      The caller should use {@link #StreamBuildListener(OutputStream, Charset)} to pass in
     *      the charset and output stream separately, so that this class can handle encoding correctly.
     */
    @Deprecated
    public StreamBuildListener(PrintStream w) {
        super(w);
    }

    public StreamBuildListener(PrintStream w, Charset charset) {
        super(w, charset);
    }

    private static final long serialVersionUID = 1L;
}