Skip to content

Client failing to save when Tag value is null #282

@eduelias

Description

@eduelias

Looking at "master"'s code here you can see:

String value = tag.getValue()

And, two lines down, we check:

if (key.isEmpty() || value.isEmpty())

But if value is null, "isEmpty" will throw an unwanted "NullPointException". Instead, in this place, we should check value != null and then value.isEmpty().

Steps to reproduce:
List the minimal actions needed to reproduce the behavior.

  1. append a tag with null value

Expected behavior:
Ignore the tag

Actual behavior:
Throws error

Specifications:

  • Client Version: current master
  • InfluxDB Version: 2.1
  • JDK Version: 11
  • Platform: Windows/MacOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions