Skip to content
This repository was archived by the owner on Jul 4, 2024. It is now read-only.
This repository was archived by the owner on Jul 4, 2024. It is now read-only.

Redundant statement of adding label to the label list? #3

@chenmiao

Description

@chenmiao

Still the same code block, where there is a statement about adding lbl to the lableList

for (Label lbl : labels) {
if (label.equals(lbl)) {//it seems should't be this way, but should be label.name.equals(lbl)
hit = true;
break;
}
labelList.add(lbl);
}

This looks to be a redundant line because the next code block does the same thing: adding non-hit label to the labelList

if (!hit) {
labelList.add(label); //seems to be redundant because of above statement labelList.add(lbl);
db.setNodeLabels(subjectNode, labelList.toArray(new Label[labelList.size()]));
addedLabels++;
}

So the line can be crossed out?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions