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

CalendarIntervalTriggerImpl throws NPE when IntervalUnit is MILLISECOND #1297

Open
thrykol opened this issue Jan 6, 2025 · 0 comments
Open

Comments

@thrykol
Copy link

thrykol commented Jan 6, 2025

Version: Quartz 2.3.2

time.getTime() throws a NPE inside CalendarIntervalTriggerImpl#getFireTimeAfter when using IntervalUnit.MILLISECOND. The code is assuming that the minimum unit is SECOND.

java.lang.NullPointerException: Cannot invoke "java.util.Date.getTime()" because "time" is null
	at org.quartz.impl.triggers.CalendarIntervalTriggerImpl.getFireTimeAfter(CalendarIntervalTriggerImpl.java:844)
	at org.quartz.impl.triggers.CalendarIntervalTriggerImpl.getFireTimeAfter(CalendarIntervalTriggerImpl.java:675)
	at org.quartz.impl.triggers.CalendarIntervalTriggerImpl.triggered(CalendarIntervalTriggerImpl.java:513)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.triggerFired(JobStoreSupport.java:3069)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport$44.execute(JobStoreSupport.java:2985)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport$44.execute(JobStoreSupport.java:2978)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3864)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.triggersFired(JobStoreSupport.java:2977)
	at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:353)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant