我有一个使用JavaMail API用Java编写的电子邮件客户端。最近发布了一个Java更新1.6.0_29-b11,这导致我的客户端无法从Windows 7和Mac OS X Lion上的服务器检索消息。但是,在Windows XP和Mac OS X上,正常检索Snow Leopard消息。关于更新的发行说明没有提到任何我可以直接与问题相关的内容。
我能够从(POP3)邮件服务器中检索所有Message
个对象,以及它们的标题和UID;当我尝试获取消息内容时,检索失败。根据{{1}}实现,我得到两个不同的堆栈跟踪,看起来是同一个问题,我在下面包含了这个问题。
我的问题是什么可能导致这些流在旧版操作系统上正常运行但在当前版本上失败?
Message
Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: Stream closed
at javax.mail.util.SharedFileInputStream.newStream(SharedFileInputStream.java:507)
at com.sun.mail.pop3.POP3Message.getContentStream(POP3Message.java:242)
at javax.mail.internet.MimePartDataSource.getInputStream(MimePartDataSource.java:98)
at com.sun.mail.handlers.text_plain.getContent(text_plain.java:107)
at javax.activation.DataSourceDataContentHandler.getContent(DataHandler.java:775)
at javax.activation.DataHandler.getContent(DataHandler.java:522)
at javax.mail.internet.MimeMessage.getContent(MimeMessage.java:1419)
at cfr.cReceivedEmail.extractPartContent(cReceivedEmail.java:223)
at cfr.cReceivedEmail.cacheAll(cReceivedEmail.java:106)
at cfr.cReceivedEmail.<init>(cReceivedEmail.java:74)
at cfr.cEmailReceiver.receiveEmails(cEmailReceiver.java:378)
at cfr.cEmailInDialog.doLoad(cEmailInDialog.java:498)
at cfr.cEmailInDialog.during(cEmailInDialog.java:751)
at nitidus.awe.cWindowManager.doDuring(cWindowManager.java:187)
at nitidus.awe.cTemplateManager.doDuring(cTemplateManager.java:1144)
at nitidus.awe.cTemplateManager.actionPerformed(cTemplateManager.java:184)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
... more