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

Unified logs missing time stamps causes NPE #274

Open
ghost opened this issue Feb 24, 2023 · 0 comments
Open

Unified logs missing time stamps causes NPE #274

ghost opened this issue Feb 24, 2023 · 0 comments

Comments

@ghost
Copy link

ghost commented Feb 24, 2023

Unified GC logs without a timestamp will cause NPE as all of the code expects a timestamp. Use first date stamp as a base of 0.000 seconds and then synthetically generate timestamps for each JVMEvent.

ghost pushed a commit that referenced this issue Feb 28, 2023
ghost pushed a commit that referenced this issue Mar 2, 2023
* 🐛 fix for issue #274

* refactor: debug NPE to improve robustness when GCToolKit is being used in unexpected ways

* refactor: update test data version and move from snapshot to full release

* refactor: update versions in poms

* Update api/src/main/java/com/microsoft/gctoolkit/time/DateTimeStamp.java

* Update IT/src/test/java/com/microsoft/gctoolkit/integration/CaptureJVMTerminationEventTest.java

Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>

* Update IT/src/test/java/com/microsoft/gctoolkit/integration/MissingAnnotationTest.java

Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>

* Update api/src/main/java/com/microsoft/gctoolkit/time/DateTimeStamp.java

Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>

* Update api/src/main/java/com/microsoft/gctoolkit/time/DateTimeStamp.java

Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>

* Update api/src/main/java/com/microsoft/gctoolkit/time/DateTimeStamp.java

Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>

* Update api/src/main/java/com/microsoft/gctoolkit/time/DateTimeStamp.java

Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>

* Update DateTimeStamp.java

DateTimeStamp implements Comparable<DateTimeStamp> so delegate before and after methods to the compareTo method

* tidy: review of PR

* tidy: finally to ensure the close is always called on the channel

---------

Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>
Co-authored-by: David Grieve <dagrieve@microsoft.com>
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

0 participants