commits@javamail.java.net

[mercurial:113] Add missing synchronization found by FindBugs.

From: <shannon_at_kenai.com>
Date: Mon, 9 Feb 2009 19:41:00 +0000 (GMT)

Repository: mercurial
Revision: 113
Author: Bill Shannon <bill.shannon_at_sun.com>
Date: 2009-02-05 02:00:26 UTC

Log Message:
-----------
Add missing synchronization found by FindBugs.

Modified Paths:
--------------
    mail/src/main/java/javax/mail/internet/MimeMultipart.java

Diffs:
-----
diff -r 71f4da2f4941 -r dd6602fdda3d
mail/src/main/java/javax/mail/internet/MimeMultipart.java
--- a/mail/src/main/java/javax/mail/internet/MimeMultipart.java Wed Feb
04 18:00:05 2009 -0800
+++ b/mail/src/main/java/javax/mail/internet/MimeMultipart.java Wed Feb
04 18:00:26 2009 -0800
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2009 Sun Microsystems, Inc. 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
@@ -409,7 +409,7 @@
      * might itself want to track whether its internal state actually
      * did change, and do the header updating only if necessary.
      */
- protected void updateHeaders() throws MessagingException {
+ protected synchronized void updateHeaders() throws
MessagingException {
        for (int i = 0; i < parts.size(); i++)
            ((MimeBodyPart)parts.elementAt(i)).updateHeaders();
     }