Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Statistic Listener throws NullPointerException if the start time of a task execution is not set #74

Closed
1 task done
schmalzing opened this issue Jan 10, 2025 · 0 comments · Fixed by #75
Closed
1 task done
Assignees
Labels

Comments

@schmalzing
Copy link
Member

schmalzing commented Jan 10, 2025

Are you able replicate the bug in the latest version of MontiCore.

Describe the bug

As previously reported, there is sometimes the issue that the StatisticListener does not store the start time of a task execution. If the start time is missing, calculating the execution time of the task may throw a NullPointerException.

Steps to reproduce

  1. Create a dummy task
  2. Call afterExecution(Task) for that task without callit beforeExecution(Task) first

Expected behaviour

First, I would expect the start time to always be present. However, as we cannot reliably assure this, I then would expect the StatisticListener to not throw a NullPointerException. Instead, skip the calculation of the task's execution time and report the missing start time in the debug log.

Minimal reproducible example

No response

Relevant CI workflow/pipeline

No response

Gradle Log

No response

Additional information

No response

@schmalzing schmalzing added the bug label Jan 10, 2025
@schmalzing schmalzing self-assigned this Jan 10, 2025
@schmalzing schmalzing linked a pull request Jan 10, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant