Skip to content

Remove nulls #53

@kevinwallimann

Description

@kevinwallimann

There are many null checks for arguments in the codebase, e.g.

  override def write(dataFrame: DataFrame, streamManager: StreamManager): StreamingQuery = {
    if (dataFrame == null) {
      throw new IllegalArgumentException("Null DataFrame.")
    }

Since null should not be used in scala, an occurrence of null is a serious problem which cannot be handled. Throwing an IllegalArgumentException instead of letting the program fail with a NullPointerException adds little information.

Task

  • Remove null checks
  • Wrap null values coming from Java code in Option

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions