Corrections to Chapter 19 of Java Network Programming, The JavaMail API

p. 636: In the third paragraph, delete "like the one shown in Figure 19-1".

p. 648: In the last paragraph, "a simple HELLO command" should be "a simple HELO command".

p. 654: In the note, "java.netPasswordAuthentication" should be "java.net.PasswordAuthentication" and "javax.mailPasswordAuthentication" should be "javax.mail.PasswordAuthentication"

p. 693: In Example 19-12, AllPartsClient, I have a couple of small improvements. Change the two lines:

      if (fileName == null && (disposition.equals(Part.ATTACHMENT) 
       || !contentType.equals("text/plain"))) {

to

      if (fileName == null && (Part.ATTACHMENT.equalsIgnoreCase(disposition) 
       || !contentType.equalsIgnoreCase("text/plain"))) {

This avoids a possible NullPointerException and handles case insensitive MIME type matching.


[ Java Network Programming Corrections | Java Network Programming Home Page | Table of Contents | Examples | Order from Amazon ] ]

Copyright 2001-2004 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified June 2, 2004