Skip to content
Browse files

Fix voteId generation.

Previously voteType was set after generating the id causing conflicts
between committee and floor votes. The voteId date format has also been
fixed to use the day of the month, not the of the year.
  • Loading branch information...
1 parent d9f50c4 commit 98e9f62e1544ab6869a7a4535906b47085542a3d @GraylinKim GraylinKim committed Aug 21, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/main/java/gov/nysenate/openleg/model/Vote.java
View
6 src/main/java/gov/nysenate/openleg/model/Vote.java
@@ -20,7 +20,7 @@
@XStreamAlias("vote")
public class Vote extends SenateObject {
- public static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/DD");
+ public static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
private int voteType;
@@ -71,10 +71,10 @@ public Vote() {
public Vote (Bill bill, Date date, int type, String sequenceNumber) {
this();
- this.id = buildId(bill, date, sequenceNumber);
- this.voteType = type;
this.bill = bill;
this.voteDate = date;
+ this.voteType = type;
+ this.id = buildId(bill, date, sequenceNumber);
}

0 comments on commit 98e9f62

Please sign in to comment.
Something went wrong with that request. Please try again.