|
From: <pe...@us...> - 2003-11-21 04:43:45
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/time
In directory sc8-pr-cvs1:/tmp/cvs-serv10533/src/java/org/neuclear/commons/time
Modified Files:
TimeTools.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: TimeTools.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/time/TimeTools.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TimeTools.java 11 Nov 2003 21:17:49 -0000 1.2
--- TimeTools.java 21 Nov 2003 04:43:42 -0000 1.3
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.3 2003/11/21 04:43:42 pelle
+ * 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).
+ *
* Revision 1.2 2003/11/11 21:17:49 pelle
* Further vital reshuffling.
***************
*** 60,69 ****
*/
! public class TimeTools {
! public static Date addDaysToDate(Date d, int iDays) {
//create Calendar
! Calendar cal = Calendar.getInstance();
cal.setTime(d);
--- 66,75 ----
*/
! public final class TimeTools {
! public static Date addDaysToDate(final Date d, final int iDays) {
//create Calendar
! final Calendar cal = Calendar.getInstance();
cal.setTime(d);
***************
*** 75,81 ****
}
! public static Date addMonthsToDate(Date d, int iMonths) {
//create Calendar
! Calendar cal = Calendar.getInstance();
cal.setTime(d);
--- 81,87 ----
}
! public static Date addMonthsToDate(final Date d, final int iMonths) {
//create Calendar
! final Calendar cal = Calendar.getInstance();
cal.setTime(d);
***************
*** 91,95 ****
}
! public static Timestamp convertDateToTimestamp(Date date) {
if (date instanceof Timestamp)
return (Timestamp) date;
--- 97,101 ----
}
! public static Timestamp convertDateToTimestamp(final Date date) {
if (date instanceof Timestamp)
return (Timestamp) date;
***************
*** 97,101 ****
}
! public static Timestamp parseTimeStamp(String ts) throws NeuClearException {
try {
return convertDateToTimestamp(getDateFormatter().parse(ts));
--- 103,107 ----
}
! public static Timestamp parseTimeStamp(final String ts) throws NeuClearException {
try {
return convertDateToTimestamp(getDateFormatter().parse(ts));
***************
*** 106,110 ****
}
! public static String formatTimeStamp(Date time) {
return getDateFormatter().format(time);
}
--- 112,116 ----
}
! public static String formatTimeStamp(final Date time) {
return getDateFormatter().format(time);
}
|