Opened 5 years ago
Closed 5 years ago
#12935 closed defect (fixed)
DateTimeHelper.parse NullPointerException
Reported by: | iwakeh | Owned by: | |
---|---|---|---|
Priority: | Medium | Milestone: | |
Component: | Metrics/Onionoo | Version: | |
Severity: | Keywords: | ||
Cc: | Actual Points: | ||
Parent ID: | Points: | ||
Reviewer: | Sponsor: |
Description
The parse method of DateFormat throws a NullPointerE when presented with
a null
argument.
During the initial setup of my vagrant-test-environment this happend about
five to ten times stopping the entire process.
Find the mini-patch attached.
(I will include this change also with the bigger patch suggestions for logging etc.)
I think such problems should be logged in addition.
Do you agree?
Child Tickets
Attachments (2)
Change History (7)
Changed 5 years ago by
Attachment: | DateTimeHelper.java.patch added |
---|
comment:1 Changed 5 years ago by
comment:2 Changed 5 years ago by
Status: | new → needs_review |
---|
comment:4 Changed 5 years ago by
Or can you submit a single patch for the change here, independent of #12882?
Changed 5 years ago by
Attachment: | 0001-12935-without-logging.patch added |
---|
this should be logging free.
comment:5 Changed 5 years ago by
Resolution: | → fixed |
---|---|
Status: | needs_review → closed |
This has been merged as part of #12882.
I just ran the cronjob in a freshly installed Vagrant box and didn't encounter any problems with null being passed to that function. If you still have the logs, or if you ever run into those cases again, please re-open this ticket, so that we can fix those calls.
And, I would suggest a constant for the return value
-1L
,e.g. something like
NO_TIME = -1L;
.I'll add that to the other patches, if you don't object.