[Aimmath-commit] AIM/WEB-INF/java Maple.java,1.5,1.5.4.1
Brought to you by:
gustav_delius,
npstrick
From: Neil S. <nps...@us...> - 2004-10-07 10:54:41
|
Update of /cvsroot/aimmath/AIM/WEB-INF/java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13229/WEB-INF/java Modified Files: Tag: aim-xml Maple.java Log Message: Checking should not reset last use time Index: Maple.java =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/java/Maple.java,v retrieving revision 1.5 retrieving revision 1.5.4.1 diff -C2 -d -r1.5 -r1.5.4.1 *** Maple.java 5 Sep 2003 09:13:48 -0000 1.5 --- Maple.java 7 Oct 2004 10:54:28 -0000 1.5.4.1 *************** *** 190,196 **** --- 190,201 ---- StringWriter s = new StringWriter(); PrintWriter p = new PrintWriter(s); + Date l; try { + // The exec method sets lastUseTime. We do not want to consider checking + // as 'use', so we save and restore the value of lastUseTime. + l = lastUseTime; exec("2+2",p,"html",""); + lastUseTime = l; return( s.toString().trim().equals("4") ); } catch (Exception e) { *************** *** 199,213 **** } ! public synchronized String checkout() { ! StringWriter s = new StringWriter(); ! PrintWriter p = new PrintWriter(s); ! try { ! exec("2+2",p,"html",""); ! return( s.toString().trim() ); ! } catch (Exception e) { ! return("Aargh!"); ! } ! } public static String quote(String s) { --- 204,219 ---- } ! // I don't know why the checkout() method is here - it is never invoked ! // public synchronized String checkout() { ! // StringWriter s = new StringWriter(); ! // PrintWriter p = new PrintWriter(s); ! // try { ! // exec("2+2",p,"html",""); ! // return( s.toString().trim() ); ! // } catch (Exception e) { ! // return("Aargh!"); ! // } ! // } public static String quote(String s) { |