-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement
Milestone
Description
Richard Fearn opened SPR-7134 and commented
It would be handy to have a getLastTask()
method to allow the TaskInfo
object to be passed around (e.g. for logging). Something like this:
/**
* Return the last task.
*/
public TaskInfo getLastTask() throws IllegalStateException {
if (this.lastTaskInfo == null) {
throw new IllegalStateException("No tasks run: can't get last task");
}
return this.lastTaskInfo;
}
Also, there's a typo in getLastTaskName()
, presumably because getLastTaskTimeMillis()
was copied. The exception message should read "can't get last name"
instead of "can't get last interval"
.
Finally, I imagine this has something to do with the original use of this code, but shouldn't the execption messages in both getLastTaskName()
and getLastTaskTimeMillis()
refer to "tasks"
instead of "tests"
?
Affects: 3.0.2
Referenced from: commits ceb668a
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement