[
https://issues.apache.org/jira/browse/BEAM-3659?focusedWorklogId=169236&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-169236
]
ASF GitHub Bot logged work on BEAM-3659:
----------------------------------------
Author: ASF GitHub Bot
Created on: 25/Nov/18 21:49
Start Date: 25/Nov/18 21:49
Worklog Time Spent: 10m
Work Description: cademarkegard commented on a change in pull request
#7126: [BEAM-3659] Port UserScoreTest off DoFnTester
URL: https://github.com/apache/beam/pull/7126#discussion_r236091514
##########
File path:
examples/java/src/main/java/org/apache/beam/examples/complete/game/UserScore.java
##########
@@ -108,8 +112,39 @@ public String getKey(String keyname) {
}
}
- public Long getTimestamp() {
- return this.timestamp;
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
Review comment:
nevermind, I had to revert it, FindBugs reported it:
```EQ_GETCLASS_AND_CLASS_CONSTANT: equals method fails for subtypes
This class has an equals method that will be broken if it is inherited by
subclasses. It compares a class literal with the class of the argument (e.g.,
in class Foo it might check if Foo.class == o.getClass()). It is better to
check if this.getClass() == o.getClass().```
So I changed it from the fields to the getter methods.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 169236)
Time Spent: 1.5h (was: 1h 20m)
> Port UserScoreTest off DoFnTester
> ---------------------------------
>
> Key: BEAM-3659
> URL: https://issues.apache.org/jira/browse/BEAM-3659
> Project: Beam
> Issue Type: Sub-task
> Components: examples-java
> Reporter: Kenneth Knowles
> Assignee: Cade Markegard
> Priority: Major
> Labels: beginner, newbie, starter
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)