apache / apache/beam

StateTags$CombiningValueStateTag inherits equals from super class but without incorporating its state

Open
#18,017 0 comments 0 reactions 0 assignees View on GitHub
bug core good first issue java P3
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
2d 2h
Merged PRs (30d)
205

Description

[FindBugs EQ_DOESNT_OVERRIDE_EQUALS](https://github.com/apache/incubator-beam/blob/58a029a06aea1030279e5da8f9fa3114f456c1db/sdks/java/build-tools/src/main/resources/beam/findbugs-filter.xml#L555): Class doesn't override equals in superclass

Applies to: [StateTags$CombiningValueStateTag](https://github.com/apache/incubator-beam/blob/58a029a06aea1030279e5da8f9fa3114f456c1db/sdks/java/core/src/main/java/org/apache/beam/sdk/util/state/StateTags.java#L344). CombiningValueStateTag inherits its equals implementation from its parent class, KeyedCombiningValueStateTag. CombiningValueStateTag has additional fields which are not included in the equality implementation, which may be incorrect.

This is a good starter bug. When fixing, please remove the corresponding entries from [findbugs-filter.xml](https://github.com/apache/incubator-beam/blob/master/sdks/java/build-tools/src/main/resources/beam/findbugs-filter.xml) and verify the build passes.

Imported from Jira [BEAM-421](https://issues.apache.org/jira/browse/BEAM-421). Original Jira may contain additional context.
Reported by: swegner.

Contributor guide

Open the contributing guide

Research direction

Start in sdks/java/core/src/main/java/org/apache/beam/sdk/util/state/StateTags.java at StateTags$CombiningValueStateTag and compare its inherited equality with its additional fields. Then inspect the corresponding entries in sdks/java/build-tools/src/main/resources/beam/findbugs-filter.xml. Done means the equality issue is addressed, the filter entries are removed, and the Java build passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.