Opened 8 years ago

Closed 6 years ago

#414 closed defect (fixed)

Susimail NPE

Reported by: zzz Owned by: str4d
Priority: minor Milestone: 0.9.9
Component: apps/susimail Version: 0.8.3
Keywords: NPE Cc:
Parent Tickets:

Description

reported by liberty

 SEVERE: /susimail/susimail: 
2011/02/12 14:14:50 | java.lang.NullPointerException
2011/02/12 14:14:50 | 	at java.util.Hashtable.get(Hashtable.java:351)
2011/02/12 14:14:50 | 	at i2p.susi.webmail.MailCache.getMail(MailCache.java:64)
2011/02/12 14:14:50 | 	at i2p.susi.webmail.WebMail.processRequest(WebMail.java:1240)
2011/02/12 14:14:50 | 	at i2p.susi.webmail.WebMail.doPost(WebMail.java:1508)
2011/02/12 14:14:50 | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:616)
2011/02/12 14:14:50 | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
2011/02/12 14:14:50 | 	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
2011/02/12 14:14:50 | 	at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)
2011/02/12 14:14:50 | 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
2011/02/12 14:14:50 | 	at org.mortbay.http.HttpContext.handle(HttpContext.java:1535)
2011/02/12 14:14:50 | 	at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
2011/02/12 14:14:50 | 	at org.mortbay.http.HttpContext.handle(HttpContext.java:1487)
2011/02/12 14:14:50 | 	at org.mortbay.http.HttpServer.service(HttpServer.java:909)
2011/02/12 14:14:50 | 	at org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
2011/02/12 14:14:50 | 	at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
2011/02/12 14:14:50 | 	at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
2011/02/12 14:14:50 | 	at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
2011/02/12 14:14:50 | 	at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
2011/02/12 14:14:50 | 	at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)


Subtickets

Change History (8)

comment:1 Changed 8 years ago by zzz

  • Milestone changed from 0.8.12 to 0.9

comment:2 Changed 7 years ago by zzz

  • Milestone 0.9 deleted
  • Priority changed from major to minor

no other reports, changing to minor

comment:3 Changed 6 years ago by str4d

  • Keywords NPE added

comment:8 Changed 6 years ago by zzz

Possible dup #702

comment:9 Changed 6 years ago by str4d

The NPE occurs here (I can assume that the OP is using OpenJDK because it fits). This implies that MailCache.getMail() is being called with a null uidl.

comment:10 Changed 6 years ago by str4d

Closed #702 as a duplicate of this. The cause of the NPE is that Hashtable does not support null keys. One possible fix would be to use a HashMap instead, but that ignores the fact that uidl should not be null, it should correspond to a mail.

comment:11 Changed 6 years ago by str4d

  • Milestone set to 0.9.9
  • Owner set to str4d
  • Status changed from new to accepted

I can recreate the NPE in 0.9.8.1 when deleting the last mail in the folder (I will assume that matches the OP's problem). Testing a fix.

comment:12 Changed 6 years ago by str4d

  • Resolution set to fixed
  • Status changed from accepted to closed

Fixed in 1c6c476587609cdf0994d5bc126c1e8ec59fe70a

Note: See TracTickets for help on using tickets.