noel 2004/02/05 20:54:36
Modified: src/java/org/apache/james/mailrepository Tag: branch_2_1_fcs
MBoxMailRepository.java
Log:
Have list() verify the first message before returning, just in case file changed.
Revision Changes Path
No revision
No revision
1.1.2.5 +5 -1
james-server/src/java/org/apache/james/mailrepository/Attic/MBoxMailRepository.java
Index: MBoxMailRepository.java
===================================================================
RCS file:
/home/cvs/james-server/src/java/org/apache/james/mailrepository/Attic/MBoxMailRepository.java,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -r1.1.2.4 -r1.1.2.5
--- MBoxMailRepository.java 6 Feb 2004 01:33:48 -0000 1.1.2.4
+++ MBoxMailRepository.java 6 Feb 2004 04:54:35 -0000 1.1.2.5
@@ -546,6 +546,10 @@
*/
public Iterator list() {
loadKeys();
+ // find the first message. This is a trick to make sure that if
+ // the file is changed out from under us, we will detect it and
+ // correct for it BEFORE we return the iterator.
+ findMessage((String) mList.keySet().iterator().next());
if ((DEEP_DEBUG) && (getLogger().isDebugEnabled())) {
StringBuffer logBuffer =
new StringBuffer(128)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]