commits@javamail.java.net

[javamail~mercurial:436] Added tag JAVAMAIL-1_4_5 for changeset e0ece38db9a0

From: <shannon_at_kenai.com>
Date: Fri, 23 Mar 2012 21:32:19 +0000

Project: javamail
Repository: mercurial
Revision: 436
Author: shannon
Date: 2012-03-23 21:31:07 UTC
Link:

Log Message:
------------
Handle FETCH response keywords in either case, per IMAP spec.
Clean up timeout handling.
Ignore "connection reset" errors that error during testing when the client
closes the connection.
Give the server more time to detect that the connection is closed.
Wrong message accessed when another client expunges and adds messages - bug 4753
Fix to work better with Gmail, which handles folder creation differently.
Update version to 1.4.5.
Update pointer to online version of the spec.
Add reference to RFC 5256 in javadocs.
Update link to SASL guide.
Added tag JAVAMAIL-1_4_5 for changeset e0ece38db9a0


Revisions:
----------
426
427
428
429
430
431
432
433
434
435
436


Modified Paths:
---------------
mail/src/main/java/com/sun/mail/imap/protocol/FetchResponse.java
mail/src/test/java/com/sun/mail/smtp/SMTPIOExceptionTest.java
mail/src/test/java/com/sun/mail/smtp/SMTPHandler.java
mail/src/test/java/com/sun/mail/smtp/SMTPCloseTest.java
doc/release/CHANGES.txt
mail/src/main/java/com/sun/mail/imap/MessageCache.java
mail/src/test/java/com/sun/mail/imap/MessageCacheTest.java
demo/src/main/java/populate.java
client/pom.xml
demo/pom.xml
dsn/pom.xml
imap/pom.xml
javadoc/pom.xml
logging/pom.xml
mail/pom.xml
mailapi/pom.xml
mailapijar/pom.xml
mbox/dist/pom.xml
mbox/native/pom.xml
mbox/pom.xml
oldmail/pom.xml
outlook/pom.xml
parent-distrib/pom.xml
pom.xml
pop3/pom.xml
servlet/pom.xml
smtp/pom.xml
taglib/pom.xml
webapp/pom.xml
mail/src/main/java/javax/mail/package.html
mail/src/main/java/overview.html
mail/src/main/java/com/sun/mail/imap/IMAPFolder.java
mail/src/main/java/com/sun/mail/imap/package.html
.hgtags


Diffs:
------
diff -r 92e17fda536e -r 56911c64ab5c mail/src/main/java/com/sun/mail/imap/protocol/FetchResponse.java
--- a/mail/src/main/java/com/sun/mail/imap/protocol/FetchResponse.java Tue Feb 07 14:41:16 2012 -0800
+++ b/mail/src/main/java/com/sun/mail/imap/protocol/FetchResponse.java Fri Feb 24 16:00:51 2012 -0800
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -125,25 +125,25 @@
                 "error in FETCH parsing, ran off end of buffer, size " + size);
 
             switch(buffer[index]) {
- case 'E':
+ case 'E': case 'e':
                 if (match(ENVELOPE.name)) {
                     index += ENVELOPE.name.length; // skip "ENVELOPE"
                     i = new ENVELOPE(this);
                 }
                 break;
- case 'F':
+ case 'F': case 'f':
                 if (match(FLAGS.name)) {
                     index += FLAGS.name.length; // skip "FLAGS"
                     i = new FLAGS((IMAPResponse)this);
                 }
                 break;
- case 'I':
+ case 'I': case 'i':
                 if (match(INTERNALDATE.name)) {
                     index += INTERNALDATE.name.length; // skip "INTERNALDATE"
                     i = new INTERNALDATE(this);
                 }
                 break;
- case 'B':
+ case 'B': case 'b':
                 if (match(BODY.name)) {
                     if (buffer[index+4] == '[') {
                         index += BODY.name.length; // skip "BODY"
@@ -159,7 +159,7 @@
                     }
                 }
                 break;
- case 'R':
+ case 'R': case 'r':
                 if (match(RFC822SIZE.name)) {
                     index += RFC822SIZE.name.length; // skip "RFC822.SIZE"
                     i = new RFC822SIZE(this);
@@ -175,7 +175,7 @@
                     }
                 }
                 break;
- case 'U':
+ case 'U': case 'u':
                 if (match(UID.name)) {
                     index += UID.name.length;
                     i = new UID(this);


diff -r 56911c64ab5c -r c87d60ea113e mail/src/test/java/com/sun/mail/smtp/SMTPIOExceptionTest.java
--- a/mail/src/test/java/com/sun/mail/smtp/SMTPIOExceptionTest.java Fri Feb 24 16:00:51 2012 -0800
+++ b/mail/src/test/java/com/sun/mail/smtp/SMTPIOExceptionTest.java Mon Mar 05 15:02:49 2012 -0800
@@ -68,6 +68,8 @@
 
     private boolean closed = false;
 
+ private static final int TIMEOUT = 200; // I/O timeout, in millis
+
     @Test
     public void test() throws Exception {
         SMTPServer server = null;
@@ -76,7 +78,7 @@
                 public void rcpt() throws IOException {
                     try {
                         // delay long enough to cause timeout
- Thread.sleep(400);
+ Thread.sleep(2 * TIMEOUT);
                     } catch (Exception ex) { }
                     super.rcpt();
                 }
@@ -88,7 +90,7 @@
             final Properties properties = new Properties();
             properties.setProperty("mail.smtp.host", "localhost");
             properties.setProperty("mail.smtp.port", "26423");
- properties.setProperty("mail.smtp.timeout", "200");
+ properties.setProperty("mail.smtp.timeout", "" + TIMEOUT);
             final Session session = Session.getInstance(properties);
             //session.setDebug(true);
 
@@ -127,6 +129,8 @@
             if (server != null) {
                 server.quit();
                 server.interrupt();
+ // wait long enough for handler to exit
+ Thread.sleep(2 * TIMEOUT);
             }
         }
     }


diff -r c87d60ea113e -r 54414f158d95 mail/src/test/java/com/sun/mail/smtp/SMTPHandler.java
--- a/mail/src/test/java/com/sun/mail/smtp/SMTPHandler.java Mon Mar 05 15:02:49 2012 -0800
+++ b/mail/src/test/java/com/sun/mail/smtp/SMTPHandler.java Mon Mar 05 15:07:57 2012 -0800
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009-2012 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -45,6 +45,7 @@
 import java.io.InputStreamReader;
 import java.io.PrintWriter;
 import java.net.Socket;
+import java.net.SocketException;
 import java.util.StringTokenizer;
 import java.util.logging.Logger;
 import java.util.logging.Level;
@@ -104,6 +105,8 @@
             }
 
             //clientSocket.close();
+ } catch (final SocketException sex) {
+ // ignore it, often get "connection reset" when client closes
         } catch (final Exception e) {
             LOGGER.log(Level.SEVERE, "Error", e);
         } finally {


diff -r 54414f158d95 -r 3cb967e1f034 mail/src/test/java/com/sun/mail/smtp/SMTPCloseTest.java
--- a/mail/src/test/java/com/sun/mail/smtp/SMTPCloseTest.java Mon Mar 05 15:07:57 2012 -0800
+++ b/mail/src/test/java/com/sun/mail/smtp/SMTPCloseTest.java Mon Mar 05 15:08:31 2012 -0800
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009-2012 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -85,7 +85,8 @@
                 t.close();
             }
             // give the server thread a chance to detect the close
- Thread.sleep(100);
+ for (int i = 0; i < 10 && !server.eof(); i++)
+ Thread.sleep(100);
             assertTrue("socket closed", server.eof());
         } catch (final Exception e) {
             e.printStackTrace();


diff -r 3cb967e1f034 -r cf0c7cb24c6f doc/release/CHANGES.txt
--- a/doc/release/CHANGES.txt Mon Mar 05 15:08:31 2012 -0800
+++ b/doc/release/CHANGES.txt Mon Mar 12 21:37:51 2012 -0700
@@ -25,6 +25,7 @@
 K 4296 SSL Re-Negotiation Problem with checkserveridentity=true
 K 4511 Thread safety in javax.mail.PasswordAuthentication
 K 4583 Add SOCKS5 support
+K 4753 wrong message accessed when another client expunges and adds messages
 <no id> properly handle timeouts during SSL negotiation
 <no id> free MIME headers in IMAPMessage.invalidateHeaders
 <no id> fix exception in POP3Message when reading file cached content twice

diff -r 3cb967e1f034 -r cf0c7cb24c6f mail/src/main/java/com/sun/mail/imap/MessageCache.java
--- a/mail/src/main/java/com/sun/mail/imap/MessageCache.java Mon Mar 05 15:08:31 2012 -0800
+++ b/mail/src/main/java/com/sun/mail/imap/MessageCache.java Mon Mar 12 21:37:51 2012 -0700
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -107,6 +107,15 @@
     }
 
     /**
+ * Constructor for debugging and testing.
+ */
+ MessageCache(int size, boolean debug) {
+ this(null, null, size);
+ this.debug = debug;
+ this.out = System.out;
+ }
+
+ /**
      * Size of cache.
      */
     public int size() {
@@ -381,7 +390,7 @@
             if (seqnums != null) {
                 int[] news = new int[newsize + SLOP];
                 System.arraycopy(seqnums, 0, news, 0, seqnums.length);
- for (int i = seqnums.length; i < news.length; i++)
+ for (int i = size; i < news.length; i++)
                     news[i] = newSeqNum++;
                 seqnums = news;
                 if (debug)

diff -r 3cb967e1f034 -r cf0c7cb24c6f mail/src/test/java/com/sun/mail/imap/MessageCacheTest.java
--- a/mail/src/test/java/com/sun/mail/imap/MessageCacheTest.java Mon Mar 05 15:08:31 2012 -0800
+++ b/mail/src/test/java/com/sun/mail/imap/MessageCacheTest.java Mon Mar 12 21:37:51 2012 -0700
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009-2012 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -69,4 +69,26 @@
             assertEquals(mc.seqnumOf(n + 1), n);
         }
     }
+
+ /**
+ * Test that when a message is expunged and new messages are added,
+ * the new messages have the expected sequence number. Similar to
+ * the above, but the seqnums array is created first, then expanded.
+ */
+ @Test
+ public void testExpungeAddExpand() throws Exception {
+ // test a range of values to find boundary condition errors
+ for (int n = 2; n <= 100; n++) {
+ //System.out.println("MessageCache.testExpungeAdd: test " + n);
+ // start with two messages
+ MessageCache mc = new MessageCache(null, null, 2);
+ // now expunge a message to cause the seqnums array to be created
+ mc.expungeMessage(1);
+ // add the remaining messages (eat into SLOP)
+ mc.addMessages(n - 1, 2);
+ //System.out.println(" new seqnum " + mc.seqnumOf(n + 1));
+ // does the new message have the expected sequence number?
+ assertEquals(mc.seqnumOf(n + 1), n);
+ }
+ }
 }


diff -r cf0c7cb24c6f -r 4e5dd4268160 demo/src/main/java/populate.java
--- a/demo/src/main/java/populate.java Mon Mar 12 21:37:51 2012 -0700
+++ b/demo/src/main/java/populate.java Fri Mar 16 17:46:02 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -154,20 +154,16 @@
         if (!dst.exists()) {
             // Create it.
             boolean dstHoldsOnlyFolders = false;
- try {
- if (!dst.create(src.getType())) {
- System.out.println("couldn't create " + dst.getFullName());
- return;
- }
- } catch (MessagingException mex) {
+ if (!dst.create(src.getType())) {
                 // might not be able to create a folder that holds both
- if (src.getType() !=
- (Folder.HOLDS_MESSAGES|Folder.HOLDS_FOLDERS))
- throw mex;
                 if (!dst.create(srcHasChildren ? Folder.HOLDS_FOLDERS :
                                                 Folder.HOLDS_MESSAGES)) {
- System.out.println("couldn't create " + dst.getFullName());
- return;
+ // might only be able to create one type (Gmail)
+ if (!dst.create(Folder.HOLDS_MESSAGES)) {
+ System.out.println("couldn't create " +
+ dst.getFullName());
+ return;
+ }
                 }
                 dstHoldsOnlyFolders = srcHasChildren;
             }


diff -r 4e5dd4268160 -r 0808ae6c1366 client/pom.xml
--- a/client/pom.xml Fri Mar 16 17:46:02 2012 -0700
+++ b/client/pom.xml Tue Mar 20 14:47:19 2012 -0700
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 4e5dd4268160 -r 0808ae6c1366 demo/pom.xml
--- a/demo/pom.xml Fri Mar 16 17:46:02 2012 -0700
+++ b/demo/pom.xml Tue Mar 20 14:47:19 2012 -0700
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 4e5dd4268160 -r 0808ae6c1366 dsn/pom.xml
--- a/dsn/pom.xml Fri Mar 16 17:46:02 2012 -0700
+++ b/dsn/pom.xml Tue Mar 20 14:47:19 2012 -0700
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 4e5dd4268160 -r 0808ae6c1366 imap/pom.xml
--- a/imap/pom.xml Fri Mar 16 17:46:02 2012 -0700
+++ b/imap/pom.xml Tue Mar 20 14:47:19 2012 -0700
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>parent-distrib</artifactId>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
         <relativePath>../parent-distrib/pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

diff -r 4e5dd4268160 -r 0808ae6c1366 javadoc/pom.xml
--- a/javadoc/pom.xml Fri Mar 16 17:46:02 2012 -0700
+++ b/javadoc/pom.xml Tue Mar 20 14:47:19 2012 -0700
@@ -48,13 +48,13 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>
     <artifactId>javadoc</artifactId>
     <packaging>pom</packaging>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
     <name>JavaMail API javadocs</name>
     <description>${project.name}</description>
 

diff -r 4e5dd4268160 -r 0808ae6c1366 logging/pom.xml
--- a/logging/pom.xml Fri Mar 16 17:46:02 2012 -0700
+++ b/logging/pom.xml Tue Mar 20 14:47:19 2012 -0700
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 4e5dd4268160 -r 0808ae6c1366 mail/pom.xml
--- a/mail/pom.xml Fri Mar 16 17:46:02 2012 -0700
+++ b/mail/pom.xml Tue Mar 20 14:47:19 2012 -0700
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 4e5dd4268160 -r 0808ae6c1366 mailapi/pom.xml
--- a/mailapi/pom.xml Fri Mar 16 17:46:02 2012 -0700
+++ b/mailapi/pom.xml Tue Mar 20 14:47:19 2012 -0700
@@ -56,7 +56,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 4e5dd4268160 -r 0808ae6c1366 mailapijar/pom.xml
--- a/mailapijar/pom.xml Fri Mar 16 17:46:02 2012 -0700
+++ b/mailapijar/pom.xml Tue Mar 20 14:47:19 2012 -0700
@@ -55,7 +55,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>javax.mail</groupId>

diff -r 4e5dd4268160 -r 0808ae6c1366 mbox/dist/pom.xml
--- a/mbox/dist/pom.xml Fri Mar 16 17:46:02 2012 -0700
+++ b/mbox/dist/pom.xml Tue Mar 20 14:47:19 2012 -0700
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

diff -r 4e5dd4268160 -r 0808ae6c1366 mbox/native/pom.xml
--- a/mbox/native/pom.xml Fri Mar 16 17:46:02 2012 -0700
+++ b/mbox/native/pom.xml Tue Mar 20 14:47:19 2012 -0700
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

diff -r 4e5dd4268160 -r 0808ae6c1366 mbox/pom.xml
--- a/mbox/pom.xml Fri Mar 16 17:46:02 2012 -0700
+++ b/mbox/pom.xml Tue Mar 20 14:47:19 2012 -0700
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 4e5dd4268160 -r 0808ae6c1366 oldmail/pom.xml
--- a/oldmail/pom.xml Fri Mar 16 17:46:02 2012 -0700
+++ b/oldmail/pom.xml Tue Mar 20 14:47:19 2012 -0700
@@ -53,7 +53,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>javax.mail</groupId>

diff -r 4e5dd4268160 -r 0808ae6c1366 outlook/pom.xml
--- a/outlook/pom.xml Fri Mar 16 17:46:02 2012 -0700
+++ b/outlook/pom.xml Tue Mar 20 14:47:19 2012 -0700
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 4e5dd4268160 -r 0808ae6c1366 parent-distrib/pom.xml
--- a/parent-distrib/pom.xml Fri Mar 16 17:46:02 2012 -0700
+++ b/parent-distrib/pom.xml Tue Mar 20 14:47:19 2012 -0700
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 4e5dd4268160 -r 0808ae6c1366 pom.xml
--- a/pom.xml Fri Mar 16 17:46:02 2012 -0700
+++ b/pom.xml Tue Mar 20 14:47:19 2012 -0700
@@ -54,7 +54,7 @@
     <groupId>com.sun.mail</groupId>
     <artifactId>all</artifactId>
     <packaging>pom</packaging>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
     <name>JavaMail API distribution</name>
     <description>${project.name}</description>
     <url>http://kenai.com/projects/javamail</url>
@@ -91,9 +91,9 @@
     </organization>
 
     <properties>
- <mail.version>1.4.5-rc1</mail.version>
+ <mail.version>1.4.5</mail.version>
         <!-- like mail.version, but with underscores instead of dots -->
- <mail.zipversion>1_4_5-rc1</mail.zipversion>
+ <mail.zipversion>1_4_5</mail.zipversion>
         <mail.spec.version>1.4</mail.spec.version>
         <activation-api.version>1.1</activation-api.version>
         <!-- defaults that are overridden in mail module -->

diff -r 4e5dd4268160 -r 0808ae6c1366 pop3/pom.xml
--- a/pop3/pom.xml Fri Mar 16 17:46:02 2012 -0700
+++ b/pop3/pom.xml Tue Mar 20 14:47:19 2012 -0700
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>parent-distrib</artifactId>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
         <relativePath>../parent-distrib/pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

diff -r 4e5dd4268160 -r 0808ae6c1366 servlet/pom.xml
--- a/servlet/pom.xml Fri Mar 16 17:46:02 2012 -0700
+++ b/servlet/pom.xml Tue Mar 20 14:47:19 2012 -0700
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 4e5dd4268160 -r 0808ae6c1366 smtp/pom.xml
--- a/smtp/pom.xml Fri Mar 16 17:46:02 2012 -0700
+++ b/smtp/pom.xml Tue Mar 20 14:47:19 2012 -0700
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>parent-distrib</artifactId>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
         <relativePath>../parent-distrib/pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

diff -r 4e5dd4268160 -r 0808ae6c1366 taglib/pom.xml
--- a/taglib/pom.xml Fri Mar 16 17:46:02 2012 -0700
+++ b/taglib/pom.xml Tue Mar 20 14:47:19 2012 -0700
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 4e5dd4268160 -r 0808ae6c1366 webapp/pom.xml
--- a/webapp/pom.xml Fri Mar 16 17:46:02 2012 -0700
+++ b/webapp/pom.xml Tue Mar 20 14:47:19 2012 -0700
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.4.5-rc1</version>
+ <version>1.4.5</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>


diff -r 0808ae6c1366 -r d5406b55aaf5 mail/src/main/java/javax/mail/package.html
--- a/mail/src/main/java/javax/mail/package.html Tue Mar 20 14:47:19 2012 -0700
+++ b/mail/src/main/java/javax/mail/package.html Tue Mar 20 15:01:13 2012 -0700
@@ -5,7 +5,7 @@
 
     DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
- Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.
 
     The contents of this file are subject to the terms of either the GNU
     General Public License Version 2 only ("GPL") or the Common Development
@@ -57,7 +57,7 @@
 For an overview of the JavaMail API, read the JavaMail specification
 <A HREF="../../../JavaMail-1.4.pdf" TARGET="_top">
 included in the download bundle</A> or
-<A HREF="http://java.sun.com/products/javamail/JavaMail-1.4.pdf" TARGET="_top">
+<A HREF="http://www.oracle.com/technetwork/java/javamail-1-149769.pdf" TARGET="_top">
 available on the JavaMail web site</A>.
 <P>
 The code to send a plain text message can be as simple as the following:

diff -r 0808ae6c1366 -r d5406b55aaf5 mail/src/main/java/overview.html
--- a/mail/src/main/java/overview.html Tue Mar 20 14:47:19 2012 -0700
+++ b/mail/src/main/java/overview.html Tue Mar 20 15:01:13 2012 -0700
@@ -5,7 +5,7 @@
 
     DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
- Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.
 
     The contents of this file are subject to the terms of either the GNU
     General Public License Version 2 only ("GPL") or the Common Development
@@ -57,7 +57,7 @@
 For an overview of the JavaMail API, read the JavaMail specification
 <A HREF="../JavaMail-1.4.pdf" TARGET="_top">
 included in the download bundle</A> or
-<A HREF="http://java.sun.com/products/javamail/JavaMail-1.4.pdf" TARGET="_top">
+<A HREF="http://www.oracle.com/technetwork/java/javamail-1-149769.pdf" TARGET="_top">
 available on the JavaMail web site</A>.
 <P>
 The code to send a plain text message can be as simple as the following:
@@ -233,6 +233,16 @@
 </TR>
 
 <TR>
+<TD>mail.debug.auth</TD>
+<TD>boolean</TD>
+<TD>
+Include protocol authentication commands (including usernames and passwords)
+in the debug output.
+Default is false.
+</TD>
+</TR>
+
+<TR>
 <TD>mail.transport.protocol.<i>address-type</i></TD>
 <TD>String</TD>
 <TD>


diff -r d5406b55aaf5 -r 50895f8feb14 mail/src/main/java/com/sun/mail/imap/IMAPFolder.java
--- a/mail/src/main/java/com/sun/mail/imap/IMAPFolder.java Tue Mar 20 15:01:13 2012 -0700
+++ b/mail/src/main/java/com/sun/mail/imap/IMAPFolder.java Tue Mar 20 15:15:40 2012 -0700
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -75,6 +75,11 @@
  * Refer to <A HREF="http://www.ietf.org/rfc/rfc2086.txt">RFC 2086</A>
  * for more information. <p>
  *
+ * The {_at_link #getSortedMessages getSortedMessages}
+ * methods support the IMAP SORT extension.
+ * Refer to <A HREF="http://www.ietf.org/rfc/rfc5256.txt">RFC 5256</A>
+ * for more information. <p>
+ *
  * The {_at_link #doCommand doCommand} method and
  * {_at_link IMAPFolder.ProtocolCommand IMAPFolder.ProtocolCommand}
  * interface support use of arbitrary IMAP protocol commands. <p>
@@ -1721,7 +1726,10 @@
     /**
      * Sort the messages in the folder according to the sort criteria.
      * The messages are returned in the sorted order, but the order of
- * the messages in the folder is not changed.
+ * the messages in the folder is not changed. <p>
+ *
+ * Depends on the SORT extension -
+ * <A HREF="http://www.ietf.org/rfc/rfc5256.txt">RFC 5256</A>.
      *
      * @since JavaMail 1.4.4
      */
@@ -1734,7 +1742,10 @@
      * Sort the messages in the folder according to the sort criteria.
      * The messages are returned in the sorted order, but the order of
      * the messages in the folder is not changed. Only messages matching
- * the search criteria are considered.
+ * the search criteria are considered. <p>
+ *
+ * Depends on the SORT extension -
+ * <A HREF="http://www.ietf.org/rfc/rfc5256.txt">RFC 5256</A>.
      *
      * @since JavaMail 1.4.4
      */


diff -r 50895f8feb14 -r e0ece38db9a0 mail/src/main/java/com/sun/mail/imap/package.html
--- a/mail/src/main/java/com/sun/mail/imap/package.html Tue Mar 20 15:15:40 2012 -0700
+++ b/mail/src/main/java/com/sun/mail/imap/package.html Tue Mar 20 15:17:41 2012 -0700
@@ -61,7 +61,7 @@
 the SASL implementation, users can also provide additional
 SASL mechanisms of their own design to support custom authentication
 schemes. See the
-<A HREF="http://java.sun.com/j2se/1.5.0/docs/guide/security/sasl/sasl-refguide.html" TARGET="_top">
+<A HREF="http://docs.oracle.com/javase/1.5.0/docs/guide/security/sasl/sasl-refguide.html" TARGET="_top">
 Java SASL API Programming and Deployment Guide</A> for details.
 Note that the current implementation doesn't support SASL mechanisms
 that provide their own integrity or confidentiality layer.


diff -r e0ece38db9a0 -r 42b6d8c53009 .hgtags
--- a/.hgtags Tue Mar 20 15:17:41 2012 -0700
+++ b/.hgtags Fri Mar 23 14:31:07 2012 -0700
@@ -8,3 +8,4 @@
 0a99728ee1d1d3d2b27ab76e0db05d9652ee1063 JAVAMAIL-1_4_4-RC1
 9cff25c6d73c8f86ff27f4cb39f7c3c092c34dd7 JAVAMAIL-1_4_4
 ce00d5900757397cbc7943b686035e8b27aa9449 JAVAMAIL-1_4_5-RC1
+e0ece38db9a0a6b46fe03575bffba6605603761d JAVAMAIL-1_4_5