Skip to content

Four unreachable code paths, one of them misleading #8338

Description

@aglinxinyuan

Task Summary

Four code paths in the tree cannot be reached, and one of them actively misleads a reader:

Site Why it is unreachable
user-dataset-version-creator.component.tsget formControlNames() The identifier occurs exactly once repo-wide: its own declaration. No caller, no template binding.
expression_evaluator.pyExpressionEvaluator._contextualize_expression Zero call sites. The only member any other module touches on that class is evaluate.
Attribute.java — two null guards in equals The sole constructor checkNotNulls both fields, both are private final, there is no setter and no subclass, so no instance with a null field can exist.
user-dataset-file-renderer.component.ts — the empty-row filter for (const cell in row) enumerates keys, not values, so cell != "" is true on the first iteration for any row with at least one key and the predicate returns true. Its comment claims it filters empty rows; it does not.

Two of these are worth more than the line count.

The second Attribute.equals guard is latently wrong, not merely unreachable: it returns that.attributeType == null and ignores the attribute names entirely, so two differently-named attributes with null types would compare equal — which would break the Schema lookups and Set semantics built on this class. (Reported separately as #8149.)

The file-renderer filter is the misleading one. A reader sees a comment saying empty rows are filtered and reasonably assumes they are.

Task Type

  • Refactor / Cleanup

Was this issue authored using generative AI tooling?

Generated-by: Claude Code (Opus 5)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions