Skip to content

Change == operator to .equals() #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Change == operator to .equals()
This provides optional future functionality allowing the .equals() to be overridden.
  • Loading branch information
jeremyz23 authored Oct 4, 2018
commit e68cd0d6d76df7c41fb602b1f8d2c1fb025a9d70
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
class DurationCalculator {

public long calculateNewDuration(ViscosityInterpolator viscosity, long timesAnimationViewed, long currentDuration) {
if (currentDuration == 0) {
if (currentDuration.equals(0)) {
Log.e("duration was zero");
return 0;
}
if (timesAnimationViewed == 0) {
if (timesAnimationViewed.equals(0)) {
Log.v("first time viewing so no duration change");
return currentDuration;
}
Expand Down