Skip to content
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

Vote functionality #62

Merged
merged 16 commits into from
Sep 7, 2018
Merged

Vote functionality #62

merged 16 commits into from
Sep 7, 2018

Conversation

vadigerman
Copy link
Contributor

Checklist

  • I've run mvn test from the root directory to see all new and existing tests pass
  • I've followed code style and run and ensured the code style is valid
  • I've created new tests if necessary.

Motivation and Context

#59

Description

vote count and radio button hides after vote, create user-poll entity, impossibility of a repeat vote, validation duplicate vote and hide poll

private User author;

private String date;
private String time;
private String eventName;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that this refactoring is redundant. Because we are working with Event entity we know that name corresponds to it and we don't need to explicitly say that it's eventName.
Same for other attributes.

@@ -18,7 +18,7 @@
@JoinColumn(name = "poll_id")
private Poll poll;

private int counter;
private int counter = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that all Java primitives has default value and as they are primitives they can't be null.
As far as I know default value of int is 0

@@ -18,7 +18,7 @@
@JoinColumn(name = "poll_id")
private Poll poll;

private int counter;
private int counter = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I belive that all Java primitives has default value and as they are primitives they can't be null.
As far as I know default value of int is 0

GatisFr
GatisFr previously approved these changes Sep 7, 2018
@FLARS FLARS merged commit 7a09c4a into master Sep 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants