-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
…/ctco-dev/event-organizer into vote_counter # Conflicts: # src/main/webapp/app/jsp/event.jsp
…/ctco-dev/event-organizer into vote_counter # Conflicts: # src/main/webapp/app/jsp/event.jsp
…-dev/event-organizer into vote_counter # Conflicts: # src/main/webapp/javascript/event.js
private User author; | ||
|
||
private String date; | ||
private String time; | ||
private String eventName; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
Checklist
mvn test
from the root directory to see all new and existing tests passMotivation 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