Skip to content

CloudEventMessageUtils.getTime cannot be cast exception #1127

Closed
@SheheryarAamir

Description

@SheheryarAamir

Describe the bug
CloudEventMessageUtils.getTime(<>) through below error

class java.lang.String cannot be cast to class java.time.OffsetDateTime (java.lang.String and java.time.OffsetDateTime are in module java.base of loader 'bootstrap'). 

I think we should use OffsetDateTime.prase(<>) instead

I dont even able to find a test against this method getTime

Sample
Its a simple issue so i dont have a sample to share, in case its required I will create pull request to add unit test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions