Skip to content

Use Node#sameValueAs instead of Node#equals #782

@bnouwt

Description

@bnouwt

According to Apache Jena's website we should not use the Node#equals(...) method to compare two nodes with each other, because this method does not take the real RDF semantics into account. Instead, we should use the Node#sameValueAs(...) method which does take RDF semantics into account.

In the current master branch, we use the equals(...) method in the following places:

Image

Consider replacing these with the sameValueAs(...) method, but take into account whether this is actually what we want. Maybe also create some unit tests to discover whether this change actually makes a difference.

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