Skip to content

updateIngress incorrectly sets participantIdentity to null #107

@juancarmore

Description

@juancarmore

Describe the bug
There is an issue in the updateIngress function of IngressServiceClient where the parameter validation is incorrect. If participantIdentity is not provided, the function explicitly sets the field this.participantIdentity to null, causing a runtime error. Additionally, if a value is provided, it is ignored due to a logic error.

Steps to Reproduce
Steps to reproduce the behavior:

  1. Call updateIngress without providing a value for participantIdentity.
  2. Observe that this.participantIdentity is explicitly set to null, leading to a runtime error.
  3. Call updateIngress with a non-null participantIdentity value.
  4. Observe that the provided value is ignored.

Code Snippet

if (participantIdentity == null) {
    this.participantIdentity = participantIdentity;
}

Code

Expected Behavior

  • If participantIdentity is null, the field should remain unchanged.
  • If a value is provided, it should be assigned correctly.

Actual Behavior

  • The function explicitly sets this.participantIdentity to null, causing a runtime error.
  • Any provided value is ignored.

Suggested Fix
Change the logic to properly assign the provided parameter only when non-null value is provided.

Device Info:

  • Java Version: Java 21
  • LiveKit Server SDK version: 0.8.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions