Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
*
* @author Steven G. Brown
*/
public final class TimestampAnnotator extends ConsoleAnnotator<Object> {
public final class TimestampAnnotator extends ConsoleAnnotator<Run<?, ?>> {

private static final long serialVersionUID = 1L;

Expand All @@ -69,9 +69,7 @@ public final class TimestampAnnotator extends ConsoleAnnotator<Object> {

/** {@inheritDoc} */
@Override
public ConsoleAnnotator<Object> annotate(Object context, MarkupText text) {
Run<?, ?> build = (Run<?, ?>) context;

public ConsoleAnnotator<Run<?, ?>> annotate(Run<?, ?> build, MarkupText text) {
try {
if (timestampsReader == null) {
ConsoleLogParser.Result logPosition = logParser.seek(build);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,12 @@
* @author Steven G. Brown
*/
@Extension(dynamicLoadable = YesNoMaybe.YES)
public final class TimestampAnnotatorFactory3 extends ConsoleAnnotatorFactory<Object> {
public final class TimestampAnnotatorFactory3 extends ConsoleAnnotatorFactory<Run<?, ?>> {

/** {@inheritDoc} */
@Override
public ConsoleAnnotator<Object> newInstance(Object context) {
// Prior to Jenkins 2.145, context was the build class (see 7bc431f)
Class<?> contextClass = context instanceof Class<?> ? (Class<?>) context : context.getClass();
if (!Run.class.isAssignableFrom(contextClass)) {
return null; // something else
}
if (TimestampNote.useTimestampNotes(contextClass)) {
public ConsoleAnnotator<Run<?, ?>> newInstance(Run<?, ?> build) {
if (TimestampNote.useTimestampNotes(build.getClass())) {
return null; // not using this system
}
StaplerRequest request = Stapler.getCurrentRequest();
Expand Down