Skip to content

Why doesn't the Close class override the Hash method? #1027

@hidexg

Description

@hidexg

The Close class does not override the GetHashCode() method, which may lead to unexpected behavior when using LINQ operations (e.g., Distinct(), GroupBy()) on PdfSubpath objects. For example, when comparing differences between two PDF versions, objects that should be considered equal might not be correctly identified due to inconsistent hash codes.
here.

Suggested Fix:

public override int GetHashCode()
{
    return typeof(Close).GetHashCode();
}

Is this an intentional design choice or a potential bug?

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