Skip to content

[Improve][SDK] Enhance Event Attribute Validation and Decoding Logic in SDK​​ #11863

@gosonzhang

Description

@gosonzhang

Description

In the current implementation, the absence of null checks for event attributes may result in NullPointerException during string construction via MapJoiner[1]. Additionally, similar robustness issues exist in the decoding logic[2].

To address these concerns, we propose the following improvements:
a. ​​Null-Safe Attribute Handling​​: implement comprehensive null checks for event attributes before processing.

b. ​​Robust Decoding Mechanism​​: Enhance decoding logic to gracefully handle malformed or unexpected data inputs
​​

  1. https://github.com/apache/inlong/blob/master/inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/network/tcp/codec/EncodeObject.java#L94
    Image

  2. https://github.com/apache/inlong/blob/master/inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/network/tcp/codec/DecodeObject.java#L90
    Image

InLong Component

InLong SDK

Are you willing to submit PR?

  • Yes, I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions