commits@javamail.java.net

[javamail~mercurial:607] Added tag JAVAMAIL-1_5_1 for changeset f6c4d3181f06

From: <shannon_at_java.net>
Date: Wed, 13 Nov 2013 22:44:33 +0000

Project: javamail
Repository: mercurial
Revision: 607
Author: shannon
Date: 2013-11-12 22:46:51 UTC
Link:

Log Message:
------------
fix typo - bug 6141
Ignore out of range message numbers in SEARCH results - bug 6160.
require extra permission to create default Session with SecurityManager -
bug 6161
quote the string "NIL" to avoid confusion with NIL.
Final release of JavaMail 1.5.1.
Added tag JAVAMAIL-1_5_1 for changeset f6c4d3181f06


Revisions:
----------
602
603
604
605
606
607


Modified Paths:
---------------
doc/release/CHANGES.txt
mail/src/main/java/com/sun/mail/smtp/SMTPTransport.java
mail/src/main/java/com/sun/mail/imap/IMAPFolder.java
mail/src/main/java/javax/mail/Session.java
mail/src/main/java/com/sun/mail/iap/Argument.java
client/pom.xml
demo/pom.xml
dsn/pom.xml
gimap/pom.xml
imap/pom.xml
javadoc/pom.xml
logging/pom.xml
mail/pom.xml
mailapi/pom.xml
mailapijar/pom.xml
mbox/native/pom.xml
mbox/pom.xml
oldmail/pom.xml
outlook/pom.xml
parent-distrib/pom.xml
pom.xml
pop3/pom.xml
publish/pom.xml
servlet/pom.xml
smtp/pom.xml
taglib/pom.xml
webapp/pom.xml
.hgtags


Diffs:
------
diff -r 3b2083eeddb4 -r f9e342b00e7d doc/release/CHANGES.txt
--- a/doc/release/CHANGES.txt Fri Oct 11 15:45:09 2013 -0700
+++ b/doc/release/CHANGES.txt Tue Oct 15 07:50:23 2013 -0700
@@ -32,6 +32,7 @@
         authzid is specified
 K 6125 support empty IMAP ENVELOPE address list instead of NIL
 K 6137 JavaMail should support the IMAP ID extension
+K 6141 Typo: "mechansims"
 
 
                   CHANGES IN THE 1.5.0 RELEASE

