You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ba...@apache.org on 2006/10/20 15:42:41 UTC
svn commit: r466109 -
/james/server/trunk/src/java/org/apache/james/James.java
Author: bago
Date: Fri Oct 20 06:42:39 2006
New Revision: 466109
URL: http://svn.apache.org/viewvc?view=rev&rev=466109
Log:
Updated ReferenceMap that in new commons-collection has been moved into a map package.
Removed a check for null values because ReferenceMap could return null values for non-null keys (by default values are SOFT and keys are HARD).
Modified:
james/server/trunk/src/java/org/apache/james/James.java
Modified: james/server/trunk/src/java/org/apache/james/James.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/James.java?view=diff&rev=466109&r1=466108&r2=466109
==============================================================================
--- james/server/trunk/src/java/org/apache/james/James.java (original)
+++ james/server/trunk/src/java/org/apache/james/James.java Fri Oct 20 06:42:39 2006
@@ -34,7 +34,7 @@
import org.apache.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.avalon.framework.service.Serviceable;
-import org.apache.commons.collections.ReferenceMap;
+import org.apache.commons.collections.map.ReferenceMap;
import org.apache.james.core.MailHeaders;
import org.apache.james.core.MailImpl;
@@ -475,10 +475,15 @@
if (userInbox != null) {
return userInbox;
- } else if (mailboxes.containsKey(userName)) {
- // we have a problem
- getLogger().error("Null mailbox for non-null key");
- throw new RuntimeException("Error in getUserInbox.");
+ /*
+ * we're using a ReferenceMap with HARD keys and SOFT values
+ * so it could happen to find a null value after a second pass
+ * of a full GC and we should simply lookup it again
+ */
+// } else if (mailboxes.containsKey(userName)) {
+// // we have a problem
+// getLogger().error("Null mailbox for non-null key");
+// throw new RuntimeException("Error in getUserInbox.");
} else {
// need mailbox object
if (getLogger().isDebugEnabled()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org