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)

DateTimeHelper.java.patch (578 bytes) - added by iwakeh 5 years ago.
0001-12935-without-logging.patch (1.9 KB) - added by iwakeh 5 years ago.
this should be logging free.

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by iwakeh

Attachment: DateTimeHelper.java.patch added

comment:1 Changed 5 years ago by iwakeh

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.

comment:2 Changed 5 years ago by iwakeh

Status: newneeds_review

comment:3 Changed 5 years ago by iwakeh

Better see the suggestion in the logging patch #12882.

comment:4 Changed 5 years ago by karsten

Or can you submit a single patch for the change here, independent of #12882?

Changed 5 years ago by iwakeh

this should be logging free.

comment:5 Changed 5 years ago by karsten

Resolution: fixed
Status: needs_reviewclosed

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.

Note: See TracTickets for help on using tickets.