diff -r 3b2083eeddb4 -r f9e342b00e7d mail/src/main/java/com/sun/mail/smtp/SMTPTransport.java
--- a/mail/src/main/java/com/sun/mail/smtp/SMTPTransport.java Fri Oct 11 15:45:09 2013 -0700
+++ b/mail/src/main/java/com/sun/mail/smtp/SMTPTransport.java Tue Oct 15 07:50:23 2013 -0700
@@ -767,7 +767,7 @@
 
         // if no authentication mechanism found, fail
         throw new AuthenticationFailedException(
- "No authentication mechansims supported by both server and client");
+ "No authentication mechanisms supported by both server and client");
     }
 
     /**


diff -r f9e342b00e7d -r 5007803e3198 doc/release/CHANGES.txt
--- a/doc/release/CHANGES.txt Tue Oct 15 07:50:23 2013 -0700
+++ b/doc/release/CHANGES.txt Tue Oct 29 15:46:17 2013 -0700
@@ -33,6 +33,7 @@
 K 6125 support empty IMAP ENVELOPE address list instead of NIL
 K 6137 JavaMail should support the IMAP ID extension
 K 6141 Typo: "mechansims"
+K 6160 Exchange returns out of range message numbers for SEARCH
 
 
                   CHANGES IN THE 1.5.0 RELEASE

diff -r f9e342b00e7d -r 5007803e3198 mail/src/main/java/com/sun/mail/imap/IMAPFolder.java
--- a/mail/src/main/java/com/sun/mail/imap/IMAPFolder.java Tue Oct 15 07:50:23 2013 -0700
+++ b/mail/src/main/java/com/sun/mail/imap/IMAPFolder.java Tue Oct 29 15:46:17 2013 -0700
@@ -2053,9 +2053,20 @@
                 int[] matches = getProtocol().search(term);
                 if (matches != null) {
                     matchMsgs = new IMAPMessage[matches.length];
+ int size = messageCache.size();
                     // Map seq-numbers into actual Messages.
- for (int i = 0; i < matches.length; i++)
- matchMsgs[i] = getMessageBySeqNumber(matches[i]);
+ for (int i = 0; i < matches.length; i++) {
+ // Microsoft Exchange will sometimes return message
+ // numbers that it has not yet notified the client
+ // about via EXISTS; ignore those messages here.
+ if (matches[i] > size) {
+ if (logger.isLoggable(Level.FINE))
+ logger.fine("ignoring message number " +
+ matches[i] + " in search results, " +
+ "outside range " + size);
+ } else
+ matchMsgs[i] = getMessageBySeqNumber(matches[i]);
+ }
                 }
             }
             return matchMsgs;


diff -r 5007803e3198 -r b01c7158703e doc/release/CHANGES.txt
--- a/doc/release/CHANGES.txt Tue Oct 29 15:46:17 2013 -0700
+++ b/doc/release/CHANGES.txt Mon Nov 04 11:10:39 2013 -0800
@@ -34,6 +34,7 @@
 K 6137 JavaMail should support the IMAP ID extension
 K 6141 Typo: "mechansims"
 K 6160 Exchange returns out of range message numbers for SEARCH
+K 6161 require extra permission to create default Session with SecurityManager
 
 
                   CHANGES IN THE 1.5.0 RELEASE

diff -r 5007803e3198 -r b01c7158703e mail/src/main/java/javax/mail/Session.java
--- a/mail/src/main/java/javax/mail/Session.java Tue Oct 29 15:46:17 2013 -0700
+++ b/mail/src/main/java/javax/mail/Session.java Mon Nov 04 11:10:39 2013 -0800
@@ -287,7 +287,11 @@
      * time the method is called. <p>
      *
      * Additional security Permission objects may be used to
- * control access to the default session.
+ * control access to the default session. <p>
+ *
+ * In the current implementation, if a SecurityManager is set, the
+ * caller must have the <code>RuntimePermission("setFactory")</code>
+ * permission.
      *
      * @param props Properties object. Used only if a new Session
      * object is created.<br>
@@ -305,9 +309,12 @@
      */
     public static synchronized Session getDefaultInstance(Properties props,
                                         Authenticator authenticator) {
- if (defaultSession == null)
+ if (defaultSession == null) {
+ SecurityManager security = System.getSecurityManager();
+ if (security != null)
+ security.checkSetFactory();
             defaultSession = new Session(props, authenticator);
- else {
+ } else {
             // have to check whether caller is allowed to see default session
             if (defaultSession.authenticator == authenticator)
                 ; // either same object or both null, either way OK


diff -r b01c7158703e -r 455da5d82662 mail/src/main/java/com/sun/mail/iap/Argument.java
--- a/mail/src/main/java/com/sun/mail/iap/Argument.java Mon Nov 04 11:10:39 2013 -0800
+++ b/mail/src/main/java/com/sun/mail/iap/Argument.java Mon Nov 04 16:00:21 2013 -0800
@@ -280,6 +280,19 @@
             }
         }
 
+ /*
+ * Make sure the (case-independent) string "NIL" is always quoted,
+ * so as not to be confused with a real NIL (handled above in nstring).
+ * This is more than is necessary, but it's rare to begin with and
+ * this makes it safer than doing the test in nstring above in case
+ * some code calls writeString when it should call writeNString.
+ */
+ if (!quote && bytes.length == 3 &&
+ (bytes[0] == 'N' || bytes[0] == 'n') &&
+ (bytes[1] == 'I' || bytes[1] == 'i') &&
+ (bytes[2] == 'L' || bytes[2] == 'l'))
+ quote = true;
+
         if (quote) // start quote
             os.write('"');
 


diff -r 455da5d82662 -r f6c4d3181f06 client/pom.xml
--- a/client/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/client/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 455da5d82662 -r f6c4d3181f06 demo/pom.xml
--- a/demo/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/demo/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 455da5d82662 -r f6c4d3181f06 dsn/pom.xml
--- a/dsn/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/dsn/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 455da5d82662 -r f6c4d3181f06 gimap/pom.xml
--- a/gimap/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/gimap/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 455da5d82662 -r f6c4d3181f06 imap/pom.xml
--- a/imap/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/imap/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>parent-distrib</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
         <relativePath>../parent-distrib/pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

diff -r 455da5d82662 -r f6c4d3181f06 javadoc/pom.xml
--- a/javadoc/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/javadoc/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -48,13 +48,13 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>
     <artifactId>javadoc</artifactId>
     <packaging>pom</packaging>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
     <name>JavaMail API javadocs</name>
     <description>${project.name}</description>
 

diff -r 455da5d82662 -r f6c4d3181f06 logging/pom.xml
--- a/logging/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/logging/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 455da5d82662 -r f6c4d3181f06 mail/pom.xml
--- a/mail/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/mail/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 455da5d82662 -r f6c4d3181f06 mailapi/pom.xml
--- a/mailapi/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/mailapi/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -56,7 +56,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 455da5d82662 -r f6c4d3181f06 mailapijar/pom.xml
--- a/mailapijar/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/mailapijar/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -55,7 +55,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>javax.mail</groupId>

diff -r 455da5d82662 -r f6c4d3181f06 mbox/native/pom.xml
--- a/mbox/native/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/mbox/native/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

diff -r 455da5d82662 -r f6c4d3181f06 mbox/pom.xml
--- a/mbox/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/mbox/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 455da5d82662 -r f6c4d3181f06 oldmail/pom.xml
--- a/oldmail/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/oldmail/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -53,7 +53,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>javax.mail</groupId>

diff -r 455da5d82662 -r f6c4d3181f06 outlook/pom.xml
--- a/outlook/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/outlook/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 455da5d82662 -r f6c4d3181f06 parent-distrib/pom.xml
--- a/parent-distrib/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/parent-distrib/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 455da5d82662 -r f6c4d3181f06 pom.xml
--- a/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -54,7 +54,7 @@
     <groupId>com.sun.mail</groupId>
     <artifactId>all</artifactId>
     <packaging>pom</packaging>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
     <name>JavaMail API distribution</name>
     <description>${project.name}</description>
     <url>http://javamail.java.net</url>
@@ -85,9 +85,9 @@
     </organization>
 
     <properties>
- <mail.version>1.5.1-SNAPSHOT</mail.version>
+ <mail.version>1.5.1</mail.version>
         <!-- like mail.version, but with underscores instead of dots -->
- <mail.zipversion>1_5_1-SNAPSHOT</mail.zipversion>
+ <mail.zipversion>1_5_1</mail.zipversion>
         <mail.spec.version>1.5</mail.spec.version>
         <activation-api.version>1.1</activation-api.version>
         <!-- defaults that are overridden in mail module -->

diff -r 455da5d82662 -r f6c4d3181f06 pop3/pom.xml
--- a/pop3/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/pop3/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>parent-distrib</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
         <relativePath>../parent-distrib/pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

diff -r 455da5d82662 -r f6c4d3181f06 publish/pom.xml
--- a/publish/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/publish/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -48,13 +48,13 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>
     <artifactId>publish</artifactId>
     <packaging>pom</packaging>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
     <name>JavaMail API publish project</name>
 
     <build>
@@ -89,44 +89,44 @@
         <dependency>
             <groupId>com.sun.mail</groupId>
             <artifactId>javax.mail</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
         </dependency>
     <!--
         <dependency>
             <groupId>com.sun.mail</groupId>
             <artifactId>demo</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
         </dependency>
         <dependency>
             <groupId>com.sun.mail</groupId>
             <artifactId>client</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
         </dependency>
         <dependency>
             <groupId>com.sun.mail</groupId>
             <artifactId>servlet</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
         </dependency>
         <dependency>
             <groupId>com.sun.mail</groupId>
             <artifactId>webapp</artifactId>
             <type>war</type>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
         </dependency>
         <dependency>
             <groupId>com.sun.mail</groupId>
             <artifactId>taglib</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
         </dependency>
         <dependency>
             <groupId>com.sun.mail</groupId>
             <artifactId>logging</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
         </dependency>
         <dependency>
             <groupId>com.sun.mail</groupId>
             <artifactId>outlook</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
         </dependency>
     -->
     </dependencies>

diff -r 455da5d82662 -r f6c4d3181f06 servlet/pom.xml
--- a/servlet/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/servlet/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 455da5d82662 -r f6c4d3181f06 smtp/pom.xml
--- a/smtp/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/smtp/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>parent-distrib</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
         <relativePath>../parent-distrib/pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

diff -r 455da5d82662 -r f6c4d3181f06 taglib/pom.xml
--- a/taglib/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/taglib/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>

diff -r 455da5d82662 -r f6c4d3181f06 webapp/pom.xml
--- a/webapp/pom.xml Mon Nov 04 16:00:21 2013 -0800
+++ b/webapp/pom.xml Tue Nov 12 14:46:36 2013 -0800
@@ -48,7 +48,7 @@
     <parent>
         <groupId>com.sun.mail</groupId>
         <artifactId>all</artifactId>
- <version>1.5.1-SNAPSHOT</version>
+ <version>1.5.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.mail</groupId>


diff -r f6c4d3181f06 -r bc219882a32f .hgtags
--- a/.hgtags Tue Nov 12 14:46:36 2013 -0800
+++ b/.hgtags Tue Nov 12 14:46:51 2013 -0800
@@ -15,3 +15,4 @@
 3dba8c78634fcb1ffd9a32e840bcfab91a83a551 JAVAMAIL-1_4_6
 ba4e734fdfa9916c0e8867b8ea8b4218e276be0e JAVAMAIL-1_4_7
 fa1edb81787d0b26828cee438a6d54df619fa6da JAVAMAIL-1_5_0
+f6c4d3181f06de080bb3b107382464fad875dfdb JAVAMAIL-1_5_1