Skip to content

Version 2.10 null pointer on toString #601

@odenzo

Description

@odenzo

On Line 222 of MetaData.scala
def buildString(sb: StringBuilder): StringBuilder = {
sb append ' '
toString1(sb)
next buildString sb
}
The "next" function indicates it can return null or the next MetaData object.
Shouldn't this be checking for null value.
(e.g. Option(next).map(n => n.buildString(sb)))
I am trying to build Attributes by hand and adding null metadata and get this error.

Which is solved by setting the next to "Null" :-/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions