|
From: <pe...@us...> - 2003-11-21 04:42:49
|
Update of /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/totalizers
In directory sc8-pr-cvs1:/tmp/cvs-serv10206/src/java/org/neuclear/bet/totalizers
Modified Files:
BettingEventExpired.java TotalizerEvent.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: BettingEventExpired.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/totalizers/BettingEventExpired.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** BettingEventExpired.java 20 Sep 2003 23:19:22 -0000 1.1.1.1
--- BettingEventExpired.java 21 Nov 2003 04:42:45 -0000 1.2
***************
*** 9,18 ****
* Time: 5:10:12 PM
*/
! public class BettingEventExpired extends Exception {
! public BettingEventExpired(String string) {
super(string);
}
! public BettingEventExpired(String string, Throwable throwable) {
super(string, throwable);
}
--- 9,18 ----
* Time: 5:10:12 PM
*/
! public final class BettingEventExpired extends Exception {
! public BettingEventExpired(final String string) {
super(string);
}
! public BettingEventExpired(final String string, final Throwable throwable) {
super(string, throwable);
}
Index: TotalizerEvent.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/totalizers/TotalizerEvent.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** TotalizerEvent.java 20 Sep 2003 23:19:22 -0000 1.1.1.1
--- TotalizerEvent.java 21 Nov 2003 04:42:45 -0000 1.2
***************
*** 17,21 ****
*/
public abstract class TotalizerEvent implements BettingEvent {
! public TotalizerEvent(Totalizer tote, BettingEvent event) {
this.event = event;
this.tote = tote;
--- 17,21 ----
*/
public abstract class TotalizerEvent implements BettingEvent {
! public TotalizerEvent(final Totalizer tote, final BettingEvent event) {
this.event = event;
this.tote = tote;
***************
*** 23,68 ****
}
! public String getId() {
return event.getId(); //To change body of implemented methods use Options | File Templates.
}
! public String getTitle() {
return event.getId();
}
! public Date getClosingTime() {
return event.getClosingTime(); //To change body of implemented methods use Options | File Templates.
}
! public Iterator listOutcomes() {
return outcomes.iterator(); //To change body of implemented methods use Options | File Templates.
}
! public boolean isClosed() {
return event.isClosed(); //To change body of implemented methods use Options | File Templates.
}
! public boolean isFinished() {
return event.isFinished(); //To change body of implemented methods use Options | File Templates.
}
! public EventOutcome getWinner() {
return event.getWinner(); //To change body of implemented methods use Options | File Templates.
}
! public void scratch(EventOutcome outcome) {
event.scratch(outcome);
outcomes.remove(outcome);
}
! public Totalizer getTotalizer() {
return tote;
}
private List convertOutcomes() {
! List list = new LinkedList();
! Iterator orig = event.listOutcomes();
while (orig.hasNext()) {
! EventOutcome outcome = (EventOutcome) orig.next();
list.add(tote.makeBettable(outcome));
}
--- 23,68 ----
}
! public final String getId() {
return event.getId(); //To change body of implemented methods use Options | File Templates.
}
! public final String getTitle() {
return event.getId();
}
! public final Date getClosingTime() {
return event.getClosingTime(); //To change body of implemented methods use Options | File Templates.
}
! public final Iterator listOutcomes() {
return outcomes.iterator(); //To change body of implemented methods use Options | File Templates.
}
! public final boolean isClosed() {
return event.isClosed(); //To change body of implemented methods use Options | File Templates.
}
! public final boolean isFinished() {
return event.isFinished(); //To change body of implemented methods use Options | File Templates.
}
! public final EventOutcome getWinner() {
return event.getWinner(); //To change body of implemented methods use Options | File Templates.
}
! public final void scratch(final EventOutcome outcome) {
event.scratch(outcome);
outcomes.remove(outcome);
}
! public final Totalizer getTotalizer() {
return tote;
}
private List convertOutcomes() {
! final List list = new LinkedList();
! final Iterator orig = event.listOutcomes();
while (orig.hasNext()) {
! final EventOutcome outcome = (EventOutcome) orig.next();
list.add(tote.makeBettable(outcome));
}
***************
*** 71,76 ****
! private BettingEvent event;
! private Totalizer tote;
! private List outcomes;
}
--- 71,76 ----
! private final BettingEvent event;
! private final Totalizer tote;
! private final List outcomes;
}
|