Skip to content

[Bug] SourceWorker#convertRecordToEvent method converts ConnectRecord to CloudEvent throw NPE #4596

@mxsm

Description

@mxsm

Search before asking

  • I had searched in the issues and found no similar issues.

Environment

Windows

EventMesh version

master

What happened

SourceWorker#convertRecordToEvent method may be throw NPE

How to reproduce

when ConnectRecord property is null

Debug logs

Exception in thread "pool-2-thread-1" java.lang.NullPointerException
at org.apache.eventmesh.openconnect.SourceWorker.convertRecordToEvent(SourceWorker.java:247)
at org.apache.eventmesh.openconnect.SourceWorker.startPollAndSend(SourceWorker.java:189)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions