? META-INF ? Makefile ? build-log.txt ? classes ? config.log ? config.status ? gnu-javamail-trailing-space-patch.txt ? gnumail.jar ? javamail.address.map ? javamail.providers Index: source/gnu/mail/handler/Application.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/handler/Application.java,v retrieving revision 1.6 diff -u -p -r1.6 Application.java --- source/gnu/mail/handler/Application.java 19 Jul 2006 09:32:39 -0000 1.6 +++ source/gnu/mail/handler/Application.java 21 Nov 2007 05:09:57 -0000 @@ -3,17 +3,17 @@ * Copyright(C) 2003 Chris Burdess * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -50,7 +50,7 @@ public abstract class Application * Our favorite data flavor. */ protected DataFlavor flavor; - + /** * Constructor specifying the data flavor. * @param mimeType the MIME content type Index: source/gnu/mail/handler/ApplicationOctetStream.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/handler/ApplicationOctetStream.java,v retrieving revision 1.5 diff -u -p -r1.5 ApplicationOctetStream.java --- source/gnu/mail/handler/ApplicationOctetStream.java 25 Aug 2005 12:31:15 -0000 1.5 +++ source/gnu/mail/handler/ApplicationOctetStream.java 21 Nov 2007 05:09:57 -0000 @@ -3,17 +3,17 @@ * Copyright(C) 2003 Chris Burdess * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -42,5 +42,5 @@ public final class ApplicationOctetStrea { super("application/octet-stream", "binary"); } - + } Index: source/gnu/mail/handler/Message.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/handler/Message.java,v retrieving revision 1.4 diff -u -p -r1.4 Message.java --- source/gnu/mail/handler/Message.java 25 Aug 2005 12:31:15 -0000 1.4 +++ source/gnu/mail/handler/Message.java 21 Nov 2007 05:09:57 -0000 @@ -3,17 +3,17 @@ * Copyright(C) 2003 Chris Burdess * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -50,7 +50,7 @@ public abstract class Message * Our favorite data flavor. */ protected DataFlavor flavor; - + /** * Constructor specifying the data flavor. * @param mimeType the MIME content type Index: source/gnu/mail/handler/MessageRFC822.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/handler/MessageRFC822.java,v retrieving revision 1.4 diff -u -p -r1.4 MessageRFC822.java --- source/gnu/mail/handler/MessageRFC822.java 25 Aug 2005 12:31:15 -0000 1.4 +++ source/gnu/mail/handler/MessageRFC822.java 21 Nov 2007 05:09:57 -0000 @@ -3,17 +3,17 @@ * Copyright(C) 2003 Chris Burdess * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -42,5 +42,5 @@ public final class MessageRFC822 { super("message/rfc822", "message"); } - + } Index: source/gnu/mail/handler/Multipart.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/handler/Multipart.java,v retrieving revision 1.5 diff -u -p -r1.5 Multipart.java --- source/gnu/mail/handler/Multipart.java 25 Aug 2005 12:31:15 -0000 1.5 +++ source/gnu/mail/handler/Multipart.java 21 Nov 2007 05:09:57 -0000 @@ -3,17 +3,17 @@ * Copyright(C) 2003 Chris Burdess * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -49,7 +49,7 @@ public class Multipart * Our favorite data flavor. */ protected DataFlavor flavor; - + /** * Generic constructor. */ @@ -57,7 +57,7 @@ public class Multipart { this("multipart/*", "multipart"); } - + /** * Constructor specifying the data flavor. * @param mimeType the MIME content type Index: source/gnu/mail/handler/MultipartAlternative.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/handler/MultipartAlternative.java,v retrieving revision 1.5 diff -u -p -r1.5 MultipartAlternative.java --- source/gnu/mail/handler/MultipartAlternative.java 25 Aug 2005 12:31:15 -0000 1.5 +++ source/gnu/mail/handler/MultipartAlternative.java 21 Nov 2007 05:09:57 -0000 @@ -3,17 +3,17 @@ * Copyright(C) 2003 Chris Burdess * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -42,5 +42,5 @@ public final class MultipartAlternative { super("multipart/alternative", "multipart"); } - + } Index: source/gnu/mail/handler/MultipartMixed.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/handler/MultipartMixed.java,v retrieving revision 1.5 diff -u -p -r1.5 MultipartMixed.java --- source/gnu/mail/handler/MultipartMixed.java 25 Aug 2005 12:31:15 -0000 1.5 +++ source/gnu/mail/handler/MultipartMixed.java 21 Nov 2007 05:09:57 -0000 @@ -3,17 +3,17 @@ * Copyright(C) 2003 Chris Burdess * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -42,5 +42,5 @@ public final class MultipartMixed { super("multipart/mixed", "multipart"); } - + } Index: source/gnu/mail/handler/MultipartRelated.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/handler/MultipartRelated.java,v retrieving revision 1.5 diff -u -p -r1.5 MultipartRelated.java --- source/gnu/mail/handler/MultipartRelated.java 25 Aug 2005 12:31:15 -0000 1.5 +++ source/gnu/mail/handler/MultipartRelated.java 21 Nov 2007 05:09:57 -0000 @@ -3,17 +3,17 @@ * Copyright(C) 2003 Chris Burdess * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -42,5 +42,5 @@ public final class MultipartRelated { super("multipart/related", "multipart"); } - + } Index: source/gnu/mail/handler/MultipartReport.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/handler/MultipartReport.java,v retrieving revision 1.2 diff -u -p -r1.2 MultipartReport.java --- source/gnu/mail/handler/MultipartReport.java 25 Aug 2005 12:31:15 -0000 1.2 +++ source/gnu/mail/handler/MultipartReport.java 21 Nov 2007 05:09:57 -0000 @@ -3,17 +3,17 @@ * Copyright(C) 2003 Chris Burdess * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -42,5 +42,5 @@ public final class MultipartReport { super("multipart/report", "multipart"); } - + } Index: source/gnu/mail/handler/MultipartSigned.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/handler/MultipartSigned.java,v retrieving revision 1.3 diff -u -p -r1.3 MultipartSigned.java --- source/gnu/mail/handler/MultipartSigned.java 25 Aug 2005 12:31:15 -0000 1.3 +++ source/gnu/mail/handler/MultipartSigned.java 21 Nov 2007 05:09:57 -0000 @@ -3,17 +3,17 @@ * Copyright(C) 2003 Chris Burdess * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -42,5 +42,5 @@ public final class MultipartSigned { super("multipart/signed", "multipart"); } - + } Index: source/gnu/mail/handler/Text.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/handler/Text.java,v retrieving revision 1.4 diff -u -p -r1.4 Text.java --- source/gnu/mail/handler/Text.java 25 Aug 2005 12:31:15 -0000 1.4 +++ source/gnu/mail/handler/Text.java 21 Nov 2007 05:09:57 -0000 @@ -3,17 +3,17 @@ * Copyright(C) 2003 Chris Burdess * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -50,7 +50,7 @@ public abstract class Text * Yum yum. */ protected DataFlavor flavor; - + /** * Constructor specifying the data flavor. * @param mimeType the MIME content type @@ -168,5 +168,5 @@ public abstract class Text } return MimeUtility.javaCharset(charset); } - + } Index: source/gnu/mail/handler/TextHtml.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/handler/TextHtml.java,v retrieving revision 1.5 diff -u -p -r1.5 TextHtml.java --- source/gnu/mail/handler/TextHtml.java 25 Aug 2005 12:31:15 -0000 1.5 +++ source/gnu/mail/handler/TextHtml.java 21 Nov 2007 05:09:57 -0000 @@ -3,17 +3,17 @@ * Copyright(C) 2003 Chris Burdess * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -41,5 +41,5 @@ public final class TextHtml { super("text/html", "HTML"); } - + } Index: source/gnu/mail/handler/TextPlain.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/handler/TextPlain.java,v retrieving revision 1.5 diff -u -p -r1.5 TextPlain.java --- source/gnu/mail/handler/TextPlain.java 25 Aug 2005 12:31:15 -0000 1.5 +++ source/gnu/mail/handler/TextPlain.java 21 Nov 2007 05:09:57 -0000 @@ -3,17 +3,17 @@ * Copyright(C) 2003 Chris Burdess * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -41,5 +41,5 @@ public final class TextPlain { super("text/plain", "plaintext"); } - + } Index: source/gnu/mail/handler/TextXml.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/handler/TextXml.java,v retrieving revision 1.5 diff -u -p -r1.5 TextXml.java --- source/gnu/mail/handler/TextXml.java 25 Aug 2005 12:31:15 -0000 1.5 +++ source/gnu/mail/handler/TextXml.java 21 Nov 2007 05:09:57 -0000 @@ -3,17 +3,17 @@ * Copyright(C) 2003 Chris Burdess * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -41,5 +41,5 @@ public final class TextXml { super("text/xml", "XML"); } - + } Index: source/gnu/mail/providers/ReadOnlyMessage.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/ReadOnlyMessage.java,v retrieving revision 1.5 diff -u -p -r1.5 ReadOnlyMessage.java --- source/gnu/mail/providers/ReadOnlyMessage.java 25 Aug 2005 12:31:15 -0000 1.5 +++ source/gnu/mail/providers/ReadOnlyMessage.java 21 Nov 2007 05:09:57 -0000 @@ -1,23 +1,23 @@ /* * ReadOnlyMessage.java * Copyright(C) 2003 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -48,21 +48,21 @@ import javax.mail.internet.MimeMessage; public abstract class ReadOnlyMessage extends MimeMessage { - protected ReadOnlyMessage(Folder folder, int msgnum) - throws MessagingException + protected ReadOnlyMessage(Folder folder, int msgnum) + throws MessagingException { super(folder, msgnum); } - protected ReadOnlyMessage(Folder folder, InputStream in, int msgnum) - throws MessagingException + protected ReadOnlyMessage(Folder folder, InputStream in, int msgnum) + throws MessagingException { super(folder, in, msgnum); } protected ReadOnlyMessage(Folder folder, InternetHeaders headers, - byte[] content, int msgnum) - throws MessagingException + byte[] content, int msgnum) + throws MessagingException { super(folder, msgnum); } @@ -114,7 +114,7 @@ public abstract class ReadOnlyMessage ex } // -- flags -- - + public void setFlags(Flags flag, boolean set) throws MessagingException { Index: source/gnu/mail/providers/imap/ACL.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/imap/ACL.java,v retrieving revision 1.1 diff -u -p -r1.1 ACL.java --- source/gnu/mail/providers/imap/ACL.java 7 Sep 2005 19:10:47 -0000 1.1 +++ source/gnu/mail/providers/imap/ACL.java 21 Nov 2007 05:09:57 -0000 @@ -1,23 +1,23 @@ /* * ACL.java * Copyright (C) 2005 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -66,6 +66,6 @@ public final class ACL { return rights; } - + } Index: source/gnu/mail/providers/imap/IMAPBodyPart.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/imap/IMAPBodyPart.java,v retrieving revision 1.6 diff -u -p -r1.6 IMAPBodyPart.java --- source/gnu/mail/providers/imap/IMAPBodyPart.java 3 May 2006 08:00:36 -0000 1.6 +++ source/gnu/mail/providers/imap/IMAPBodyPart.java 21 Nov 2007 05:09:57 -0000 @@ -1,23 +1,23 @@ /* * IMAPBodyPart.java * Copyright(C) 2003 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -76,7 +76,7 @@ implements IMAPConstants * Multipart content. */ IMAPMultipart multipart = null; - + /** * Called by the IMAPMessage. */ @@ -165,7 +165,7 @@ implements IMAPConstants { throw new MessagingException("Unexpected status item: " + item); } - + if (key == BODY) { int plen = params.size(); @@ -182,7 +182,7 @@ implements IMAPConstants throw new MessagingException("Unexpected status item: " + pitem); } - + if (pkey.equals(section)) { Object c = code.get(i + 1); @@ -281,7 +281,7 @@ implements IMAPConstants } return super.getContent(); } - + /** * Returns the raw content stream. */ Index: source/gnu/mail/providers/imap/IMAPFlags.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/imap/IMAPFlags.java,v retrieving revision 1.2 diff -u -p -r1.2 IMAPFlags.java --- source/gnu/mail/providers/imap/IMAPFlags.java 25 Aug 2005 12:31:15 -0000 1.2 +++ source/gnu/mail/providers/imap/IMAPFlags.java 21 Nov 2007 05:09:58 -0000 @@ -1,23 +1,23 @@ /* * IMAPFlags.java * Copyright(C) 2003 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. Index: source/gnu/mail/providers/imap/IMAPFolder.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/imap/IMAPFolder.java,v retrieving revision 1.20 diff -u -p -r1.20 IMAPFolder.java --- source/gnu/mail/providers/imap/IMAPFolder.java 1 Jun 2007 17:20:42 -0000 1.20 +++ source/gnu/mail/providers/imap/IMAPFolder.java 21 Nov 2007 05:09:58 -0000 @@ -1,23 +1,23 @@ /* * IMAPFolder.java * Copyright (C) 2003, 2004 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -88,7 +88,7 @@ import gnu.inet.imap.Quota; * * @author Chris Burdess */ -public class IMAPFolder +public class IMAPFolder extends Folder implements UIDFolder { @@ -120,23 +120,23 @@ public class IMAPFolder /** * Constructor. */ - protected IMAPFolder(Store store, String path) + protected IMAPFolder(Store store, String path) { this(store, path, -1, '\u0000'); } - + /** * Constructor. */ - protected IMAPFolder(Store store, String path, char delimiter) + protected IMAPFolder(Store store, String path, char delimiter) { this(store, path, -1, delimiter); } - + /** * Constructor. */ - protected IMAPFolder(Store store, String path, int type, char delimiter) + protected IMAPFolder(Store store, String path, int type, char delimiter) { super(store); this.path = path; @@ -228,7 +228,7 @@ public class IMAPFolder /** * Returns the name of this folder. */ - public String getName() + public String getName() { int di = path.lastIndexOf(delimiter); return (di == -1) ? path : path.substring(di + 1); @@ -246,8 +246,8 @@ public class IMAPFolder * Returns the type of this folder. * @exception MessagingException if a messaging error occurred */ - public int getType() - throws MessagingException + public int getType() + throws MessagingException { if (type == -1) { @@ -291,8 +291,8 @@ public class IMAPFolder * Indicates whether this folder exists. * @exception MessagingException if a messaging error occurred */ - public boolean exists() - throws MessagingException + public boolean exists() + throws MessagingException { try { @@ -309,8 +309,8 @@ public class IMAPFolder * Indicates whether this folder contains new messages. * @exception MessagingException if a messaging error occurred */ - public boolean hasNewMessages() - throws MessagingException + public boolean hasNewMessages() + throws MessagingException { return getNewMessageCount() > 0; // TODO } @@ -319,8 +319,8 @@ public class IMAPFolder * Opens this folder. * @exception MessagingException if a messaging error occurred */ - public void open(int mode) - throws MessagingException + public void open(int mode) + throws MessagingException { IMAPStore s = (IMAPStore) store; IMAPConnection connection = s.getConnection(); @@ -358,8 +358,8 @@ public class IMAPFolder /** * Create this folder. */ - public boolean create(int type) - throws MessagingException + public boolean create(int type) + throws MessagingException { IMAPStore s = (IMAPStore) store; IMAPConnection connection = s.getConnection(); @@ -402,8 +402,8 @@ public class IMAPFolder /** * Delete this folder. */ - public boolean delete(boolean flag) - throws MessagingException + public boolean delete(boolean flag) + throws MessagingException { IMAPStore s = (IMAPStore) store; IMAPConnection connection = s.getConnection(); @@ -434,8 +434,8 @@ public class IMAPFolder /** * Rename this folder. */ - public boolean renameTo(Folder folder) - throws MessagingException + public boolean renameTo(Folder folder) + throws MessagingException { IMAPStore s = (IMAPStore) store; IMAPConnection connection = s.getConnection(); @@ -468,8 +468,8 @@ public class IMAPFolder * @param expunge if the folder is to be expunged before it is closed * @exception MessagingException if a messaging error occurred */ - public void close(boolean expunge) - throws MessagingException + public void close(boolean expunge) + throws MessagingException { if (mode == -1) { @@ -518,8 +518,8 @@ public class IMAPFolder * This deletes all the messages marked as deleted. * @exception MessagingException if a messaging error occurred */ - public Message[] expunge() - throws MessagingException + public Message[] expunge() + throws MessagingException { if (!isOpen()) { @@ -561,7 +561,7 @@ public class IMAPFolder /** * Indicates whether this folder is open. */ - public boolean isOpen() + public boolean isOpen() { return (mode != -1); } @@ -569,7 +569,7 @@ public class IMAPFolder /** * Returns the permanent flags for this folder. */ - public Flags getPermanentFlags() + public Flags getPermanentFlags() { return permanentFlags; } @@ -578,8 +578,8 @@ public class IMAPFolder * Returns the number of messages in this folder. * @exception MessagingException if a messaging error occurred */ - public int getMessageCount() - throws MessagingException + public int getMessageCount() + throws MessagingException { MailboxStatus ms = null; IMAPStore s = (IMAPStore) store; @@ -623,8 +623,8 @@ public class IMAPFolder * Returns the number of new messages in this folder. * @exception MessagingException if a messaging error occurred */ - public int getNewMessageCount() - throws MessagingException + public int getNewMessageCount() + throws MessagingException { MailboxStatus ms = null; IMAPStore s = (IMAPStore) store; @@ -672,8 +672,8 @@ public class IMAPFolder * the message(headers, etc), the entire message is retrieved. * @exception MessagingException if a messaging error occurred */ - public Message getMessage(int msgnum) - throws MessagingException + public Message getMessage(int msgnum) + throws MessagingException { if (mode == -1) { @@ -714,8 +714,8 @@ public class IMAPFolder * Appends the specified set of messages to this folder. * Only MimeMessages are accepted. */ - public void appendMessages(Message[] messages) - throws MessagingException + public void appendMessages(Message[] messages) + throws MessagingException { MimeMessage[] m = new MimeMessage[messages.length]; try @@ -762,8 +762,8 @@ public class IMAPFolder * This executes the fetch for the specified message numbers * and updates the messages according to the message statuses returned. */ - public void fetch(Message[] messages, FetchProfile fp) - throws MessagingException + public void fetch(Message[] messages, FetchProfile fp) + throws MessagingException { if (!isOpen()) { @@ -1196,15 +1196,15 @@ public class IMAPFolder throw new MessagingException(e.getMessage(), e); } } - + /** * Returns the subfolders for this folder. */ - public Folder[] list(String pattern) - throws MessagingException + public Folder[] list(String pattern) + throws MessagingException { char sep = getSeparator(); - String spec = ("".equals(path)) ? "%" : + String spec = ("".equals(path)) ? "%" : new StringBuffer(path).append(sep).append(pattern).toString(); IMAPStore s = (IMAPStore) store; IMAPConnection connection = s.getConnection(); @@ -1226,12 +1226,12 @@ public class IMAPFolder throw new MessagingException(e.getMessage(), e); } } - + /** * Returns the subscribed subfolders for this folder. */ - public Folder[] listSubscribed(String pattern) - throws MessagingException + public Folder[] listSubscribed(String pattern) + throws MessagingException { char sep = getSeparator(); String spec = ("".equals(path)) ? "%" : @@ -1289,8 +1289,8 @@ public class IMAPFolder /** * Returns the parent folder of this folder. */ - public Folder getParent() - throws MessagingException + public Folder getParent() + throws MessagingException { IMAPStore s = (IMAPStore) store; IMAPConnection connection = s.getConnection(); @@ -1306,8 +1306,8 @@ public class IMAPFolder /** * Returns a subfolder with the specified name. */ - public Folder getFolder(String name) - throws MessagingException + public Folder getFolder(String name) + throws MessagingException { StringBuffer buf = new StringBuffer(); if (path != null && path.length() > 0) @@ -1322,8 +1322,8 @@ public class IMAPFolder /** * Returns the path separator charcter. */ - public char getSeparator() - throws MessagingException + public char getSeparator() + throws MessagingException { if (delimiter == '\u0000') { @@ -1346,7 +1346,7 @@ public class IMAPFolder } else { - throw new FolderNotFoundException(this); + throw new FolderNotFoundException(this); } } catch (IOException e) @@ -1588,21 +1588,21 @@ public class IMAPFolder { return -1; } - + IMAPStore s = (IMAPStore) store; IMAPConnection connection = s.getConnection(); String[] criterias = new String[] { criteria }; - + int[] ids = null; try - { + { ids = connection.search(null, criterias); } catch (IOException e) { throw new MessagingException(e.getMessage(), e); } - + return ids.length; } @@ -1618,7 +1618,7 @@ public class IMAPFolder { return null; } - + IMAPStore s = (IMAPStore) store; IMAPConnection connection = s.getConnection(); List acc = new ArrayList(); @@ -1660,7 +1660,7 @@ public class IMAPFolder { return; } - + IMAPStore s = (IMAPStore) store; IMAPConnection connection = s.getConnection(); try @@ -1694,7 +1694,7 @@ public class IMAPFolder { return; } - + IMAPStore s = (IMAPStore) store; IMAPConnection connection = s.getConnection(); try @@ -1734,7 +1734,7 @@ public class IMAPFolder { return; } - + IMAPStore s = (IMAPStore) store; IMAPConnection connection = s.getConnection(); try @@ -1768,7 +1768,7 @@ public class IMAPFolder { return null; } - + IMAPStore s = (IMAPStore) store; IMAPConnection connection = s.getConnection(); try @@ -1782,7 +1782,7 @@ public class IMAPFolder throw new MessagingException(e.getMessage(), e); } } - + /** * Returns the rights assigned to the currently authenticated principal. * @deprecated this API will probably change incompatibly soon @@ -1794,7 +1794,7 @@ public class IMAPFolder { return null; } - + IMAPStore s = (IMAPStore) store; IMAPConnection connection = s.getConnection(); try @@ -1808,5 +1808,5 @@ public class IMAPFolder throw new MessagingException(e.getMessage(), e); } } - + } Index: source/gnu/mail/providers/imap/IMAPMessage.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/imap/IMAPMessage.java,v retrieving revision 1.11 diff -u -p -r1.11 IMAPMessage.java --- source/gnu/mail/providers/imap/IMAPMessage.java 26 Apr 2006 08:55:10 -0000 1.11 +++ source/gnu/mail/providers/imap/IMAPMessage.java 21 Nov 2007 05:09:58 -0000 @@ -1,23 +1,23 @@ /* * IMAPMessage.java * Copyright(C) 2003 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -114,15 +114,15 @@ extends ReadOnlyMessage */ private IMAPMultipart multipart = null; - IMAPMessage(IMAPFolder folder, InputStream in, int msgnum) - throws MessagingException + IMAPMessage(IMAPFolder folder, InputStream in, int msgnum) + throws MessagingException { super(folder, in, msgnum); flags = null; } - IMAPMessage(IMAPFolder folder, int msgnum) - throws MessagingException + IMAPMessage(IMAPFolder folder, int msgnum) + throws MessagingException { super(folder, msgnum); flags = null; @@ -241,7 +241,7 @@ extends ReadOnlyMessage { throw new MessagingException("Unexpected status item: " + item); } - + if (key == IMAPConstants.BODY || key == IMAPConstants.RFC822) { byte[] literal = (byte[]) code.get(i + 1); @@ -266,7 +266,7 @@ extends ReadOnlyMessage throw new MessagingException("Unexpected status item: " + pitem); } - + if (pkey == IMAPConstants.HEADER) { InputStream in = new ByteArrayInputStream(literal); @@ -406,7 +406,7 @@ extends ReadOnlyMessage // Last 2 are disposition and language String disposition = parseAtom(list.get(len - 2)); String language = parseAtom(list.get(len - 1)); - + if (disposition != null) { parentHeaders.setHeader("Content-Disposition", disposition); @@ -415,7 +415,7 @@ extends ReadOnlyMessage { parentHeaders.setHeader("Content-Language", language); } - + // Next any parameters // Note that there should only be 1 slot containing a list, // but servers sometimes return multiple lists @@ -459,13 +459,13 @@ extends ReadOnlyMessage part.multipart = m; return part; } - + if (len < 8) { throw new MessagingException("Unexpected number of fields in " + "[MIME-IMB] structure: " + list); } - + // Basic fields String type = parseAtom(list.get(BS_CONTENT_TYPE)).toLowerCase(); String subtype = parseAtom(list.get(BS_CONTENT_SUBTYPE)).toLowerCase(); @@ -494,7 +494,7 @@ extends ReadOnlyMessage throw new MessagingException("Expecting number in [MIME-IMB] " + "structure: " + list); } - + ContentType ct = new ContentType(type, subtype, params); InternetHeaders h = new InternetHeaders(); h.setHeader("Content-Type", ct.toString()); @@ -510,7 +510,7 @@ extends ReadOnlyMessage { h.setHeader("Content-Transfer-Encoding", encoding); } - + // Extension fields if (len > 8) { @@ -604,7 +604,7 @@ extends ReadOnlyMessage /** * Returns a data handler for this message's content. */ - public DataHandler getDataHandler() + public DataHandler getDataHandler() throws MessagingException { // Hook into BODYSTRUCTURE method @@ -643,8 +643,8 @@ extends ReadOnlyMessage /** * Returns the raw content stream. */ - protected InputStream getContentStream() - throws MessagingException + protected InputStream getContentStream() + throws MessagingException { if (content == null) { @@ -654,12 +654,12 @@ extends ReadOnlyMessage } // -- Header access -- - + /** * Returns the specified header field. */ - public String[] getHeader(String name) - throws MessagingException + public String[] getHeader(String name) + throws MessagingException { if (headers == null) { @@ -677,8 +677,8 @@ extends ReadOnlyMessage /** * Returns the specified header field. */ - public String getHeader(String name, String delimiter) - throws MessagingException + public String getHeader(String name, String delimiter) + throws MessagingException { if (headers == null) { @@ -693,8 +693,8 @@ extends ReadOnlyMessage return header; } - public Enumeration getAllHeaders() - throws MessagingException + public Enumeration getAllHeaders() + throws MessagingException { if (!headersComplete) { @@ -703,8 +703,8 @@ extends ReadOnlyMessage return super.getAllHeaders(); } - public Enumeration getAllHeaderLines() - throws MessagingException + public Enumeration getAllHeaderLines() + throws MessagingException { if (!headersComplete) { @@ -713,8 +713,8 @@ extends ReadOnlyMessage return super.getAllHeaderLines(); } - public Enumeration getMatchingHeaders(String[] names) - throws MessagingException + public Enumeration getMatchingHeaders(String[] names) + throws MessagingException { if (!headersComplete) { @@ -723,8 +723,8 @@ extends ReadOnlyMessage return super.getMatchingHeaders(names); } - public Enumeration getMatchingHeaderLines(String[] names) - throws MessagingException + public Enumeration getMatchingHeaderLines(String[] names) + throws MessagingException { if (!headersComplete) { @@ -733,8 +733,8 @@ extends ReadOnlyMessage return super.getMatchingHeaderLines(names); } - public Enumeration getNonMatchingHeaders(String[] names) - throws MessagingException + public Enumeration getNonMatchingHeaders(String[] names) + throws MessagingException { if (!headersComplete) { @@ -743,8 +743,8 @@ extends ReadOnlyMessage return super.getNonMatchingHeaders(names); } - public Enumeration getNonMatchingHeaderLines(String[] names) - throws MessagingException + public Enumeration getNonMatchingHeaderLines(String[] names) + throws MessagingException { if (!headersComplete) { @@ -795,7 +795,7 @@ extends ReadOnlyMessage { flags.remove(flag); } - + // Create lists of flags to send to the server IMAPFlags iflags = (IMAPFlags) flags; List aflagList = iflags.getAddedFlags(); @@ -804,7 +804,7 @@ extends ReadOnlyMessage List rflagList = iflags.getRemovedFlags(); String[] rflags = new String[rflagList.size()]; rflagList.toArray(rflags); - + // Perform store if (aflags.length > 0 || rflags.length > 0) { @@ -828,11 +828,11 @@ extends ReadOnlyMessage throw new MessagingException(e.getMessage(), e); } } - + // -- Utility -- - public void writeTo(OutputStream msgStream) - throws IOException, MessagingException + public void writeTo(OutputStream msgStream) + throws IOException, MessagingException { if (headers == null) { @@ -845,8 +845,8 @@ extends ReadOnlyMessage super.writeTo(msgStream); } - public void writeTo(OutputStream msgStream, String[] ignoreList) - throws IOException, MessagingException + public void writeTo(OutputStream msgStream, String[] ignoreList) + throws IOException, MessagingException { if (headers == null) { Index: source/gnu/mail/providers/imap/IMAPMultipart.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/imap/IMAPMultipart.java,v retrieving revision 1.4 diff -u -p -r1.4 IMAPMultipart.java --- source/gnu/mail/providers/imap/IMAPMultipart.java 25 Aug 2005 12:31:15 -0000 1.4 +++ source/gnu/mail/providers/imap/IMAPMultipart.java 21 Nov 2007 05:09:58 -0000 @@ -1,23 +1,23 @@ /* * IMAPMultipart.java * Copyright(C) 2003 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. Index: source/gnu/mail/providers/imap/IMAPMultipartDataSource.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/imap/IMAPMultipartDataSource.java,v retrieving revision 1.5 diff -u -p -r1.5 IMAPMultipartDataSource.java --- source/gnu/mail/providers/imap/IMAPMultipartDataSource.java 31 May 2007 10:24:56 -0000 1.5 +++ source/gnu/mail/providers/imap/IMAPMultipartDataSource.java 21 Nov 2007 05:09:58 -0000 @@ -1,23 +1,23 @@ /* * IMAPMultipartDataSource.java * Copyright(C) 2003 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. Index: source/gnu/mail/providers/imap/IMAPStore.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/imap/IMAPStore.java,v retrieving revision 1.26 diff -u -p -r1.26 IMAPStore.java --- source/gnu/mail/providers/imap/IMAPStore.java 1 Jun 2007 17:09:37 -0000 1.26 +++ source/gnu/mail/providers/imap/IMAPStore.java 21 Nov 2007 05:09:58 -0000 @@ -1,23 +1,23 @@ /* * IMAPStore.java * Copyright(C) 2003,2004 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -147,7 +147,7 @@ public class IMAPStore { connection.setAnsiDebug(true); } - + List capabilities = connection.capability(); // Ignore tls settings if we are making the connection @@ -611,7 +611,7 @@ public class IMAPStore } // -- Utility methods -- - + private int getIntProperty(String key) { String value = getProperty(key); Index: source/gnu/mail/providers/imap/Rights.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/imap/Rights.java,v retrieving revision 1.1 diff -u -p -r1.1 Rights.java --- source/gnu/mail/providers/imap/Rights.java 7 Sep 2005 19:10:47 -0000 1.1 +++ source/gnu/mail/providers/imap/Rights.java 21 Nov 2007 05:09:58 -0000 @@ -1,23 +1,23 @@ /* * Rights.java * Copyright (C) 2005 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -114,7 +114,7 @@ public final class Rights throw new IllegalStateException(); } } - + } int rights; Index: source/gnu/mail/providers/maildir/MaildirFolder.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/maildir/MaildirFolder.java,v retrieving revision 1.7 diff -u -p -r1.7 MaildirFolder.java --- source/gnu/mail/providers/maildir/MaildirFolder.java 25 Aug 2005 12:31:15 -0000 1.7 +++ source/gnu/mail/providers/maildir/MaildirFolder.java 21 Nov 2007 05:09:58 -0000 @@ -1,23 +1,23 @@ /* * MaildirFolder.java * Copyright(C) 2003 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -60,8 +60,8 @@ import gnu.inet.util.LineInputStream; * * @author Chris Burdess */ -public final class MaildirFolder - extends Folder +public final class MaildirFolder + extends Folder { /** @@ -93,33 +93,33 @@ public final class MaildirFolder int type; boolean inbox; - + static Flags permanentFlags = new Flags(); static long deliveryCount = 0; - + /** * Constructor. */ protected MaildirFolder(Store store, String filename, boolean root, - boolean inbox) + boolean inbox) { super(store); - + maildir = new File(filename); tmpdir = new File(maildir, "tmp"); newdir = new MaildirTuple(new File(maildir, "new")); curdir = new MaildirTuple(new File(maildir, "cur")); - + mode = -1; type = root ? HOLDS_FOLDERS : HOLDS_MESSAGES; this.inbox = inbox; } - + /** * Constructor. */ - protected MaildirFolder(Store store, String filename) + protected MaildirFolder(Store store, String filename) { this(store, filename, false, false); } @@ -127,17 +127,17 @@ public final class MaildirFolder /** * Returns the name of this folder. */ - public String getName() + public String getName() { if (inbox) return INBOX; return maildir.getName(); } - + /** * Returns the full name of this folder. */ - public String getFullName() + public String getFullName() { if (inbox) return INBOX; @@ -151,7 +151,7 @@ public final class MaildirFolder throws MessagingException { URLName url = super.getURLName(); - return new URLName(url.getProtocol(), + return new URLName(url.getProtocol(), null, -1, url.getFile(), null, null); } @@ -160,8 +160,8 @@ public final class MaildirFolder * Returns the type of this folder. * @exception MessagingException if a messaging error occurred */ - public int getType() - throws MessagingException + public int getType() + throws MessagingException { return type; } @@ -170,8 +170,8 @@ public final class MaildirFolder * Indicates whether this folder exists. * @exception MessagingException if a messaging error occurred */ - public boolean exists() - throws MessagingException + public boolean exists() + throws MessagingException { return maildir.exists(); } @@ -180,8 +180,8 @@ public final class MaildirFolder * Indicates whether this folder contains new messages. * @exception MessagingException if a messaging error occurred */ - public boolean hasNewMessages() - throws MessagingException + public boolean hasNewMessages() + throws MessagingException { return getNewMessageCount()>0; } @@ -192,8 +192,8 @@ public final class MaildirFolder * mbox. If this fails a MessagingException is thrown. * @exception MessagingException if a messaging error occurred */ - public void open(int mode) - throws MessagingException + public void open(int mode) + throws MessagingException { if (this.mode!=-1) throw new IllegalStateException("Folder is open"); @@ -209,7 +209,7 @@ public final class MaildirFolder success = success && curdir.dir.mkdirs(); if (!success) throw new MessagingException("Unable to create directories"); - if (mode==READ_WRITE) + if (mode==READ_WRITE) { if (!maildir.canWrite()) throw new MessagingException("Folder is read-only"); @@ -224,8 +224,8 @@ public final class MaildirFolder * @param expunge if the folder is to be expunged before it is closed * @exception MessagingException if a messaging error occurred */ - public void close(boolean expunge) - throws MessagingException + public void close(boolean expunge) + throws MessagingException { if (mode==-1) throw new IllegalStateException("Folder is closed"); @@ -240,8 +240,8 @@ public final class MaildirFolder * This deletes all the messages marked as deleted. * @exception MessagingException if a messaging error occurred */ - public Message[] expunge() - throws MessagingException + public Message[] expunge() + throws MessagingException { if (mode==-1) throw new IllegalStateException("Folder is closed"); @@ -295,19 +295,19 @@ public final class MaildirFolder notifyMessageRemovedListeners(true, expunged); return expunged; } - + /** * Indicates whether this folder is open. */ - public boolean isOpen() + public boolean isOpen() { return (mode!=-1); } - + /** * Returns the permanent flags for this folder. */ - public Flags getPermanentFlags() + public Flags getPermanentFlags() { return permanentFlags; } @@ -316,8 +316,8 @@ public final class MaildirFolder * Returns the number of messages in this folder. * @exception MessagingException if a messaging error occurred */ - public synchronized int getMessageCount() - throws MessagingException + public synchronized int getMessageCount() + throws MessagingException { statDir(curdir); statDir(newdir); @@ -339,8 +339,8 @@ public final class MaildirFolder * Returns the specified message number from this folder. * @exception MessagingException if a messaging error occurred */ - public synchronized Message getMessage(int msgnum) - throws MessagingException + public synchronized Message getMessage(int msgnum) + throws MessagingException { statDir(curdir); statDir(newdir); @@ -354,13 +354,13 @@ public final class MaildirFolder else return newdir.messages[index-clen]; } - + /** * Returns the messages in this folder. * @exception MessagingException if a messaging error occurred */ - public synchronized Message[] getMessages() - throws MessagingException + public synchronized Message[] getMessages() + throws MessagingException { statDir(curdir); statDir(newdir); @@ -432,8 +432,8 @@ public final class MaildirFolder * how to retrieve internet content for other kinds. * @param m an array of messages to be appended */ - public synchronized void appendMessages(Message[] m) - throws MessagingException + public synchronized void appendMessages(Message[] m) + throws MessagingException { MaildirMessage[] n; synchronized (this) @@ -443,11 +443,11 @@ public final class MaildirFolder statDir(curdir); int nlen = newdir.messages.length; int clen = curdir.messages.length; - + List appended = new ArrayList(m.length); - for (int i=0; i0) + if (n.length>0) appended.toArray(n); } // propagate event @@ -550,8 +550,8 @@ public final class MaildirFolder /** * Returns the parent folder. */ - public Folder getParent() - throws MessagingException + public Folder getParent() + throws MessagingException { return store.getFolder(maildir.getParent()); } @@ -559,12 +559,12 @@ public final class MaildirFolder /** * Returns the subfolders of this folder. */ - public Folder[] list() - throws MessagingException + public Folder[] list() + throws MessagingException { if (type!=HOLDS_FOLDERS) throw new MessagingException("This folder can't contain subfolders"); - try + try { String[] files = maildir.list(); Folder[] folders = new Folder[files.length]; @@ -573,7 +573,7 @@ public final class MaildirFolder store.getFolder(maildir.getAbsolutePath()+File.separator+files[i]); return folders; } - catch (SecurityException e) + catch (SecurityException e) { throw new MessagingException("Access denied", e); } @@ -582,12 +582,12 @@ public final class MaildirFolder /** * Returns the subfolders of this folder matching the specified pattern. */ - public Folder[] list(String pattern) - throws MessagingException + public Folder[] list(String pattern) + throws MessagingException { if (type!=HOLDS_FOLDERS) throw new MessagingException("This folder can't contain subfolders"); - try + try { String[] files = maildir.list(new MaildirListFilter(pattern)); Folder[] folders = new Folder[files.length]; @@ -595,8 +595,8 @@ public final class MaildirFolder folders[i] = store.getFolder(maildir.getAbsolutePath()+File.separator+files[i]); return folders; - } - catch (SecurityException e) + } + catch (SecurityException e) { throw new MessagingException("Access denied", e); } @@ -605,8 +605,8 @@ public final class MaildirFolder /** * Returns the separator character. */ - public char getSeparator() - throws MessagingException + public char getSeparator() + throws MessagingException { return File.separatorChar; } @@ -614,15 +614,15 @@ public final class MaildirFolder /** * Creates this folder in the store. */ - public boolean create(int type) - throws MessagingException + public boolean create(int type) + throws MessagingException { if (maildir.exists()) throw new MessagingException("Folder already exists"); - switch (type) + switch (type) { case HOLDS_FOLDERS: - try + try { if (!maildir.mkdirs()) return false; @@ -630,15 +630,15 @@ public final class MaildirFolder notifyFolderListeners(FolderEvent.CREATED); return true; } - catch (SecurityException e) + catch (SecurityException e) { throw new MessagingException("Access denied", e); } case HOLDS_MESSAGES: - try + try { boolean success = true; - synchronized (this) + synchronized (this) { success = success && maildir.mkdirs(); success = success && tmpdir.mkdirs(); @@ -650,8 +650,8 @@ public final class MaildirFolder this.type = type; notifyFolderListeners(FolderEvent.CREATED); return true; - } - catch (SecurityException e) + } + catch (SecurityException e) { throw new MessagingException("Access denied", e); } @@ -662,14 +662,14 @@ public final class MaildirFolder /** * Deletes this folder. */ - public boolean delete(boolean recurse) - throws MessagingException + public boolean delete(boolean recurse) + throws MessagingException { - if (recurse) + if (recurse) { - try + try { - if (type==HOLDS_FOLDERS) + if (type==HOLDS_FOLDERS) { Folder[] folders = list(); for (int i=0; i0) @@ -700,8 +700,8 @@ public final class MaildirFolder return false; notifyFolderListeners(FolderEvent.DELETED); return true; - } - catch (SecurityException e) + } + catch (SecurityException e) { throw new MessagingException("Access denied", e); } @@ -729,23 +729,23 @@ public final class MaildirFolder /** * Renames this folder. */ - public boolean renameTo(Folder folder) - throws MessagingException + public boolean renameTo(Folder folder) + throws MessagingException { - try + try { String filename = folder.getFullName(); - if (filename!=null) + if (filename!=null) { if (!maildir.renameTo(new File(filename))) return false; notifyFolderRenamedListeners(folder); return true; - } + } else throw new MessagingException("Illegal filename: null"); - } - catch (SecurityException e) + } + catch (SecurityException e) { throw new MessagingException("Access denied", e); } @@ -754,8 +754,8 @@ public final class MaildirFolder /** * Returns the subfolder of this folder with the specified name. */ - public Folder getFolder(String filename) - throws MessagingException + public Folder getFolder(String filename) + throws MessagingException { if (INBOX.equalsIgnoreCase(filename)) { @@ -782,7 +782,7 @@ public final class MaildirFolder { return name.length()>0 && name.charAt(0)!=0x2e; } - + } /** @@ -790,7 +790,7 @@ public final class MaildirFolder */ static class MaildirTuple { - + File dir; long timestamp = 0L; MaildirMessage[] messages = null; @@ -799,36 +799,36 @@ public final class MaildirFolder { this.dir = dir; } - + } /** * Filename filter for listing subfolders. */ - class MaildirListFilter - implements FilenameFilter + class MaildirListFilter + implements FilenameFilter { String pattern; int asteriskIndex, percentIndex; - - MaildirListFilter(String pattern) + + MaildirListFilter(String pattern) { this.pattern = pattern; asteriskIndex = pattern.indexOf('*'); percentIndex = pattern.indexOf('%'); } - - public boolean accept(File directory, String name) + + public boolean accept(File directory, String name) { - if (asteriskIndex>-1) + if (asteriskIndex>-1) { String start = pattern.substring(0, asteriskIndex); String end = pattern.substring(asteriskIndex+1, pattern.length()); return (name.startsWith(start) && name.endsWith(end)); - } - else if (percentIndex>-1) + } + else if (percentIndex>-1) { String start = pattern.substring(0, percentIndex); String end = pattern.substring(percentIndex+1, pattern.length()); @@ -839,5 +839,5 @@ public final class MaildirFolder return name.equals(pattern); } } - + } Index: source/gnu/mail/providers/maildir/MaildirMessage.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/maildir/MaildirMessage.java,v retrieving revision 1.4 diff -u -p -r1.4 MaildirMessage.java --- source/gnu/mail/providers/maildir/MaildirMessage.java 25 Aug 2005 12:31:15 -0000 1.4 +++ source/gnu/mail/providers/maildir/MaildirMessage.java 21 Nov 2007 05:09:58 -0000 @@ -1,23 +1,23 @@ /* * MaildirMessage.java * Copyright(C) 2003 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -44,8 +44,8 @@ import gnu.mail.providers.ReadOnlyMessag * * @author Chris Burdess */ -public final class MaildirMessage - extends ReadOnlyMessage +public final class MaildirMessage + extends ReadOnlyMessage { /** @@ -67,12 +67,12 @@ public final class MaildirMessage * Creates a Maildir message. * This is called by the MaildirFolder. */ - MaildirMessage(MaildirFolder folder, + MaildirMessage(MaildirFolder folder, File file, String uniq, String info, int msgnum) - throws MessagingException + throws MessagingException { super(folder, msgnum); this.file = file; @@ -115,8 +115,8 @@ public final class MaildirMessage */ MaildirMessage(MaildirFolder folder, MimeMessage message, - int msgnum) - throws MessagingException + int msgnum) + throws MessagingException { super(message); this.folder = folder; @@ -130,12 +130,12 @@ public final class MaildirMessage { super.setExpunged(expunged); } - - /** + + /** * Set the specified flags(reflected in the info field). */ public synchronized void setFlags(Flags flag, boolean set) - throws MessagingException + throws MessagingException { if (set) flags.add(flag); @@ -152,12 +152,12 @@ public final class MaildirMessage { return uniq; } - + /** * Returns an info field based on the current flags. */ - String getInfo() - throws MessagingException + String getInfo() + throws MessagingException { return getInfo(flags); } @@ -249,7 +249,7 @@ public final class MaildirMessage fetchHeaders(); return super.getAllHeaders(); } - + public Enumeration getAllHeaderLines() throws MessagingException { @@ -257,7 +257,7 @@ public final class MaildirMessage fetchHeaders(); return super.getAllHeaderLines(); } - + public Enumeration getMatchingHeaders(String[] names) throws MessagingException { @@ -265,7 +265,7 @@ public final class MaildirMessage fetchHeaders(); return super.getMatchingHeaders(names); } - + public Enumeration getMatchingHeaderLines(String[] names) throws MessagingException { @@ -273,7 +273,7 @@ public final class MaildirMessage fetchHeaders(); return super.getMatchingHeaderLines(names); } - + public Enumeration getNonMatchingHeaders(String[] names) throws MessagingException { @@ -310,9 +310,9 @@ public final class MaildirMessage // -- Utility methods -- - public boolean equals(Object other) + public boolean equals(Object other) { - if (other instanceof MimeMessage) + if (other instanceof MimeMessage) { MimeMessage message = (MimeMessage)other; return (message.getFolder()==getFolder() && Index: source/gnu/mail/providers/maildir/MaildirStore.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/maildir/MaildirStore.java,v retrieving revision 1.5 diff -u -p -r1.5 MaildirStore.java --- source/gnu/mail/providers/maildir/MaildirStore.java 25 Nov 2005 19:52:02 -0000 1.5 +++ source/gnu/mail/providers/maildir/MaildirStore.java 21 Nov 2007 05:09:58 -0000 @@ -1,23 +1,23 @@ /* * MaildirStore.java * Copyright (C) 2003, 2005 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -51,8 +51,8 @@ import gnu.mail.treeutil.StatusSource; * * @author Chris Burdess */ -public final class MaildirStore - extends Store +public final class MaildirStore + extends Store implements StatusSource { @@ -62,13 +62,13 @@ public final class MaildirStore static final Level MAILDIR_TRACE = new TraceLevel("maildir"); private static final char separatorChar = '/'; - + private List statusListeners = new ArrayList(); - + /** * Constructor. */ - public MaildirStore(Session session, URLName urlname) + public MaildirStore(Session session, URLName urlname) { super(session, urlname); if (session.getDebug()) @@ -76,16 +76,16 @@ public final class MaildirStore logger.setLevel(MAILDIR_TRACE); } } - + /** * There isn't a protocol to implement, so this method just returns. */ protected boolean protocolConnect( - String host, - int port, + String host, + int port, String username, - String password) - throws MessagingException + String password) + throws MessagingException { return true; } @@ -93,15 +93,15 @@ public final class MaildirStore /** * Returns the default folder. */ - public Folder getDefaultFolder() - throws MessagingException + public Folder getDefaultFolder() + throws MessagingException { // If the url used to contruct the store references a file directly, // return this file. - if (url!=null) + if (url!=null) { String file = url.getFile(); - if (file!=null && file.length()>0) + if (file!=null && file.length()>0) return getFolder(file); } // Otherwise attempt to return a sensible root folder. @@ -113,8 +113,8 @@ public final class MaildirStore home = System.getProperty("user.home"); if (!exists(home)) home = null; - } - catch (SecurityException e) + } + catch (SecurityException e) { log("access denied reading system properties"); } @@ -126,25 +126,25 @@ public final class MaildirStore /** * Returns the folder with the specified filename. */ - public Folder getFolder(String filename) + public Folder getFolder(String filename) throws MessagingException { boolean inbox = false; - if ("inbox".equalsIgnoreCase(filename)) + if ("inbox".equalsIgnoreCase(filename)) { // First try the session property mail.mbox.inbox. String maildir = session.getProperty("mail.maildir.maildir"); if (!isMaildir(maildir)) { // Try some common(UNIX) locations. - try + try { String userhome = System.getProperty("user.home"); maildir = userhome+"/Maildir"; if (!isMaildir(maildir)) maildir = null; - } - catch (SecurityException e) + } + catch (SecurityException e) { // not allowed to read system properties log("unable to access system properties"); @@ -204,8 +204,8 @@ public final class MaildirStore /** * Returns the folder specified by the filename of the URLName. */ - public Folder getFolder(URLName urlname) - throws MessagingException + public Folder getFolder(URLName urlname) + throws MessagingException { try { @@ -217,8 +217,8 @@ public final class MaildirStore throw new MessagingException(e.getMessage(), e); } } - - Session getSession() + + Session getSession() { return session; } @@ -240,22 +240,22 @@ public final class MaildirStore * @param l the status listener * @see #removeStatusListener */ - public void addStatusListener(StatusListener l) + public void addStatusListener(StatusListener l) { - synchronized (statusListeners) + synchronized (statusListeners) { statusListeners.add(l); } } - + /** * Removes a status listener from this store. * @param l the status listener * @see #addStatusListener */ - public void removeStatusListener(StatusListener l) + public void removeStatusListener(StatusListener l) { - synchronized (statusListeners) + synchronized (statusListeners) { statusListeners.remove(l); } @@ -266,15 +266,15 @@ public final class MaildirStore * This dispatches the event to all the registered listeners. * @param event the status event */ - protected void processStatusEvent(StatusEvent event) + protected void processStatusEvent(StatusEvent event) { StatusListener[] listeners; - synchronized (statusListeners) + synchronized (statusListeners) { listeners = new StatusListener[statusListeners.size()]; statusListeners.toArray(listeners); } - switch (event.getType()) + switch (event.getType()) { case StatusEvent.OPERATION_START: for (int i=0; i - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. * This exception does not however invalidate any other reasons why the * executable file might be covered by the GNU General Public License. - * + * * Contributor(s): Daniel Thor Kristjan * close and expunge clarification. * Sverre Huseby gzipped mailboxes @@ -71,22 +71,22 @@ import gnu.mail.treeutil.StatusEvent; * * @author Chris Burdess */ -public class MboxFolder - extends Folder +public class MboxFolder + extends Folder { static final DateFormat df = new SimpleDateFormat("EEE MMM d H:m:s yyyy"); static final String GNU_MESSAGE_ID = "X-GNU-Message-Id"; static final String FROM = "From "; - + final File file; final boolean inbox; MboxMessage[] messages; boolean open; boolean readOnly; - + Flags permanentFlags = null; - + /** * Constructor. */ @@ -99,22 +99,22 @@ public class MboxFolder readOnly = true; messages = new MboxMessage[0]; } - + /** * Returns the name of this folder. */ - public String getName() + public String getName() { return inbox ? "INBOX" : file.getName(); } - + /** * Returns the full name of this folder. * If the folder resides under the root hierarchy of this Store, the * returned name is relative to the root. Otherwise an absolute name, * starting with the hierarchy delimiter, is returned. */ - public String getFullName() + public String getFullName() { MboxStore s = (MboxStore) store; File f = file; @@ -161,8 +161,8 @@ public class MboxFolder * Returns the type of this folder. * @exception MessagingException if a messaging error occurred */ - public int getType() - throws MessagingException + public int getType() + throws MessagingException { if (file.exists()) { @@ -175,8 +175,8 @@ public class MboxFolder * Indicates whether this folder exists. * @exception MessagingException if a messaging error occurred */ - public boolean exists() - throws MessagingException + public boolean exists() + throws MessagingException { return file.exists(); } @@ -185,8 +185,8 @@ public class MboxFolder * Indicates whether this folder contains new messages. * @exception MessagingException if a messaging error occurred */ - public boolean hasNewMessages() - throws MessagingException + public boolean hasNewMessages() + throws MessagingException { return getNewMessageCount() > 0; } @@ -197,11 +197,11 @@ public class MboxFolder * mbox. If this fails a MessagingException is thrown. * @exception MessagingException if a messaging error occurred */ - public void open(int mode) - throws MessagingException + public void open(int mode) + throws MessagingException { String filename = file.getPath(); - if (mode == READ_WRITE) + if (mode == READ_WRITE) { if (!file.canWrite()) { @@ -220,28 +220,28 @@ public class MboxFolder } LineInputStream in = null; - try + try { // Read messages MboxStore mstore = (MboxStore) this.store; mstore.log("reading " + filename); - + List acc = new ArrayList(256); in = new LineInputStream(getInputStream()); int count = 1; String line, fromLine = null; ByteArrayOutputStream buf = null; - + // notify listeners StatusEvent event; event = new StatusEvent(mstore, StatusEvent.OPERATION_START, "open"); mstore.processStatusEvent(event); - - for (line = in.readLine(); line != null; line = in.readLine()) + + for (line = in.readLine(); line != null; line = in.readLine()) { - if (line.indexOf(FROM) == 0) + if (line.indexOf(FROM) == 0) { if (buf != null) { @@ -250,7 +250,7 @@ public class MboxFolder MboxMessage m = new MboxMessage(this, fromLine, bin, count++); acc.add(m); - + event = new StatusEvent(mstore, StatusEvent.OPERATION_UPDATE, "open", @@ -275,7 +275,7 @@ public class MboxFolder ByteArrayInputStream bin = new ByteArrayInputStream(bytes); MboxMessage m = new MboxMessage(this, fromLine, bin, count++); acc.add(m); - + event = new StatusEvent(mstore, StatusEvent.OPERATION_UPDATE, "open", @@ -288,17 +288,17 @@ public class MboxFolder acc.toArray(messages); buf = null; acc = null; - + event = new StatusEvent(mstore, StatusEvent.OPERATION_END, "open"); mstore.processStatusEvent(event); - + // OK open = true; notifyConnectionListeners(ConnectionEvent.OPENED); } - catch (IOException e) + catch (IOException e) { throw new MessagingException("Unable to open folder: " + filename, e); } @@ -347,42 +347,42 @@ public class MboxFolder } return line; } - + /** * Closes this folder. * @param expunge if the folder is to be expunged before it is closed * @exception MessagingException if a messaging error occurred */ - public void close(boolean expunge) - throws MessagingException + public void close(boolean expunge) + throws MessagingException { - if (open) + if (open) { if (expunge) { expunge(); } - + if (!readOnly) { // Save messages MboxStore mstore = (MboxStore) this.store; StatusEvent event; mstore.log("saving " + file.getAbsolutePath()); - synchronized (this) + synchronized (this) { OutputStream os = null; - try + try { os = getOutputStream(); BufferedOutputStream bos = new BufferedOutputStream(os); MboxOutputStream mos = new MboxOutputStream(bos); - + event = new StatusEvent(mstore, StatusEvent.OPERATION_START, "close"); mstore.processStatusEvent(event); - for (int i = 0; i < messages.length; i++) + for (int i = 0; i < messages.length; i++) { String fromLine = fromLine(messages[i]); bos.write(fromLine.getBytes()); @@ -390,7 +390,7 @@ public class MboxFolder bos.flush(); messages[i].writeTo(mos); mos.flush(); - + event = new StatusEvent(mstore, StatusEvent.OPERATION_UPDATE, "close", @@ -399,13 +399,13 @@ public class MboxFolder i + 1); mstore.processStatusEvent(event); } - + event = new StatusEvent(mstore, StatusEvent.OPERATION_END, "close"); mstore.processStatusEvent(event); - } - catch (IOException e) + } + catch (IOException e) { throw new MessagingException("I/O error writing mailbox", e); @@ -431,7 +431,7 @@ public class MboxFolder mstore.log("unable to clear up lock file!"); } } - + open = false; messages = new MboxMessage[0]; // release memory notifyConnectionListeners(ConnectionEvent.CLOSED); @@ -451,12 +451,12 @@ public class MboxFolder if (fromLine == null) { StringBuffer buf = new StringBuffer("From "); - + String from = "-"; try { Address[] f = message.getFrom(); - if (f != null && f.length > 0) + if (f != null && f.length > 0) { if (f[0] instanceof InternetAddress) { @@ -474,7 +474,7 @@ public class MboxFolder } buf.append(from); buf.append(' '); - + Date date = message.getSentDate(); if (date==null) { @@ -485,28 +485,28 @@ public class MboxFolder date = new Date(); } buf.append(df.format(date)); - + fromLine = buf.toString(); } return fromLine; } - + /** * Expunges this folder. * This deletes all the messages marked as deleted. * @exception MessagingException if a messaging error occurred */ - public Message[] expunge() - throws MessagingException + public Message[] expunge() + throws MessagingException { Message[] expunged; synchronized (this) { List elist = new ArrayList(); - if (open) + if (open) { List mlist = new ArrayList(); - for (int i=0; i= messages.length) @@ -583,37 +583,37 @@ public class MboxFolder } return messages[index]; } - + /** * Returns the messages in this folder. * @exception MessagingException if a messaging error occurred */ - public synchronized Message[] getMessages() - throws MessagingException + public synchronized Message[] getMessages() + throws MessagingException { // Return a copy of the message array Message[] m = new Message[messages.length]; System.arraycopy(messages, 0, m, 0, messages.length); return m; } - + /** * Appends messages to this folder. * Only MimeMessages within the array will be appended, as we don't know * how to retrieve internet content for other kinds. * @param m an array of messages to be appended */ - public synchronized void appendMessages(Message[] m) - throws MessagingException + public synchronized void appendMessages(Message[] m) + throws MessagingException { MboxMessage[] n; synchronized (this) { List appended = new ArrayList(m.length); int count = messages.length; - for (int i = 0; i < m.length; i++) + for (int i = 0; i < m.length; i++) { - if (m[i] instanceof MimeMessage) + if (m[i] instanceof MimeMessage) { MimeMessage mimem = (MimeMessage) m[i]; MboxMessage mboxm = new MboxMessage(this, mimem, count++); @@ -625,7 +625,7 @@ public class MboxFolder } } n = new MboxMessage[appended.size()]; - if (n.length>0) + if (n.length>0) { appended.toArray(n); // copy into the messages array @@ -647,8 +647,8 @@ public class MboxFolder /** * Returns the parent folder. */ - public Folder getParent() - throws MessagingException + public Folder getParent() + throws MessagingException { if (inbox) { @@ -665,14 +665,14 @@ public class MboxFolder /** * Returns the subfolders of this folder. */ - public Folder[] list() - throws MessagingException + public Folder[] list() + throws MessagingException { if (getType() != HOLDS_FOLDERS) { throw new MessagingException("This folder can't contain subfolders"); } - try + try { File[] files = file.listFiles(); Folder[] folders = new Folder[files.length]; @@ -682,7 +682,7 @@ public class MboxFolder } return folders; } - catch (SecurityException e) + catch (SecurityException e) { throw new MessagingException("Access denied", e); } @@ -691,14 +691,14 @@ public class MboxFolder /** * Returns the subfolders of this folder matching the specified pattern. */ - public Folder[] list(String pattern) - throws MessagingException + public Folder[] list(String pattern) + throws MessagingException { if (getType() != HOLDS_FOLDERS) { throw new MessagingException("This folder can't contain subfolders"); } - try + try { File[] files = file.listFiles(new MboxFilenameFilter(pattern)); Folder[] folders = new Folder[files.length]; @@ -707,8 +707,8 @@ public class MboxFolder folders[i] = new MboxFolder(store, files[i], false); } return folders; - } - catch (SecurityException e) + } + catch (SecurityException e) { throw new MessagingException("Access denied", e); } @@ -717,8 +717,8 @@ public class MboxFolder /** * Returns the separator character. */ - public char getSeparator() - throws MessagingException + public char getSeparator() + throws MessagingException { return File.separatorChar; } @@ -726,17 +726,17 @@ public class MboxFolder /** * Creates this folder in the store. */ - public boolean create(int type) - throws MessagingException + public boolean create(int type) + throws MessagingException { if (file.exists()) { throw new MessagingException("Folder already exists"); } - switch (type) + switch (type) { case HOLDS_FOLDERS: - try + try { if (!file.mkdirs()) { @@ -745,12 +745,12 @@ public class MboxFolder notifyFolderListeners(FolderEvent.CREATED); return true; } - catch (SecurityException e) + catch (SecurityException e) { throw new MessagingException("Access denied", e); } case HOLDS_MESSAGES: - try + try { File parent = file.getParentFile(); if (!parent.exists()) @@ -760,18 +760,18 @@ public class MboxFolder return false; } } - synchronized (this) + synchronized (this) { createNewFile(file); } notifyFolderListeners(FolderEvent.CREATED); return true; - } - catch (IOException e) + } + catch (IOException e) { throw new MessagingException("I/O error writing mailbox", e); } - catch (SecurityException e) + catch (SecurityException e) { throw new MessagingException("Access denied", e); } @@ -782,14 +782,14 @@ public class MboxFolder /** * Deletes this folder. */ - public boolean delete(boolean recurse) - throws MessagingException + public boolean delete(boolean recurse) + throws MessagingException { - if (recurse) + if (recurse) { - try + try { - if (file.isDirectory()) + if (file.isDirectory()) { Folder[] folders = list(); for (int i = 0; i < folders.length; i++) @@ -810,15 +810,15 @@ public class MboxFolder } notifyFolderListeners(FolderEvent.DELETED); return true; - } - catch (SecurityException e) + } + catch (SecurityException e) { throw new MessagingException("Access denied", e); } - } - else + } + else { - try + try { if (file.isDirectory()) { @@ -838,19 +838,19 @@ public class MboxFolder } notifyFolderListeners(FolderEvent.DELETED); return true; - } - catch (SecurityException e) + } + catch (SecurityException e) { throw new MessagingException("Access denied", e); } } } - + /** * Renames this folder. */ - public boolean renameTo(Folder folder) - throws MessagingException + public boolean renameTo(Folder folder) + throws MessagingException { if (folder instanceof MboxFolder) { @@ -861,7 +861,7 @@ public class MboxFolder } notifyFolderRenamedListeners(folder); return true; - } + } else { throw new MessagingException("Target not an MboxFolder"); @@ -872,7 +872,7 @@ public class MboxFolder * Returns the subfolder of this folder with the specified name. */ public Folder getFolder(String name) - throws MessagingException + throws MessagingException { if (!file.isDirectory()) { @@ -891,7 +891,7 @@ public class MboxFolder * Checks if the current file is or is supposed to be * compressed. Uses the filename to figure it out. */ - private boolean isGzip() + private boolean isGzip() { return file.getName().toLowerCase().endsWith(".gz"); } @@ -900,8 +900,8 @@ public class MboxFolder * Creates an input stream that possibly will decompress the * file contents. */ - private InputStream getInputStream() - throws IOException + private InputStream getInputStream() + throws IOException { InputStream in = new FileInputStream(file); if (isGzip()) @@ -915,8 +915,8 @@ public class MboxFolder * Creates an output stream that possibly will compress * whatever is sent to it, based on the current filename. */ - private OutputStream getOutputStream() - throws IOException + private OutputStream getOutputStream() + throws IOException { OutputStream out = new FileOutputStream(file); if (isGzip()) @@ -925,7 +925,7 @@ public class MboxFolder } return out; } - + /** * Locks this mailbox. * This uses a dotlock-like mechanism - see createNewFile(). @@ -933,7 +933,7 @@ public class MboxFolder * folder is not writable, we will not be able to open the mbox for * writing either. */ - public synchronized boolean acquireLock() + public synchronized boolean acquireLock() { MboxStore mstore = (MboxStore) store; try @@ -981,13 +981,13 @@ public class MboxFolder out.flush(); out.close(); } - + /** * Unlocks this mailbox. * This deletes any associated lockfile if it exists. It returns false if * an existing lockfile could not be deleted. */ - public synchronized boolean releaseLock() + public synchronized boolean releaseLock() { MboxStore mstore = (MboxStore) store; try @@ -1012,31 +1012,31 @@ public class MboxFolder return false; } - class MboxFilenameFilter - implements FileFilter + class MboxFilenameFilter + implements FileFilter { String pattern; int asteriskIndex, percentIndex; - - MboxFilenameFilter(String pattern) + + MboxFilenameFilter(String pattern) { this.pattern = pattern; asteriskIndex = pattern.indexOf('*'); percentIndex = pattern.indexOf('%'); } - - public boolean accept(File f) + + public boolean accept(File f) { String name = f.getName(); - if (asteriskIndex > -1) + if (asteriskIndex > -1) { String start = pattern.substring(0, asteriskIndex); String end = pattern.substring(asteriskIndex + 1, pattern.length()); return (name.startsWith(start) && name.endsWith(end)); - } - else if (percentIndex > -1) + } + else if (percentIndex > -1) { String start = pattern.substring(0, percentIndex); String end = pattern.substring(percentIndex + 1, pattern.length()); @@ -1048,5 +1048,5 @@ public class MboxFolder return name.equals(pattern); } } - + } Index: source/gnu/mail/providers/mbox/MboxMessage.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/mbox/MboxMessage.java,v retrieving revision 1.11 diff -u -p -r1.11 MboxMessage.java --- source/gnu/mail/providers/mbox/MboxMessage.java 25 Aug 2005 12:31:15 -0000 1.11 +++ source/gnu/mail/providers/mbox/MboxMessage.java 21 Nov 2007 05:09:58 -0000 @@ -1,23 +1,23 @@ /* * MboxMessage.java * Copyright(C) 1999 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -39,8 +39,8 @@ import gnu.mail.providers.ReadOnlyMessag * * @author Chris Burdess */ -public class MboxMessage - extends ReadOnlyMessage +public class MboxMessage + extends ReadOnlyMessage { /** @@ -48,7 +48,7 @@ public class MboxMessage * This keeps the mbox flags. */ protected static final String STATUS = "Status"; - + /** * The From_ line associated with this message. * We will preserve this if possible. @@ -59,11 +59,11 @@ public class MboxMessage * Creates a Mbox message. * This is called by the MboxStore. */ - protected MboxMessage(MboxFolder folder, + protected MboxMessage(MboxFolder folder, String fromLine, InputStream in, int msgnum) - throws MessagingException + throws MessagingException { super(folder, in, msgnum); this.fromLine = fromLine; @@ -77,8 +77,8 @@ public class MboxMessage */ protected MboxMessage(MboxFolder folder, MimeMessage message, - int msgnum) - throws MessagingException + int msgnum) + throws MessagingException { super(message); this.folder = folder; @@ -93,12 +93,12 @@ public class MboxMessage { super.setExpunged(expunged); } - - /** + + /** * Set the specified flags(reflected in the Status header). */ public synchronized void setFlags(Flags flag, boolean set) - throws MessagingException + throws MessagingException { if (set) { @@ -109,12 +109,12 @@ public class MboxMessage flags.remove(flag); } } - + /** * Updates the status header from the current flags. */ - protected void updateHeaders() - throws MessagingException + protected void updateHeaders() + throws MessagingException { super.updateHeaders(); @@ -151,11 +151,11 @@ public class MboxMessage /** * Reads the associated flags from the status header. */ - private void readStatusHeader() - throws MessagingException + private void readStatusHeader() + throws MessagingException { String[] currentStatus = this.getHeader(STATUS); - if (currentStatus != null && currentStatus.length > 0) + if (currentStatus != null && currentStatus.length > 0) { flags = new Flags(); if (currentStatus[0].indexOf('R') >= 0) @@ -179,9 +179,9 @@ public class MboxMessage // -- Utility methods -- - public boolean equals(Object other) + public boolean equals(Object other) { - if (other instanceof MimeMessage) + if (other instanceof MimeMessage) { MimeMessage message = (MimeMessage) other; return (message.getFolder() == getFolder() && Index: source/gnu/mail/providers/mbox/MboxOutputStream.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/mbox/MboxOutputStream.java,v retrieving revision 1.9 diff -u -p -r1.9 MboxOutputStream.java --- source/gnu/mail/providers/mbox/MboxOutputStream.java 25 Aug 2005 12:31:15 -0000 1.9 +++ source/gnu/mail/providers/mbox/MboxOutputStream.java 21 Nov 2007 05:09:58 -0000 @@ -1,23 +1,23 @@ /* * MboxOutputStream.java * Copyright(C) 1999 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -38,19 +38,19 @@ import java.io.OutputStream; * * @author Chris Burdess */ -class MboxOutputStream - extends FilterOutputStream +class MboxOutputStream + extends FilterOutputStream { private static byte KET = 62; /** - * The buffer where the current line is stored. + * The buffer where the current line is stored. */ protected byte buf[]; /** - * The number of valid bytes in the buffer. + * The number of valid bytes in the buffer. */ protected int count = 0; @@ -58,7 +58,7 @@ class MboxOutputStream * Constructs an mbox From_-escaping output stream with a buffer size of * 1024 bytes. */ - public MboxOutputStream(OutputStream out) + public MboxOutputStream(OutputStream out) { this(out, 4096); } @@ -68,7 +68,7 @@ class MboxOutputStream * buffer size. * @param len the buffer size */ - public MboxOutputStream(OutputStream out, int len) + public MboxOutputStream(OutputStream out, int len) { super(out); buf = new byte[len]; @@ -77,19 +77,19 @@ class MboxOutputStream /** * Flush the internal buffer. */ - protected void validateAndFlushBuffer() - throws IOException + protected void validateAndFlushBuffer() + throws IOException { - if (count > 0) + if (count > 0) { boolean done = false; - for (int i=0; ilen bytes from the specified byte array + * Writes len bytes from the specified byte array * starting at offset off to this output stream. */ - public synchronized void write(byte b[], int off, int len) - throws IOException + public synchronized void write(byte b[], int off, int len) + throws IOException { // strip any CRs in the byte array - for (int i=off; ibuf.length) + if (b[i]=='\n' || i-off>buf.length) { int cl = (i-off>buf.length) ? buf.length : i-off; System.arraycopy(b, off, buf, count, cl); @@ -167,11 +167,11 @@ class MboxOutputStream /** * Flushes this output stream. */ - public synchronized void flush() - throws IOException + public synchronized void flush() + throws IOException { validateAndFlushBuffer(); out.flush(); } - + } Index: source/gnu/mail/providers/mbox/MboxStore.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/mbox/MboxStore.java,v retrieving revision 1.23 diff -u -p -r1.23 MboxStore.java --- source/gnu/mail/providers/mbox/MboxStore.java 25 Aug 2005 12:31:15 -0000 1.23 +++ source/gnu/mail/providers/mbox/MboxStore.java 21 Nov 2007 05:09:58 -0000 @@ -1,23 +1,23 @@ /* * MboxStore.java * Copyright(C) 1999,2005 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -54,8 +54,8 @@ import gnu.mail.treeutil.StatusSource; * * @author Chris Burdess */ -public final class MboxStore - extends Store +public final class MboxStore + extends Store implements StatusSource { @@ -65,24 +65,24 @@ public final class MboxStore static final Level MBOX_TRACE = new TraceLevel("mbox"); private static final char separatorChar = '/'; - + static boolean attemptFallback = true; /** * File representing the root of this store's hierarchy. */ File root; - + private List statusListeners = new ArrayList(); - + /** * Constructor. */ - public MboxStore(Session session, URLName urlname) + public MboxStore(Session session, URLName urlname) { super(session, urlname); String af = session.getProperty("mail.mbox.attemptfallback"); - if (af != null) + if (af != null) { attemptFallback = Boolean.valueOf(af).booleanValue(); } @@ -91,15 +91,15 @@ public final class MboxStore logger.setLevel(MBOX_TRACE); } } - + /** * There isn't a protocol to implement, so this method just returns. */ - protected boolean protocolConnect(String host, - int port, + protected boolean protocolConnect(String host, + int port, String username, - String password) - throws MessagingException + String password) + throws MessagingException { if (url != null) { @@ -107,7 +107,7 @@ public final class MboxStore if (path != null && !"".equals(path)) { path = decodeUrlPath(path); - + // Relative or Windows absolute path if (File.separatorChar != '/') { @@ -154,7 +154,7 @@ public final class MboxStore url = new URLName(url.getProtocol(), null, -1, url.getFile(), null, null); super.setURLName(url); } - + /** * Returns the default folder. */ @@ -176,8 +176,8 @@ public final class MboxStore /** * Returns the folder specified by the filename of the URLName. */ - public Folder getFolder(URLName urlname) - throws MessagingException + public Folder getFolder(URLName urlname) + throws MessagingException { String path = urlname.getFile(); if (path != null) @@ -186,7 +186,7 @@ public final class MboxStore } return getFolder(path, true); } - + private Folder getFolder(String name, boolean tryPrepend) throws MessagingException { @@ -238,7 +238,7 @@ public final class MboxStore inbox = new File(inboxname); } } - if (!inbox.exists() && attemptFallback && File.separatorChar == '/') + if (!inbox.exists() && attemptFallback && File.separatorChar == '/') { PrivilegedAction a; if (File.separatorChar == '/') @@ -265,7 +265,7 @@ public final class MboxStore return new MboxFolder(this, file, false); } - Session getSession() + Session getSession() { return session; } @@ -287,22 +287,22 @@ public final class MboxStore * @param l the status listener * @see #removeStatusListener */ - public void addStatusListener(StatusListener l) + public void addStatusListener(StatusListener l) { - synchronized (statusListeners) + synchronized (statusListeners) { statusListeners.add(l); } } - + /** * Removes a status listener from this store. * @param l the status listener * @see #addStatusListener */ - public void removeStatusListener(StatusListener l) + public void removeStatusListener(StatusListener l) { - synchronized (statusListeners) + synchronized (statusListeners) { statusListeners.remove(l); } @@ -313,15 +313,15 @@ public final class MboxStore * This dispatches the event to all the registered listeners. * @param event the status event */ - protected void processStatusEvent(StatusEvent event) + protected void processStatusEvent(StatusEvent event) { StatusListener[] listeners; - synchronized (statusListeners) + synchronized (statusListeners) { listeners = new StatusListener[statusListeners.size()]; statusListeners.toArray(listeners); } - switch (event.getType()) + switch (event.getType()) { case StatusEvent.OPERATION_START: for (int i = 0; i < listeners.length; i++) Index: source/gnu/mail/providers/nntp/ListFolderListener.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/nntp/ListFolderListener.java,v retrieving revision 1.1 diff -u -p -r1.1 ListFolderListener.java --- source/gnu/mail/providers/nntp/ListFolderListener.java 5 May 2006 16:18:48 -0000 1.1 +++ source/gnu/mail/providers/nntp/ListFolderListener.java 21 Nov 2007 05:09:58 -0000 @@ -1,23 +1,23 @@ /* * ListFolderListener.java * Copyright(C) 2006 Cedric Hyppolite - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -34,5 +34,5 @@ public interface ListFolderListener { void foundFolder(String folderName); - + } Index: source/gnu/mail/providers/nntp/NNTPFolder.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/nntp/NNTPFolder.java,v retrieving revision 1.7 diff -u -p -r1.7 NNTPFolder.java --- source/gnu/mail/providers/nntp/NNTPFolder.java 25 Aug 2005 12:31:15 -0000 1.7 +++ source/gnu/mail/providers/nntp/NNTPFolder.java 21 Nov 2007 05:09:59 -0000 @@ -1,23 +1,23 @@ /* * NNTPFolder.java * Copyright(C) 2002 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -70,7 +70,7 @@ public final class NNTPFolder boolean open; Map articleCache; // cache of article-number to NNTPMessage - + NNTPFolder(NNTPStore store, String name) { super(store); @@ -103,7 +103,7 @@ public final class NNTPFolder NNTPStore ns = (NNTPStore) store; return ns.root; } - + /** * Returns the type of this folder. * This folder type only holds messages. @@ -192,12 +192,12 @@ public final class NNTPFolder { throw new IllegalStateException(); } - + articleCache = null; open = false; notifyConnectionListeners(ConnectionEvent.CLOSED); } - + /** * Indicates whether the newsgroup is present on the server. */ @@ -272,7 +272,7 @@ public final class NNTPFolder throw new MessagingException(e.getMessage(), e); } } - + /** * Returns the number of articles in this newsgroup. */ @@ -294,7 +294,7 @@ public final class NNTPFolder { throw new IllegalStateException(); } - + // Cache lookup Integer key = new Integer(msgnum); NNTPMessage m = (NNTPMessage) articleCache.get(key); @@ -302,7 +302,7 @@ public final class NNTPFolder { return m; } - + try { NNTPStore ns = (NNTPStore) store; @@ -406,7 +406,7 @@ public final class NNTPFolder Message m = (NNTPMessage) articleCache.get(key); if (m == null) { - try + try { m = getMessageImpl(i); // Cache store Index: source/gnu/mail/providers/nntp/NNTPMessage.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/nntp/NNTPMessage.java,v retrieving revision 1.6 diff -u -p -r1.6 NNTPMessage.java --- source/gnu/mail/providers/nntp/NNTPMessage.java 25 Aug 2005 12:31:15 -0000 1.6 +++ source/gnu/mail/providers/nntp/NNTPMessage.java 21 Nov 2007 05:09:59 -0000 @@ -1,23 +1,23 @@ /* * NNTPMessage.java * Copyright(C) 2002 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -48,7 +48,7 @@ public final class NNTPMessage { String messageId; - + NNTPMessage(NNTPFolder folder, int msgnum, String messageId) Index: source/gnu/mail/providers/nntp/NNTPRootFolder.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/nntp/NNTPRootFolder.java,v retrieving revision 1.10 diff -u -p -r1.10 NNTPRootFolder.java --- source/gnu/mail/providers/nntp/NNTPRootFolder.java 5 May 2006 16:18:48 -0000 1.10 +++ source/gnu/mail/providers/nntp/NNTPRootFolder.java 21 Nov 2007 05:09:59 -0000 @@ -1,23 +1,23 @@ /* * NNTPRootFolder.java * Copyright(C) 2002, 2006 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -72,28 +72,28 @@ final public class NNTPRootFolder NNTPStore ns = (NNTPStore) store; return ns.connection.getWelcome(); } - + /** * Returns the list of folders matching the specified pattern. * @param pattern the JavaMail pattern */ - public Folder[] list(String pattern) - throws MessagingException + public Folder[] list(String pattern) + throws MessagingException { return list(pattern, null); } - + /** * Returns the list of folders matching the specified pattern. * @param listener the listener to be called as soon as a new folder is * listed */ - public Folder[] list(ListFolderListener listener) - throws MessagingException - { + public Folder[] list(ListFolderListener listener) + throws MessagingException + { return list("%", listener); } - + /** * Returns the list of folders matching the specified pattern. * @param pattern the JavaMail pattern @@ -109,7 +109,7 @@ final public class NNTPRootFolder NNTPStore ns = (NNTPStore) store; // Indicates whether to *really* list all folders. boolean listAll = ns.isListAll(); - + List acc = new LinkedList(); synchronized (ns.connection) { @@ -160,7 +160,7 @@ final public class NNTPRootFolder boolean hasWildcard = pattern.indexOf('*') >- 1; // Does the pattern contain only a wildcard? boolean onlyWildcard = hasWildcard &&(pattern.length() == 0); - + NNTPStore ns = (NNTPStore) store; List acc = new LinkedList(); Iterator i = ns.newsrc.list(); @@ -181,7 +181,7 @@ final public class NNTPRootFolder acc.toArray(folders); return folders; } - + /** * Implements a subset of wildmat matching on the client side. * This is necessary for newsgroup matching from newsrc lists. @@ -231,7 +231,7 @@ final public class NNTPRootFolder } return true; } - + /** * Returns a new Folder object associated with the specified name. */ @@ -247,7 +247,7 @@ final public class NNTPRootFolder { return null; } - + public boolean exists() throws MessagingException { @@ -271,7 +271,7 @@ final public class NNTPRootFolder { return HOLDS_FOLDERS; } - + public void open(int mode) throws MessagingException { @@ -298,7 +298,7 @@ final public class NNTPRootFolder { return false; } - + public Flags getPermanentFlags() { return new Flags(); @@ -339,13 +339,13 @@ final public class NNTPRootFolder { throw new IllegalWriteException("Folder is read-only"); } - + public boolean create(int type) throws MessagingException { throw new MessagingException("Folder already exists"); } - + public boolean delete(boolean flag) throws MessagingException { Index: source/gnu/mail/providers/nntp/NNTPStore.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/nntp/NNTPStore.java,v retrieving revision 1.16 diff -u -p -r1.16 NNTPStore.java --- source/gnu/mail/providers/nntp/NNTPStore.java 1 Jun 2007 17:09:37 -0000 1.16 +++ source/gnu/mail/providers/nntp/NNTPStore.java 21 Nov 2007 05:09:59 -0000 @@ -1,23 +1,23 @@ /* * NNTPStore.java * Copyright(C) 2002 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -72,7 +72,7 @@ public class NNTPStore extends Store * The permanent flags for NNTPFolders. */ Flags permanentFlags; - + /** * Constructor. * @param session the session @@ -180,9 +180,9 @@ public class NNTPStore extends Store logger.setLevel(NNTPConnection.NNTP_TRACE); logger.addHandler(handler); } - + connection.init(); - + if (username != null && password != null) { // TODO decide on authentication method Index: source/gnu/mail/providers/nntp/NNTPTransport.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/nntp/NNTPTransport.java,v retrieving revision 1.12 diff -u -p -r1.12 NNTPTransport.java --- source/gnu/mail/providers/nntp/NNTPTransport.java 1 Jun 2007 17:09:37 -0000 1.12 +++ source/gnu/mail/providers/nntp/NNTPTransport.java 21 Nov 2007 05:09:59 -0000 @@ -1,23 +1,23 @@ /* * NNTPTransport.java * Copyright(C) 2002 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -119,9 +119,9 @@ public class NNTPTransport extends Trans handler.setLevel(Level.ALL); connection.logger.addHandler(handler); } - + connection.init(); - + if (username != null && password != null) { // TODO decide on authentication method @@ -149,7 +149,7 @@ public class NNTPTransport extends Trans } } } - + /** * Close the connection. * @see NNTPStore#close @@ -203,7 +203,7 @@ public class NNTPTransport extends Trans throw new MessagingException("Newsgroup recipients must be "+ "specified as type NewsAddress"); } - + try { synchronized (connection) @@ -223,7 +223,7 @@ public class NNTPTransport extends Trans throw new MessagingException(e.getMessage(), e); } } - + private int getIntProperty(String key) { String value = getProperty(key); Index: source/gnu/mail/providers/pop3/POP3Folder.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/pop3/POP3Folder.java,v retrieving revision 1.14 diff -u -p -r1.14 POP3Folder.java --- source/gnu/mail/providers/pop3/POP3Folder.java 24 Jul 2006 07:50:33 -0000 1.14 +++ source/gnu/mail/providers/pop3/POP3Folder.java 21 Nov 2007 05:09:59 -0000 @@ -1,23 +1,23 @@ /* * POP3Folder.java * Copyright (C) 1999, 2003 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -50,8 +50,8 @@ import gnu.inet.pop3.POP3Connection; * @author Nic Ferrier * @version 1.3 */ -public final class POP3Folder -extends Folder +public final class POP3Folder +extends Folder { boolean readonly = false, open = false; @@ -60,11 +60,11 @@ extends Folder Folder inbox; List deleted; - + /** * Constructor. */ - protected POP3Folder(Store store, int type) + protected POP3Folder(Store store, int type) { super(store); this.type = type; @@ -73,9 +73,9 @@ extends Folder /** * Returns the name of this folder. */ - public String getName() + public String getName() { - switch (type) + switch (type) { case HOLDS_FOLDERS: return "/"; @@ -89,7 +89,7 @@ extends Folder /** * Returns the full name of this folder. */ - public String getFullName() + public String getFullName() { return getName(); } @@ -98,8 +98,8 @@ extends Folder * Returns the type of this folder. * @exception MessagingException if a messaging error occurred */ - public int getType() - throws MessagingException + public int getType() + throws MessagingException { return type; } @@ -108,8 +108,8 @@ extends Folder * Indicates whether this folder exists. * @exception MessagingException if a messaging error occurred */ - public boolean exists() - throws MessagingException + public boolean exists() + throws MessagingException { return (type == HOLDS_MESSAGES); } @@ -118,8 +118,8 @@ extends Folder * Indicates whether this folder contains new messages. * @exception MessagingException if a messaging error occurred */ - public boolean hasNewMessages() - throws MessagingException + public boolean hasNewMessages() + throws MessagingException { return getNewMessageCount() > 0; } @@ -128,8 +128,8 @@ extends Folder * Opens this folder. * @exception MessagingException if a messaging error occurred */ - public void open(int mode) - throws MessagingException + public void open(int mode) + throws MessagingException { switch (mode) { @@ -151,8 +151,8 @@ extends Folder * @param expunge if the folder is to be expunged before it is closed * @exception MessagingException if a messaging error occurred */ - public void close(boolean expunge) - throws MessagingException + public void close(boolean expunge) + throws MessagingException { if (!open) { @@ -172,8 +172,8 @@ extends Folder * This deletes all the messages marked as deleted. * @exception MessagingException if a messaging error occurred */ - public Message[] expunge() - throws MessagingException + public Message[] expunge() + throws MessagingException { if (!open) { @@ -209,7 +209,7 @@ extends Folder /** * Indicates whether this folder is open. */ - public boolean isOpen() + public boolean isOpen() { return open; } @@ -217,7 +217,7 @@ extends Folder /** * Returns the permanent flags for this folder. */ - public Flags getPermanentFlags() + public Flags getPermanentFlags() { return new Flags(); } @@ -228,8 +228,8 @@ extends Folder * count is always delivered. * @exception MessagingException if a messaging error occurred */ - public int getMessageCount() - throws MessagingException + public int getMessageCount() + throws MessagingException { POP3Connection connection = ((POP3Store) store).connection; synchronized (connection) @@ -250,8 +250,8 @@ extends Folder * @param msgnum the message number * @exception MessagingException if a messaging error occurred */ - public Message getMessage(int msgnum) - throws MessagingException + public Message getMessage(int msgnum) + throws MessagingException { if (!open) { @@ -275,8 +275,8 @@ extends Folder /** * You can't append messages to a POP3 folder. */ - public void appendMessages(Message[] messages) - throws MessagingException + public void appendMessages(Message[] messages) + throws MessagingException { throw new IllegalWriteException(); } @@ -285,8 +285,8 @@ extends Folder * Fetches headers and/or content for the specified messages. * @exception MessagingException ignore */ - public void fetch(Message[] messages, FetchProfile fp) - throws MessagingException + public void fetch(Message[] messages, FetchProfile fp) + throws MessagingException { // Determine whether to fetch headers or content boolean fetchHeaders = false; @@ -341,8 +341,8 @@ extends Folder /** * Returns the subfolders for this folder. */ - public Folder[] list() - throws MessagingException + public Folder[] list() + throws MessagingException { switch (type) { @@ -361,8 +361,8 @@ extends Folder /** * Returns the subfolders for this folder. */ - public Folder[] list(String pattern) - throws MessagingException + public Folder[] list(String pattern) + throws MessagingException { return list(); } @@ -370,8 +370,8 @@ extends Folder /** * POP3 folders can't have parents. */ - public Folder getParent() - throws MessagingException + public Folder getParent() + throws MessagingException { switch (type) { @@ -385,8 +385,8 @@ extends Folder /** * POP3 folders can't contain subfolders. */ - public Folder getFolder(String s) - throws MessagingException + public Folder getFolder(String s) + throws MessagingException { switch (type) { @@ -404,8 +404,8 @@ extends Folder /** * Returns the path separator charcter. */ - public char getSeparator() - throws MessagingException + public char getSeparator() + throws MessagingException { return '\u0000'; } @@ -415,8 +415,8 @@ extends Folder /** * POP3 folders can't be created, deleted, or renamed. */ - public boolean create(int i) - throws MessagingException + public boolean create(int i) + throws MessagingException { throw new IllegalWriteException(); } @@ -424,8 +424,8 @@ extends Folder /** * POP3 folders can't be created, deleted, or renamed. */ - public boolean delete(boolean flag) - throws MessagingException + public boolean delete(boolean flag) + throws MessagingException { throw new IllegalWriteException("Folder can't be deleted"); } @@ -433,8 +433,8 @@ extends Folder /** * POP3 folders can't be created, deleted, or renamed. */ - public boolean renameTo(Folder folder) - throws MessagingException + public boolean renameTo(Folder folder) + throws MessagingException { throw new IllegalWriteException("Folder can't be renamed"); } Index: source/gnu/mail/providers/pop3/POP3Message.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/pop3/POP3Message.java,v retrieving revision 1.12 diff -u -p -r1.12 POP3Message.java --- source/gnu/mail/providers/pop3/POP3Message.java 25 Aug 2005 12:31:15 -0000 1.12 +++ source/gnu/mail/providers/pop3/POP3Message.java 21 Nov 2007 05:09:59 -0000 @@ -1,23 +1,23 @@ /* * POP3Message.java * Copyright(C) 1999, 2003 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -48,8 +48,8 @@ import gnu.mail.providers.ReadOnlyMessag * @author Nic Ferrier * @version 1.2 */ -public final class POP3Message -extends ReadOnlyMessage +public final class POP3Message +extends ReadOnlyMessage { /* @@ -68,8 +68,8 @@ extends ReadOnlyMessage * @param msgnum the message number * @param size the size of the entire message */ - POP3Message(POP3Folder folder, int msgnum, int size) - throws MessagingException + POP3Message(POP3Folder folder, int msgnum, int size) + throws MessagingException { super(folder, msgnum); this.size = size; @@ -77,12 +77,12 @@ extends ReadOnlyMessage // -- Content -- - /** + /** * Retrieves the content of the message. * This uses the POP3Store to do the retrieval. */ - void fetchContent() - throws MessagingException + void fetchContent() + throws MessagingException { if (content != null) { @@ -108,11 +108,11 @@ extends ReadOnlyMessage } } } - - /** + + /** * Causes the content to be read in. */ - public DataHandler getDataHandler() + public DataHandler getDataHandler() throws MessagingException { if (content == null) @@ -122,11 +122,11 @@ extends ReadOnlyMessage return super.getDataHandler(); } - /** + /** * Causes the content to be read in. */ - protected InputStream getContentStream() - throws MessagingException + protected InputStream getContentStream() + throws MessagingException { if (content == null) { @@ -135,12 +135,12 @@ extends ReadOnlyMessage return super.getContentStream(); } - /** + /** * Gets the size of the message. * Uses the cached size if it's available to us. */ - public int getSize() - throws MessagingException + public int getSize() + throws MessagingException { if (size > -1) { @@ -155,11 +155,11 @@ extends ReadOnlyMessage // -- Headers -- - /** + /** * Causes the headers to be read. */ - void fetchHeaders() - throws MessagingException + void fetchHeaders() + throws MessagingException { if (headers != null) { @@ -185,12 +185,12 @@ extends ReadOnlyMessage } } } - + /** * Causes the headers to be read. */ - public String[] getHeader(String name) - throws MessagingException + public String[] getHeader(String name) + throws MessagingException { if (headers == null) { @@ -198,12 +198,12 @@ extends ReadOnlyMessage } return super.getHeader(name); } - + /** * Causes the headers to be read. */ - public String getHeader(String name, String delimiter) - throws MessagingException + public String getHeader(String name, String delimiter) + throws MessagingException { if (headers == null) { @@ -212,11 +212,11 @@ extends ReadOnlyMessage return super.getHeader(name, delimiter); } - /** + /** * Causes the headers to be read. */ - public Enumeration getAllHeaders() - throws MessagingException + public Enumeration getAllHeaders() + throws MessagingException { if (headers == null) { @@ -225,11 +225,11 @@ extends ReadOnlyMessage return super.getAllHeaders(); } - /** + /** * Causes the headers to be read. */ - public Enumeration getAllHeaderLines() - throws MessagingException + public Enumeration getAllHeaderLines() + throws MessagingException { if (headers == null) { @@ -238,11 +238,11 @@ extends ReadOnlyMessage return super.getAllHeaderLines(); } - /** + /** * Causes the headers to be read. */ - public Enumeration getMatchingHeaders(String[] names) - throws MessagingException + public Enumeration getMatchingHeaders(String[] names) + throws MessagingException { if (headers == null) { @@ -251,11 +251,11 @@ extends ReadOnlyMessage return super.getMatchingHeaders(names); } - /** + /** * Causes the headers to be read. */ - public Enumeration getMatchingHeaderLines(String[] names) - throws MessagingException + public Enumeration getMatchingHeaderLines(String[] names) + throws MessagingException { if (headers == null) { @@ -264,11 +264,11 @@ extends ReadOnlyMessage return super.getMatchingHeaderLines(names); } - /** + /** * Causes the headers to be read. */ - public Enumeration getNonMatchingHeaders(String[] names) - throws MessagingException + public Enumeration getNonMatchingHeaders(String[] names) + throws MessagingException { if (headers == null) { @@ -277,11 +277,11 @@ extends ReadOnlyMessage return super.getNonMatchingHeaders(names); } - /** + /** * Causes the headers to be read. */ - public Enumeration getNonMatchingHeaderLines(String[] names) - throws MessagingException + public Enumeration getNonMatchingHeaderLines(String[] names) + throws MessagingException { if (headers == null) { @@ -292,8 +292,8 @@ extends ReadOnlyMessage // -- Utility -- - public void writeTo(OutputStream msgStream) - throws IOException, MessagingException + public void writeTo(OutputStream msgStream) + throws IOException, MessagingException { if (headers == null) { @@ -306,8 +306,8 @@ extends ReadOnlyMessage super.writeTo(msgStream); } - public void writeTo(OutputStream msgStream, String[] ignoreList) - throws IOException, MessagingException + public void writeTo(OutputStream msgStream, String[] ignoreList) + throws IOException, MessagingException { if (headers == null) { @@ -322,11 +322,11 @@ extends ReadOnlyMessage // -- UIDL -- - /** + /** * Causes the UID to be fetched. */ - void fetchUid() - throws MessagingException + void fetchUid() + throws MessagingException { if (headers != null) { @@ -358,7 +358,7 @@ extends ReadOnlyMessage } return uid; } - + /** * Set flags (but only DELETED is supported) * add or remove the message from the folder deleted message list. @@ -396,5 +396,5 @@ extends ReadOnlyMessage } } } - + } Index: source/gnu/mail/providers/pop3/POP3Store.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/pop3/POP3Store.java,v retrieving revision 1.23 diff -u -p -r1.23 POP3Store.java --- source/gnu/mail/providers/pop3/POP3Store.java 1 Jun 2007 17:09:37 -0000 1.23 +++ source/gnu/mail/providers/pop3/POP3Store.java 21 Nov 2007 05:09:59 -0000 @@ -1,23 +1,23 @@ /* * POP3Store.java * Copyright (C) 1999, 2003, 2005 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -71,17 +71,17 @@ public final class POP3Store * The connection. */ POP3Connection connection; - + /* * The root folder. */ POP3Folder root; - + /** * If rue, disable use of APOP. */ boolean disableApop; - + /** * Constructor. */ @@ -145,9 +145,9 @@ public final class POP3Store handler.setLevel(Level.ALL); logger.addHandler(handler); } - + connection.init(); - + // Disable APOP if necessary if (propertyIsFalse("apop")) { Index: source/gnu/mail/providers/smtp/SMTPTransport.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/providers/smtp/SMTPTransport.java,v retrieving revision 1.43 diff -u -p -r1.43 SMTPTransport.java --- source/gnu/mail/providers/smtp/SMTPTransport.java 1 Jun 2007 17:09:37 -0000 1.43 +++ source/gnu/mail/providers/smtp/SMTPTransport.java 21 Nov 2007 05:09:59 -0000 @@ -1,23 +1,23 @@ /* * SMTPTransport.java * Copyright(C) 2001 Benjamin A. Speakmon - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * As a special exception, if you link this library with other files to * produce an executable, this library does not by itself cause the * resulting executable to be covered by the GNU General Public License. @@ -64,7 +64,7 @@ import gnu.inet.smtp.SMTPConnection; import gnu.inet.util.BASE64; import gnu.inet.util.LaconicFormatter; -/** +/** * This transport handles communications with an SMTP server. * * @author Andrew Selkirk @@ -81,9 +81,9 @@ public class SMTPTransport * The connection used to communicate with the server. */ protected SMTPConnection connection; - + protected String localHostName; - + private List extensions = null; private List authenticationMechanisms = null; @@ -93,10 +93,10 @@ public class SMTPTransport * @param session a Session value * @param urlName an URLName value */ - public SMTPTransport(Session session, URLName urlName) + public SMTPTransport(Session session, URLName urlName) { super(session, urlName); - + // Check for mail.smtp.localhost property localHostName = getProperty("localhost"); if (localHostName == null) @@ -117,7 +117,7 @@ public class SMTPTransport */ protected boolean protocolConnect(String host, int port, String username, String password) - throws MessagingException + throws MessagingException { if (connection != null) { @@ -135,15 +135,15 @@ public class SMTPTransport { username = getProperty("user"); } - + // Check host if (host == null) { host = "localhost"; } - + try - { + { int connectionTimeout = getIntProperty("connectiontimeout"); int timeout = getIntProperty("timeout"); boolean tls = "stmps".equals(url.getProtocol()); @@ -153,8 +153,8 @@ public class SMTPTransport { tm = getTrustManager(); } - - connection = new SMTPConnection(host, port, + + connection = new SMTPConnection(host, port, connectionTimeout, timeout, tls, tm, false); if (session.getDebug()) @@ -169,7 +169,7 @@ public class SMTPTransport } connection.init(); - + // EHLO/HELO if (propertyIsFalse("ehlo")) { @@ -226,7 +226,7 @@ public class SMTPTransport } } } - + // User authentication String auth = getProperty("auth"); boolean authRequired = "required".equals(auth); @@ -350,7 +350,7 @@ public class SMTPTransport * Send the specified message to the server. */ public void sendMessage(Message message, Address[] addresses) - throws MessagingException, SendFailedException + throws MessagingException, SendFailedException { if (!isConnected()) { @@ -362,14 +362,14 @@ public class SMTPTransport } // Cast message MimeMessage mimeMessage = (MimeMessage) message; - + int len = addresses.length; List sent = new ArrayList(len); List unsent = new ArrayList(len); List invalid = new ArrayList(len); int deliveryStatus = TransportEvent.MESSAGE_NOT_DELIVERED; ParameterList params = null; // ESMTP parameters - + synchronized (connection) { try @@ -494,7 +494,7 @@ public class SMTPTransport throw new SendFailedException(connection.getLastResponse()); } params = null; - + // DSN NOTIFY String dsnNotify = getProperty("dsn.notify"); if (dsnNotify != null && extensions != null && @@ -586,11 +586,11 @@ public class SMTPTransport } throw new SendFailedException(e.getMessage()); } - + if (sent.size() > 0) { try - { + { // DATA OutputStream dataStream = connection.data(); if (dataStream == null) @@ -606,7 +606,7 @@ public class SMTPTransport sent.clear(); deliveryStatus = TransportEvent.MESSAGE_NOT_DELIVERED; } - else + else { deliveryStatus = invalid.isEmpty() ? TransportEvent.MESSAGE_DELIVERED : @@ -631,7 +631,7 @@ public class SMTPTransport } } } - + // Notify transport listeners Address[] a_sent = new Address[sent.size()]; sent.toArray(a_sent); @@ -639,7 +639,7 @@ public class SMTPTransport unsent.toArray(a_unsent); Address[] a_invalid = new Address[invalid.size()]; invalid.toArray(a_invalid); - + notifyTransportListeners(deliveryStatus, a_sent, a_unsent, a_invalid, mimeMessage); } @@ -648,17 +648,17 @@ public class SMTPTransport * Close this transport. */ public void close() - throws MessagingException + throws MessagingException { - if (isConnected()) + if (isConnected()) { synchronized (connection) { - try + try { connection.quit(); } - catch (IOException e) + catch (IOException e) { throw new MessagingException(e.getMessage(), e); } @@ -670,7 +670,7 @@ public class SMTPTransport } super.close(); } - + // -- Utility methods -- private int getIntProperty(String key) @@ -688,17 +688,17 @@ public class SMTPTransport } return -1; } - + private boolean propertyIsFalse(String key) { return "false".equals(getProperty(key)); } - + private boolean propertyIsTrue(String key) { return "true".equals(getProperty(key)); } - + /* * Returns the provider-specific or general mail property corresponding to * the specified key. @@ -712,5 +712,5 @@ public class SMTPTransport } return value; } - + } Index: source/gnu/mail/treeutil/StatusEvent.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/treeutil/StatusEvent.java,v retrieving revision 1.5 diff -u -p -r1.5 StatusEvent.java --- source/gnu/mail/treeutil/StatusEvent.java 25 Aug 2005 12:31:15 -0000 1.5 +++ source/gnu/mail/treeutil/StatusEvent.java 21 Nov 2007 05:09:59 -0000 @@ -1,19 +1,19 @@ /* * StatusEvent.java * Copyright(C) 1999 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -36,7 +36,7 @@ import java.util.*; * @version 1.0.2 */ public class StatusEvent - extends EventObject + extends EventObject { public static final int OPERATION_START = 0; @@ -52,18 +52,18 @@ public class StatusEvent protected String operation; protected int minimum = UNKNOWN; - + protected int maximum = UNKNOWN; - + protected int value = UNKNOWN; - + /** * Creates a new status event with the specified type and operation. */ - public StatusEvent(Object source, int type, String operation) + public StatusEvent(Object source, int type, String operation) { super(source); - switch (type) + switch (type) { case OPERATION_START: case OPERATION_UPDATE: @@ -75,14 +75,14 @@ public class StatusEvent } this.operation = operation; } - + /** * Creates a new status event representing an update of the specified operation. */ - public StatusEvent(Object source, int type, String operation, int minimum, int maximum, int value) + public StatusEvent(Object source, int type, String operation, int minimum, int maximum, int value) { super(source); - switch (type) + switch (type) { case OPERATION_START: case OPERATION_UPDATE: @@ -103,7 +103,7 @@ public class StatusEvent */ public int getType() { - return type; + return type; } /** @@ -111,7 +111,7 @@ public class StatusEvent */ public String getOperation() { - return operation; + return operation; } /** @@ -119,7 +119,7 @@ public class StatusEvent */ public int getMinimum() { - return minimum; + return minimum; } /** @@ -127,7 +127,7 @@ public class StatusEvent */ public int getMaximum() { - return maximum; + return maximum; } /** Index: source/gnu/mail/treeutil/StatusListener.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/treeutil/StatusListener.java,v retrieving revision 1.6 diff -u -p -r1.6 StatusListener.java --- source/gnu/mail/treeutil/StatusListener.java 25 Aug 2005 12:31:15 -0000 1.6 +++ source/gnu/mail/treeutil/StatusListener.java 21 Nov 2007 05:09:59 -0000 @@ -1,19 +1,19 @@ /* * StatusListener.java * Copyright(C) 1999 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -36,7 +36,7 @@ import java.util.*; * @version 1.0.2 */ public interface StatusListener - extends EventListener + extends EventListener { /** Index: source/gnu/mail/treeutil/StatusSource.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/treeutil/StatusSource.java,v retrieving revision 1.6 diff -u -p -r1.6 StatusSource.java --- source/gnu/mail/treeutil/StatusSource.java 25 Aug 2005 12:31:15 -0000 1.6 +++ source/gnu/mail/treeutil/StatusSource.java 21 Nov 2007 05:09:59 -0000 @@ -1,19 +1,19 @@ /* * StatusSource.java * Copyright(C) 1999 Chris Burdess - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -33,7 +33,7 @@ package gnu.mail.treeutil; * @author Chris Burdess * @version 1.0.2 */ -public interface StatusSource +public interface StatusSource { /** Index: source/gnu/mail/util/BOutputStream.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/util/BOutputStream.java,v retrieving revision 1.5 diff -u -p -r1.5 BOutputStream.java --- source/gnu/mail/util/BOutputStream.java 25 Aug 2005 12:31:15 -0000 1.5 +++ source/gnu/mail/util/BOutputStream.java 21 Nov 2007 05:09:59 -0000 @@ -1,19 +1,19 @@ /* * BOutputStream.java * Copyright(C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -48,5 +48,5 @@ public class BOutputStream { return ((bytes.length+2)/3)*4; } - + } Index: source/gnu/mail/util/Base64InputStream.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/util/Base64InputStream.java,v retrieving revision 1.6 diff -u -p -r1.6 Base64InputStream.java --- source/gnu/mail/util/Base64InputStream.java 25 Aug 2005 12:31:15 -0000 1.6 +++ source/gnu/mail/util/Base64InputStream.java 21 Nov 2007 05:09:59 -0000 @@ -1,19 +1,19 @@ /* * Base64InputStream.java * Copyright(C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -53,18 +53,18 @@ public class Base64InputStream private static final char[] src = { - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', - 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', - 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', - 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', - 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', - 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', + 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', + 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', + 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', + 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', + 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' }; private static final byte[] dst; - + private static final int LF = 10, CR = 13, EQ = 61; - + static { dst = new byte[256]; @@ -72,9 +72,9 @@ public class Base64InputStream dst[i] = -1; for (int i = 0; i>>4 & 0x3); Index: source/gnu/mail/util/Base64OutputStream.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/util/Base64OutputStream.java,v retrieving revision 1.5 diff -u -p -r1.5 Base64OutputStream.java --- source/gnu/mail/util/Base64OutputStream.java 25 Aug 2005 12:31:15 -0000 1.5 +++ source/gnu/mail/util/Base64OutputStream.java 21 Nov 2007 05:09:59 -0000 @@ -1,19 +1,19 @@ /* * Base64OutputStream.java * Copyright(C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -50,20 +50,20 @@ public class Base64OutputStream private int buflen; private int count; private int lineLength; - + private static final char src[] = { - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', - 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', - 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', - 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', - 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', - 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', + 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', + 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', + 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', + 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', + 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' }; - + private static final int LF = 10, CR = 13, EQ = 61; - + /** * Default constructor. * This constructs a Base64OutputStream with a line length of 76. @@ -72,7 +72,7 @@ public class Base64OutputStream { this(out, 76); } - + /** * Constructor. * @param out the underlying output stream to encode @@ -97,9 +97,9 @@ public class Base64OutputStream buflen = 0; } } - + /** - * Writes b.length bytes from the specified byte array + * Writes b.length bytes from the specified byte array * to this output stream. */ public void write(byte b[]) @@ -107,9 +107,9 @@ public class Base64OutputStream { write(b, 0, b.length); } - + /** - * Writes len bytes from the specified byte array + * Writes len bytes from the specified byte array * starting at offset off to this output stream. */ public void write(byte b[], int off, int len) @@ -118,7 +118,7 @@ public class Base64OutputStream for (int i=0; i@[\\]^`{|}~"; private String specials; - + /** * Constructor. * The word parameter is used to indicate whether the bytes Index: source/gnu/mail/util/QPInputStream.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/util/QPInputStream.java,v retrieving revision 1.6 diff -u -p -r1.6 QPInputStream.java --- source/gnu/mail/util/QPInputStream.java 25 Aug 2005 12:31:15 -0000 1.6 +++ source/gnu/mail/util/QPInputStream.java 21 Nov 2007 05:09:59 -0000 @@ -1,19 +1,19 @@ /* * QPInputStream.java * Copyright(C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -71,11 +71,11 @@ public class QPInputStream spaceCount--; return SPACE; } - + int c = in.read(); if (c==SPACE) { - while ((c = in.read())==SPACE) + while ((c = in.read())==SPACE) spaceCount++; if (c==LF || c==CR || c==-1) spaceCount = 0; @@ -100,7 +100,7 @@ public class QPInputStream } if (c2==-1) return c2; - + buf[0] = (byte)c2; buf[1] = (byte)in.read(); try @@ -163,5 +163,5 @@ public class QPInputStream { return in.available(); } - + } Index: source/gnu/mail/util/QPOutputStream.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/util/QPOutputStream.java,v retrieving revision 1.6 diff -u -p -r1.6 QPOutputStream.java --- source/gnu/mail/util/QPOutputStream.java 25 Aug 2005 12:31:15 -0000 1.6 +++ source/gnu/mail/util/QPOutputStream.java 21 Nov 2007 05:09:59 -0000 @@ -1,19 +1,19 @@ /* * QPOutputStream.java * Copyright(C) 2000 Andrew Selkirk - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -81,7 +81,7 @@ extends FilterOutputStream * @param stream Output stream * @param length Number of bytes per line */ - public QPOutputStream(OutputStream stream, int length) + public QPOutputStream(OutputStream stream, int length) { super(stream); this.bytesPerLine = length; @@ -95,7 +95,7 @@ extends FilterOutputStream * the default 76 bytes per line. * @param stream Output stream */ - public QPOutputStream(OutputStream stream) + public QPOutputStream(OutputStream stream) { this(stream, 76); } // QPEWncoderStream() @@ -109,7 +109,7 @@ extends FilterOutputStream * Flush encoding buffer. * @exception IOException IO Exception occurred */ - public void flush() throws IOException + public void flush() throws IOException { if (gotSpace) { @@ -127,14 +127,14 @@ extends FilterOutputStream * @exception IOException IO Exception occurred */ public void write(byte[] bytes, int offset, int length) - throws IOException + throws IOException { // Variables int index; // Process Each Byte - for (index = offset; index < length; index++) + for (index = offset; index < length; index++) { write(bytes[index]); } // for @@ -146,7 +146,7 @@ extends FilterOutputStream * @param bytes Byte array to write to stream * @exception IOException IO Exception occurred */ - public void write(byte[] bytes) throws IOException + public void write(byte[] bytes) throws IOException { write(bytes, 0, bytes.length); } // write() @@ -156,7 +156,7 @@ extends FilterOutputStream * @param b Byte to write to the stream * @exception IOException IO Exception occurred */ - public void write(int b) throws IOException + public void write(int b) throws IOException { b &= 0xff; if (gotSpace) @@ -194,7 +194,7 @@ extends FilterOutputStream * Close stream. * @exception IOException IO Exception occurred */ - public void close() throws IOException + public void close() throws IOException { out.close(); } // close() @@ -206,7 +206,7 @@ extends FilterOutputStream * @exception IOException IO Exception occurred */ protected void output(int b, boolean value) - throws IOException + throws IOException { if (value) { @@ -238,7 +238,7 @@ extends FilterOutputStream * Write CRLF byte series to stream. * @exception IOException IO Exception occurred */ - private void outputCRLF() throws IOException + private void outputCRLF() throws IOException { out.write('\r'); out.write('\n'); Index: source/gnu/mail/util/RFC2822OutputStream.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/util/RFC2822OutputStream.java,v retrieving revision 1.9 diff -u -p -r1.9 RFC2822OutputStream.java --- source/gnu/mail/util/RFC2822OutputStream.java 25 Aug 2005 12:31:15 -0000 1.9 +++ source/gnu/mail/util/RFC2822OutputStream.java 21 Nov 2007 05:09:59 -0000 @@ -1,19 +1,19 @@ /* * RFC2822OutputStream.java * Copyright(C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -31,7 +31,7 @@ import java.io.FilterOutputStream; import java.io.IOException; import java.io.OutputStream; -/** +/** * An output stream that ensures that lines of characters in the body are * limited to 998 octets(excluding CRLF). * Index: source/gnu/mail/util/UUInputStream.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/util/UUInputStream.java,v retrieving revision 1.2 diff -u -p -r1.2 UUInputStream.java --- source/gnu/mail/util/UUInputStream.java 25 Aug 2005 12:31:15 -0000 1.2 +++ source/gnu/mail/util/UUInputStream.java 21 Nov 2007 05:09:59 -0000 @@ -1,19 +1,19 @@ /* * UUInputStream.java * Copyright(C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -78,7 +78,7 @@ public class UUInputStream { return read(buf, 0, buf.length); } - + public int read(byte[] buf, int off, int len) throws IOException { @@ -126,7 +126,7 @@ public class UUInputStream for (++i; n > 0; i += 4, n -= 3) { int c; - + if (n >= 1) { c = decode(src[i]) << 2 | decode(src[i + 1]) >> 4; @@ -136,7 +136,7 @@ public class UUInputStream { c = decode(src[i + 1]) << 4 | decode(src[i + 2]) >> 2; pending.write(c); - } + } if (n >= 3) { c = decode(src[i + 2]) << 6 | decode(src[i + 3]); @@ -144,8 +144,8 @@ public class UUInputStream } } } - - // Copy pending to buf + + // Copy pending to buf byte[] pbuf = pending.toByteArray(); plen = pbuf.length; pending.reset(); Index: source/gnu/mail/util/UUOutputStream.java =================================================================== RCS file: /sources/classpathx/mail/source/gnu/mail/util/UUOutputStream.java,v retrieving revision 1.2 diff -u -p -r1.2 UUOutputStream.java --- source/gnu/mail/util/UUOutputStream.java 25 Aug 2005 12:31:15 -0000 1.2 +++ source/gnu/mail/util/UUOutputStream.java 21 Nov 2007 05:09:59 -0000 @@ -1,19 +1,19 @@ /* * UUOutputStream.java * Copyright(C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -75,7 +75,7 @@ public class UUOutputStream { this(out, filename, 0600); } - + /** * Constructor with filename and mode. * @param filename the filename to encode into the UU file. @@ -96,7 +96,7 @@ public class UUOutputStream void writeBeginLine() throws IOException - { + { // Output begin line String beginLine = "begin " + Integer.toString(mode, 8) + " " + filename + "\n"; @@ -128,7 +128,7 @@ public class UUOutputStream { write(buf, 0, buf.length); } - + public void write(byte[] buf, int off, int len) throws IOException { @@ -137,7 +137,7 @@ public class UUOutputStream System.arraycopy(line, 0, tmp, 0, line.length); System.arraycopy(buf, off, tmp, line.length, len - off); line = tmp; - + // Flush line in chunks of MAX_LINE_LENGTH int loff = 0; for (; (line.length - loff) > MAX_LINE_LENGTH; loff += MAX_LINE_LENGTH) @@ -179,7 +179,7 @@ public class UUOutputStream { c2 = buf[off + 1]; } - + out.write(encode(c1 >> 2)); out.write(encode(((c1 << 4) & 060) | ((c2 >> 4) & 017))); @@ -214,6 +214,6 @@ public class UUOutputStream } return TABLE[c2 & 077]; } - + } Index: source/javax/mail/Address.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/Address.java,v retrieving revision 1.10 diff -u -p -r1.10 Address.java --- source/javax/mail/Address.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/Address.java 21 Nov 2007 05:09:59 -0000 @@ -1,19 +1,19 @@ /* * Address.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/AuthenticationFailedException.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/AuthenticationFailedException.java,v retrieving revision 1.10 diff -u -p -r1.10 AuthenticationFailedException.java --- source/javax/mail/AuthenticationFailedException.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/AuthenticationFailedException.java 21 Nov 2007 05:09:59 -0000 @@ -1,19 +1,19 @@ /* * AuthenticationFailedException.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/Authenticator.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/Authenticator.java,v retrieving revision 1.10 diff -u -p -r1.10 Authenticator.java --- source/javax/mail/Authenticator.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/Authenticator.java 21 Nov 2007 05:09:59 -0000 @@ -1,19 +1,19 @@ /* * Authenticator.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -47,10 +47,10 @@ public abstract class Authenticator private InetAddress requestingSite; final PasswordAuthentication requestPasswordAuthentication( - InetAddress requestingSite, - int requestingPort, - String requestingProtocol, - String requestingPrompt, + InetAddress requestingSite, + int requestingPort, + String requestingProtocol, + String requestingPrompt, String defaultUserName) { this.requestingSite = requestingSite; Index: source/javax/mail/BodyPart.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/BodyPart.java,v retrieving revision 1.11 diff -u -p -r1.11 BodyPart.java --- source/javax/mail/BodyPart.java 26 Nov 2005 18:40:20 -0000 1.11 +++ source/javax/mail/BodyPart.java 21 Nov 2007 05:09:59 -0000 @@ -1,19 +1,19 @@ /* * BodyPart.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -30,7 +30,7 @@ package javax.mail; /** * A MIME body part. This is a MIME part occurring inside a multipart in the * message content. - * + * * @author Chris Burdess * @version 1.4 */ Index: source/javax/mail/FetchProfile.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/FetchProfile.java,v retrieving revision 1.12 diff -u -p -r1.12 FetchProfile.java --- source/javax/mail/FetchProfile.java 26 Nov 2005 18:40:20 -0000 1.12 +++ source/javax/mail/FetchProfile.java 21 Nov 2007 05:09:59 -0000 @@ -1,19 +1,19 @@ /* * FetchProfile.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -54,7 +54,7 @@ public class FetchProfile /** * The message content metadata, e.g.: - * ContentType, ContentDisposition, ContentDescription, Size and LineCount. + * ContentType, ContentDisposition, ContentDescription, Size and LineCount. * Further items may be included as required. */ public static final Item CONTENT_INFO = new Item("CONTENT_INFO"); @@ -63,7 +63,7 @@ public class FetchProfile * The message flags. */ public static final Item FLAGS = new Item("FLAGS"); - + private String name; protected Item(String name) @@ -163,5 +163,5 @@ public class FetchProfile return h; } } - + } Index: source/javax/mail/Flags.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/Flags.java,v retrieving revision 1.13 diff -u -p -r1.13 Flags.java --- source/javax/mail/Flags.java 18 Feb 2006 13:39:24 -0000 1.13 +++ source/javax/mail/Flags.java 21 Nov 2007 05:09:59 -0000 @@ -1,19 +1,19 @@ /* * Flags.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -56,7 +56,7 @@ public class Flags * It is used internally by the Flags class. */ private static final HashMap flag2flag = new HashMap(7); - + /** * This message has been answered. */ @@ -88,7 +88,7 @@ public class Flags public static final Flag SEEN = new Flag(0x00000020); /** - * Special flag that indicates whether this folder supports + * Special flag that indicates whether this folder supports * user defined flags. */ public static final Flag USER = new Flag(0x80000000); @@ -103,13 +103,13 @@ public class Flags this.flag = flag; flag2flag.put(new Integer(flag), this); } - + } private int systemFlags; private HashMap userFlags; - + /** * Construct an empty Flags object. */ @@ -267,7 +267,7 @@ public class Flags } /** - * Indicates whether all the flags in the specified Flags object + * Indicates whether all the flags in the specified Flags object * are set in this Flags object. */ public boolean contains(Flags flags) @@ -351,7 +351,7 @@ public class Flags /** * Returns the user flags. - */ + */ public String[] getUserFlags() { if (userFlags == null) Index: source/javax/mail/Folder.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/Folder.java,v retrieving revision 1.13 diff -u -p -r1.13 Folder.java --- source/javax/mail/Folder.java 26 Nov 2005 18:40:20 -0000 1.13 +++ source/javax/mail/Folder.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * Folder.java * Copyright (C) 2002, 2004 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -49,7 +49,7 @@ import javax.mail.search.SearchTerm; * delimiter characters. *

* The special (case-insensitive) folder name INBOX is reserved to mean the - * primary folder for the authenticated user in the store. Not all stores + * primary folder for the authenticated user in the store. Not all stores * support INBOX folders, and not all users will have an INBOX folder. *

* Unless documented otherwise, a folder must be opened in order to invoke @@ -80,12 +80,12 @@ public abstract class Folder * This folder can be modified. */ public static final int READ_WRITE = 2; - + /** * The parent store. */ protected Store store; - + /** * The folder mode: Folder.READ_ONLY, Folder.READ_WRITE, or -1 if not known. */ @@ -136,7 +136,7 @@ public abstract class Folder { URLName url = getStore().getURLName(); String name = getFullName(); - return new URLName(url.getProtocol(), + return new URLName(url.getProtocol(), url.getHost(), url.getPort(), name, url.getUsername(), null); } @@ -180,7 +180,7 @@ public abstract class Folder throws MessagingException; /** - * Returns a list of subscribed subfolders matching the specified pattern. + * Returns a list of subscribed subfolders matching the specified pattern. * If the folder does not support subscription, returns the same as the * list method. * The pattern can contain wildcards. @@ -238,10 +238,10 @@ public abstract class Folder /** * Create this folder in the store. - * When this folder is created, any folders in its path + * When this folder is created, any folders in its path * that do not exist are also created. *

- * If the creation is successful, a CREATED FolderEvent is delivered + * If the creation is successful, a CREATED FolderEvent is delivered * to any FolderListeners registered on this Folder and this Store. * @param type the desired type of the folder */ @@ -283,8 +283,8 @@ public abstract class Folder * Return a folder corresponding to the given name. * Note that the folder does not have to exist in the store. *

- * In some stores, name can be an absolute path if it starts - * with the hierarchy delimiter. Otherwise, it is interpreted relative to + * In some stores, name can be an absolute path if it starts + * with the hierarchy delimiter. Otherwise, it is interpreted relative to * this folder. *

* This method can be invoked on a closed folder. @@ -299,7 +299,7 @@ public abstract class Folder * @param recurse delete any subfolders * @return true if the folder is deleted successfully, false otherwise * @exception FolderNotFoundException if this folder does not exist - * @exception IllegalStateException if this folder is not closed + * @exception IllegalStateException if this folder is not closed */ public abstract boolean delete(boolean recurse) throws MessagingException; @@ -310,7 +310,7 @@ public abstract class Folder * @param folder a folder representing the new name for this folder * @return true if the folder is renamed successfully, false otherwise * @exception FolderNotFoundException if this folder does not exist - * @exception IllegalStateException if this folder is not closed + * @exception IllegalStateException if this folder is not closed */ public abstract boolean renameTo(Folder folder) throws MessagingException; @@ -321,7 +321,7 @@ public abstract class Folder * messages. * @param mode open the Folder READ_ONLY or READ_WRITE * @exception FolderNotFoundException if this folder does not exist - * @exception IllegalStateException if this folder is not closed + * @exception IllegalStateException if this folder is not closed */ public abstract void open(int mode) throws MessagingException; @@ -480,13 +480,13 @@ public abstract class Folder * The message number is the relative position of a message in its * folder, starting at 1. *

- * Note that message numbers can change within a session if the folder is + * Note that message numbers can change within a session if the folder is * expunged, therefore the use of message numbers as references to * messages is inadvisable. * @param msgnum the message number * @exception FolderNotFoundException if this folder does not exist * @exception IllegalStateException if this folder is closed - * @exception IndexOutOfBoundsException if the message number is out of + * @exception IndexOutOfBoundsException if the message number is out of * range */ public abstract Message getMessage(int msgnum) @@ -498,7 +498,7 @@ public abstract class Folder * @param end the number of the last message * @exception FolderNotFoundException if this folder does not exist * @exception IllegalStateException if this folder is closed - * @exception IndexOutOfBoundsException if the start or end message + * @exception IndexOutOfBoundsException if the start or end message * numbers are out of range. */ public synchronized Message[] getMessages(int start, int end) @@ -517,7 +517,7 @@ public abstract class Folder * @param msgnums the array of message numbers * @exception FolderNotFoundException if this folder does not exist * @exception IllegalStateException if this folder is closed - * @exception IndexOutOfBoundsException if any message number in the + * @exception IndexOutOfBoundsException if any message number in the * given array is out of range */ public synchronized Message[] getMessages(int msgnums[]) @@ -604,10 +604,10 @@ public abstract class Folder * @param flag the flags to be set * @param value set the flags to this value * @exception IllegalStateException if this folder is closed or READ_ONLY - * @exception IndexOutOfBoundsException if the start or end message + * @exception IndexOutOfBoundsException if the start or end message * numbers are out of range */ - public synchronized void setFlags(int start, int end, Flags flag, + public synchronized void setFlags(int start, int end, Flags flag, boolean value) throws MessagingException { @@ -629,7 +629,7 @@ public abstract class Folder * @param flag the flags to be set * @param value set the flags to this value * @exception IllegalStateException if this folder is closed or READ_ONLY - * @exception IndexOutOfBoundsException if any message number in the + * @exception IndexOutOfBoundsException if any message number in the * given array is out of range */ public synchronized void setFlags(int[] msgnums, Flags flag, boolean value) @@ -680,9 +680,9 @@ public abstract class Folder * Expunge causes the renumbering of any messages with numbers higher than * the message number of the lowest-numbered expunged message. *

- * After a message has been expunged, only the isExpunged and - * getMessageNumber methods are still valid on the - * corresponding Message object; other methods may throw + * After a message has been expunged, only the isExpunged and + * getMessageNumber methods are still valid on the + * corresponding Message object; other methods may throw * MessageRemovedException. * @exception FolderNotFoundException if this folder does not exist * @exception IllegalStateException if this folder is closed @@ -736,7 +736,7 @@ public abstract class Folder } // -- Event management -- - + /* * Because the propagation of events of different kinds in the JavaMail * API is so haphazard, I have here sacrificed a small time advantage for @@ -748,7 +748,7 @@ public abstract class Folder * * Note that all events are currently delivered synchronously, where in * Sun's implementation a different thread is used for event delivery. - * + * * TODO Examine the impact of this. */ @@ -919,7 +919,7 @@ public abstract class Folder */ protected void notifyFolderRenamedListeners(Folder folder) { - FolderEvent event = new FolderEvent(this, this, folder, + FolderEvent event = new FolderEvent(this, this, folder, FolderEvent.RENAMED); fireFolderRenamed(event); store.notifyFolderRenamedListeners(this, folder); @@ -964,7 +964,7 @@ public abstract class Folder } } } - + /* * Propagates a RENAMED FolderEvent to all registered listeners. */ @@ -1149,5 +1149,5 @@ public abstract class Folder String name = getFullName(); return (name != null) ? name : super.toString(); } - + } Index: source/javax/mail/FolderClosedException.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/FolderClosedException.java,v retrieving revision 1.10 diff -u -p -r1.10 FolderClosedException.java --- source/javax/mail/FolderClosedException.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/FolderClosedException.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * FolderClosedException.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -29,7 +29,7 @@ package javax.mail; /** * An exception thrown when a method is invoked on a closed folder or one of - * its messages. The folder may be reopened. + * its messages. The folder may be reopened. * * @author Chris Burdess * @version 1.4 Index: source/javax/mail/FolderNotFoundException.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/FolderNotFoundException.java,v retrieving revision 1.10 diff -u -p -r1.10 FolderNotFoundException.java --- source/javax/mail/FolderNotFoundException.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/FolderNotFoundException.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * FolderNotFoundException.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -33,7 +33,7 @@ package javax.mail; * @author Chris Burdess * @version 1.4 */ -public class FolderNotFoundException +public class FolderNotFoundException extends MessagingException { Index: source/javax/mail/Header.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/Header.java,v retrieving revision 1.12 diff -u -p -r1.12 Header.java --- source/javax/mail/Header.java 26 Nov 2005 18:40:20 -0000 1.12 +++ source/javax/mail/Header.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * Header.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/IllegalWriteException.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/IllegalWriteException.java,v retrieving revision 1.10 diff -u -p -r1.10 IllegalWriteException.java --- source/javax/mail/IllegalWriteException.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/IllegalWriteException.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * IllegalWriteException.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -34,7 +34,7 @@ package javax.mail; * @author Chris Burdess * @version 1.4 */ -public class IllegalWriteException +public class IllegalWriteException extends MessagingException { Index: source/javax/mail/Message.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/Message.java,v retrieving revision 1.13 diff -u -p -r1.13 Message.java --- source/javax/mail/Message.java 26 Nov 2005 18:40:20 -0000 1.13 +++ source/javax/mail/Message.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * Message.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -87,7 +87,7 @@ public abstract class Message { this.type = type; } - + protected Object readResolve() throws ObjectStreamException { @@ -115,7 +115,7 @@ public abstract class Message } /** - * The number of this message within its folder, starting from 1, + * The number of this message within its folder, starting from 1, * or 0 if the message was not retrieved from a folder. */ protected int msgnum = 0; @@ -181,9 +181,9 @@ public abstract class Message * Sets the identity of the person sending this message, as obtained * from the property "mail.user". * If this property is absent, the system property "user.name" is used. - * @exception IllegalWriteException if the underlying implementation does + * @exception IllegalWriteException if the underlying implementation does * not support modification of existing values - * @exception IllegalStateException if this message is obtained from a + * @exception IllegalStateException if this message is obtained from a * READ_ONLY folder */ public abstract void setFrom() @@ -192,9 +192,9 @@ public abstract class Message /** * Sets the identity of the person sending this message. * @param address the sender - * @exception IllegalWriteException if the underlying implementation does + * @exception IllegalWriteException if the underlying implementation does * not support modification of existing values - * @exception IllegalStateException if this message is obtained from a + * @exception IllegalStateException if this message is obtained from a * READ_ONLY folder. */ public abstract void setFrom(Address address) @@ -203,9 +203,9 @@ public abstract class Message /** * Adds addresses to the identity of the person sending this message. * @param addresses the senders - * @exception IllegalWriteException if the underlying implementation does + * @exception IllegalWriteException if the underlying implementation does * not support modification of existing values - * @exception IllegalStateException if this message is obtained from a + * @exception IllegalStateException if this message is obtained from a * READ_ONLY folder. */ public abstract void addFrom(Address[] addresses) @@ -219,7 +219,7 @@ public abstract class Message throws MessagingException; /** - * Returns all the recipient addresses in the message. + * Returns all the recipient addresses in the message. */ public Address[] getAllRecipients() throws MessagingException @@ -227,10 +227,10 @@ public abstract class Message Address[] to = getRecipients(RecipientType.TO); Address[] cc = getRecipients(RecipientType.CC); Address[] bcc = getRecipients(RecipientType.BCC); - + if (cc == null && bcc == null) return to; - + int count = (to == null ? 0 : to.length) + (cc == null ? 0 : cc.length) + (bcc == null ? 0 : bcc.length); @@ -258,9 +258,9 @@ public abstract class Message * Sets the recipient addresses of the specified type. * @param type the recipient type * @param addresses the addresses - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder. */ public abstract void setRecipients(RecipientType type, Address[] addresses) @@ -268,7 +268,7 @@ public abstract class Message /** * Sets the recipient address of the specified type. - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values */ public void setRecipient(RecipientType type, Address address) @@ -281,9 +281,9 @@ public abstract class Message * Adds the recipient addresses of the given type. * @param type the recipient type * @param addresses the addresses - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder. */ public abstract void addRecipients(RecipientType type, Address[] addresses) @@ -291,7 +291,7 @@ public abstract class Message /** * Adds the recipient address of the given type. - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values */ public void addRecipient(RecipientType type, Address address) @@ -328,9 +328,9 @@ public abstract class Message /** * Sets the subject of this message. * @param subject the subject - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder. */ public abstract void setSubject(String subject) @@ -345,9 +345,9 @@ public abstract class Message /** * Sets the date this message was sent. * @param date the sent date of this message - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder. */ public abstract void setSentDate(Date date) @@ -384,9 +384,9 @@ public abstract class Message * are unaffected. * @param flag the flags to be set * @param set the value to be set - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder. */ public abstract void setFlags(Flags flag, boolean set) @@ -396,9 +396,9 @@ public abstract class Message * Sets the specified flag on this message to the given value. * @param flag the flag to be set * @param set the value to be set - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder. */ public void setFlag(Flags.Flag flag, boolean set) @@ -409,7 +409,7 @@ public abstract class Message /** * Returns the message number for this message within its folder. - * @see #msgnum + * @see #msgnum */ public int getMessageNumber() { @@ -417,7 +417,7 @@ public abstract class Message } /** - * Sets the message number for this message. + * Sets the message number for this message. * @see #msgnum */ protected void setMessageNumber(int msgnum) @@ -470,9 +470,9 @@ public abstract class Message *

* This method ensures that any header fields are consistent with the * changed message contents. - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder. */ public abstract void saveChanges() Index: source/javax/mail/MessageAware.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/MessageAware.java,v retrieving revision 1.11 diff -u -p -r1.11 MessageAware.java --- source/javax/mail/MessageAware.java 26 Nov 2005 18:40:20 -0000 1.11 +++ source/javax/mail/MessageAware.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * MessageAware.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -41,5 +41,5 @@ public interface MessageAware * Return the message context. */ MessageContext getMessageContext(); - + } Index: source/javax/mail/MessageContext.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/MessageContext.java,v retrieving revision 1.10 diff -u -p -r1.10 MessageContext.java --- source/javax/mail/MessageContext.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/MessageContext.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * MessageContext.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/MessageRemovedException.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/MessageRemovedException.java,v retrieving revision 1.10 diff -u -p -r1.10 MessageRemovedException.java --- source/javax/mail/MessageRemovedException.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/MessageRemovedException.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * MessageRemovedException.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -28,13 +28,13 @@ package javax.mail; /** - * An exception thrown when an invalid method is invoked on an expunged + * An exception thrown when an invalid method is invoked on an expunged * message. * * @author Chris Burdess * @version 1.4 */ -public class MessageRemovedException +public class MessageRemovedException extends MessagingException { Index: source/javax/mail/MessagingException.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/MessagingException.java,v retrieving revision 1.12 diff -u -p -r1.12 MessagingException.java --- source/javax/mail/MessagingException.java 26 Nov 2005 18:40:20 -0000 1.12 +++ source/javax/mail/MessagingException.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * MessagingException.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -36,7 +36,7 @@ import java.io.PrintWriter; * @author Chris Burdess * @version 1.4 */ -public class MessagingException +public class MessagingException extends Exception { @@ -76,7 +76,7 @@ public class MessagingException /** * Returns the next exception chained to this one. - * If the next exception is a messaging exception, the chain may extend + * If the next exception is a messaging exception, the chain may extend * further. */ public Exception getNextException() @@ -86,7 +86,7 @@ public class MessagingException /** * Adds an exception to the end of the chain. - * If the end is not a messaging exception, this exception cannot be added + * If the end is not a messaging exception, this exception cannot be added * to the end. * @param exception the new end of the exception chain * @return true if this exception was added, false otherwise. @@ -95,7 +95,7 @@ public class MessagingException { Object o; for (o = this; - (o instanceof MessagingException) && + (o instanceof MessagingException) && ((MessagingException) o).nextException != null; o = ((MessagingException) o).nextException); if (o instanceof MessagingException) @@ -132,7 +132,7 @@ public class MessagingException nextException.printStackTrace(out); } } - + public void printStackTrace(PrintWriter out) { super.printStackTrace(out); @@ -142,5 +142,5 @@ public class MessagingException nextException.printStackTrace(out); } } - + } Index: source/javax/mail/MethodNotSupportedException.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/MethodNotSupportedException.java,v retrieving revision 1.10 diff -u -p -r1.10 MethodNotSupportedException.java --- source/javax/mail/MethodNotSupportedException.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/MethodNotSupportedException.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * MethodNotSupportedException.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -34,7 +34,7 @@ package javax.mail; * @author Chris Burdess * @version 1.4 */ -public class MethodNotSupportedException +public class MethodNotSupportedException extends MessagingException { Index: source/javax/mail/Multipart.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/Multipart.java,v retrieving revision 1.11 diff -u -p -r1.11 Multipart.java --- source/javax/mail/Multipart.java 26 Nov 2005 18:40:20 -0000 1.11 +++ source/javax/mail/Multipart.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * Multipart.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -33,10 +33,10 @@ import java.util.Vector; import javax.activation.DataSource; /** - * A multipart is a container for multiple body parts. + * A multipart is a container for multiple body parts. *

* Some messaging systems provide different subtypes of multiparts. - * For example, MIME specifies a set of subtypes that include + * For example, MIME specifies a set of subtypes that include * "alternative", "mixed", "related", "parallel", "signed", etc. * * @author Chris Burdess @@ -126,7 +126,7 @@ public abstract class Multipart * @param part the body part to remove * @return true if a body part was removed, false otherwise * @exception MessagingException if the multipart has not been configured - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values */ public boolean removeBodyPart(BodyPart part) @@ -152,7 +152,7 @@ public abstract class Multipart * The body parts in this container are numbered starting at 0. * @param index index of the part to remove * @exception IndexOutOfBoundsException if the given index is out of range - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values */ public void removeBodyPart(int index) @@ -171,9 +171,9 @@ public abstract class Multipart } /** - * Adds a body part to this multipart. + * Adds a body part to this multipart. * @param part the body part to be appended - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values */ public synchronized void addBodyPart(BodyPart part) @@ -195,7 +195,7 @@ public abstract class Multipart * The body parts in this container are numbered starting at 0. * @param part the body part to be inserted * @param index where to insert the part - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values */ public synchronized void addBodyPart(BodyPart part, int index) @@ -234,5 +234,5 @@ public abstract class Multipart { parent = part; } - + } Index: source/javax/mail/MultipartDataSource.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/MultipartDataSource.java,v retrieving revision 1.10 diff -u -p -r1.10 MultipartDataSource.java --- source/javax/mail/MultipartDataSource.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/MultipartDataSource.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * MultipartDataSource.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -31,7 +31,7 @@ import javax.activation.DataSource; /** * A data source that contains body parts. - * + * * @see DataSource * @author Chris Burdess * @version 1.4 @@ -53,5 +53,5 @@ public interface MultipartDataSource */ BodyPart getBodyPart(int index) throws MessagingException; - + } Index: source/javax/mail/NoSuchProviderException.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/NoSuchProviderException.java,v retrieving revision 1.10 diff -u -p -r1.10 NoSuchProviderException.java --- source/javax/mail/NoSuchProviderException.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/NoSuchProviderException.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * NoSuchProviderException.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/Part.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/Part.java,v retrieving revision 1.11 diff -u -p -r1.11 Part.java --- source/javax/mail/Part.java 26 Nov 2005 18:40:20 -0000 1.11 +++ source/javax/mail/Part.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * Part.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -46,7 +46,7 @@ import javax.activation.DataHandler; *

  • As a Java object, using the getContent method. * * The writeTo method can be used to write the part to a - * byte stream in mail-safe form suitable for transmission. + * byte stream in mail-safe form suitable for transmission. *

    * In MIME terms, Part models an Entity (RFC 2045, Section 2.4). * @@ -71,7 +71,7 @@ public interface Part * size cannot be determined. *

    * Note that the size may not be an exact measure of the content size, - * but will be suitable for display in a user interface to give the + * but will be suitable for display in a user interface to give the * user an idea of the size of this part. */ int getSize() @@ -79,7 +79,7 @@ public interface Part /** * Returns the number of lines in the content of this part, or -1 if the - * number cannot be determined. + * number cannot be determined. * Note that this number may not be an exact measure. */ int getLineCount() @@ -99,7 +99,7 @@ public interface Part * This method compares only the primary type and subtype. * The parameters of the content types are ignored. *

    - * If the subtype of mimeType is the special character '*', + * If the subtype of mimeType is the special character '*', * then the subtype is ignored during the comparison. */ boolean isMimeType(String mimeType) @@ -117,9 +117,9 @@ public interface Part /** * Sets the disposition of this part. * @param disposition the disposition of this part - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of this header - * @exception IllegalStateException if this part is obtained from + * @exception IllegalStateException if this part is obtained from * a READ_ONLY folder */ void setDisposition(String disposition) @@ -134,9 +134,9 @@ public interface Part /** * Sets the description of this part. * @param description the description of this part - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of this header - * @exception IllegalStateException if this Part is obtained from + * @exception IllegalStateException if this Part is obtained from * a READ_ONLY folder */ void setDescription(String description) @@ -151,9 +151,9 @@ public interface Part /** * Sets the filename associated with this part. * @param filename the filename to associate with this part - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of this header - * @exception IllegalStateException if this Part is obtained from + * @exception IllegalStateException if this Part is obtained from * a READ_ONLY folder */ void setFileName(String filename) @@ -169,17 +169,17 @@ public interface Part throws IOException, MessagingException; /** - * Returns a data handler for the content of this part. + * Returns a data handler for the content of this part. */ DataHandler getDataHandler() throws MessagingException; /** * Returns the content of this part as a Java object. - * The type of the returned object is of course dependent on the content - * itself. For instance, the object returned for "text/plain" content + * The type of the returned object is of course dependent on the content + * itself. For instance, the object returned for "text/plain" content * is usually a String object. The object returned for a "multipart" - * content is always a Multipart subclass. For content-types that are + * content is always a Multipart subclass. For content-types that are * unknown to the data handler system, an input stream is returned. * @exception IOException when a data handler error occurs */ @@ -189,9 +189,9 @@ public interface Part /** * Sets the content of this part using the specified data handler. * @param dh the data handler for the content - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification - * @exception IllegalStateException if this part is obtained from + * @exception IllegalStateException if this part is obtained from * a READ_ONLY folder */ void setDataHandler(DataHandler dh) @@ -202,9 +202,9 @@ public interface Part * the supplied argument must be known to the data handler system. * @param obj a Java object * @param type the MIME content-type of this object - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification - * @exception IllegalStateException if this part is obtained from + * @exception IllegalStateException if this part is obtained from * a READ_ONLY folder */ void setContent(Object obj, String type) @@ -214,9 +214,9 @@ public interface Part * Sets the textual content of this part, using a MIME type of * text/plain. * @param text the textual content - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification - * @exception IllegalStateException if this part is obtained from + * @exception IllegalStateException if this part is obtained from * a READ_ONLY folder */ void setText(String text) @@ -225,9 +225,9 @@ public interface Part /** * Sets the multipart content of this part. * @param mp the multipart content - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification - * @exception IllegalStateException if this part is obtained from + * @exception IllegalStateException if this part is obtained from * a READ_ONLY folder */ void setContent(Multipart mp) @@ -235,9 +235,9 @@ public interface Part /** * Writes this part to the specified byte stream. - * @exception IOException if an error occurs writing to the stream + * @exception IOException if an error occurs writing to the stream * or if an error occurs in the data handler system. - * @exception MessagingException if an error occurs fetching the data + * @exception MessagingException if an error occurs fetching the data * to be written */ void writeTo(OutputStream os) @@ -255,9 +255,9 @@ public interface Part * Sets the value for the specified header name. * @param name the header name * @param value the new value - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of this header - * @exception IllegalStateException if this part is obtained from + * @exception IllegalStateException if this part is obtained from * a READ_ONLY folder */ void setHeader(String name, String value) @@ -267,9 +267,9 @@ public interface Part * Adds the specified value to the existing values for this header name. * @param name the header name * @param value the value to add - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of this header - * @exception IllegalStateException if this part is obtained from + * @exception IllegalStateException if this part is obtained from * a READ_ONLY folder */ void addHeader(String name, String value) @@ -278,9 +278,9 @@ public interface Part /** * Removes all headers of the specified name. * @param name the header name - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of this header - * @exception IllegalStateException if this part is obtained from + * @exception IllegalStateException if this part is obtained from * a READ_ONLY folder */ void removeHeader(String name) @@ -308,5 +308,5 @@ public interface Part */ Enumeration getNonMatchingHeaders(String[] names) throws MessagingException; - + } Index: source/javax/mail/PasswordAuthentication.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/PasswordAuthentication.java,v retrieving revision 1.10 diff -u -p -r1.10 PasswordAuthentication.java --- source/javax/mail/PasswordAuthentication.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/PasswordAuthentication.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * PasswordAuthentication.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -72,6 +72,6 @@ public final class PasswordAuthenticatio { return password; } - + } Index: source/javax/mail/Provider.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/Provider.java,v retrieving revision 1.10 diff -u -p -r1.10 Provider.java --- source/javax/mail/Provider.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/Provider.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * Provider.java * Copyright (C) 2002, 2005 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -52,7 +52,7 @@ public class Provider { this.type = type; } - + } private Type type; @@ -148,6 +148,6 @@ public class Provider buffer.append("]"); return buffer.toString(); } - + } Index: source/javax/mail/Quota.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/Quota.java,v retrieving revision 1.1 diff -u -p -r1.1 Quota.java --- source/javax/mail/Quota.java 26 Nov 2005 18:40:20 -0000 1.1 +++ source/javax/mail/Quota.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * Quota.java * Copyright (C) 2005 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -72,7 +72,7 @@ public class Quota this.usage = usage; this.limit = limit; } - + } /** @@ -126,5 +126,5 @@ public class Quota resources[0] = new Resource(name, 0L, limit); } } - + } Index: source/javax/mail/QuotaAwareStore.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/QuotaAwareStore.java,v retrieving revision 1.1 diff -u -p -r1.1 QuotaAwareStore.java --- source/javax/mail/QuotaAwareStore.java 26 Nov 2005 18:40:20 -0000 1.1 +++ source/javax/mail/QuotaAwareStore.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * QuotaAwareStore.java * Copyright (C) 2005 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -53,5 +53,5 @@ public interface QuotaAwareStore */ void setQuota(Quota quota) throws MessagingException; - + } Index: source/javax/mail/ReadOnlyFolderException.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/ReadOnlyFolderException.java,v retrieving revision 1.9 diff -u -p -r1.9 ReadOnlyFolderException.java --- source/javax/mail/ReadOnlyFolderException.java 26 Nov 2005 18:40:20 -0000 1.9 +++ source/javax/mail/ReadOnlyFolderException.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * ReadOnlyFolderException.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/SendFailedException.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/SendFailedException.java,v retrieving revision 1.10 diff -u -p -r1.10 SendFailedException.java --- source/javax/mail/SendFailedException.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/SendFailedException.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * SendFailedException.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -30,14 +30,14 @@ package javax.mail; /** * An exception thrown when a message cannot be sent. *

    - * It includes those addresses to which the message could not be - * sent as well as the valid addresses to which the message was sent + * It includes those addresses to which the message could not be + * sent as well as the valid addresses to which the message was sent * and valid addresses to which the message was not sent. * * @author Chris Burdess * @version 1.4 */ -public class SendFailedException +public class SendFailedException extends MessagingException { Index: source/javax/mail/Service.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/Service.java,v retrieving revision 1.13 diff -u -p -r1.13 Service.java --- source/javax/mail/Service.java 26 Nov 2005 18:40:20 -0000 1.13 +++ source/javax/mail/Service.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * Service.java * Copyright (C) 2002, 2005 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -147,7 +147,7 @@ public abstract class Service { throw new MessagingException("already connected"); } - + boolean success = false; boolean authenticated = false; String protocol = null; @@ -213,7 +213,7 @@ public abstract class Service if (password == null && url != null) { setURLName(new URLName(protocol, host, port, file, user, password)); - PasswordAuthentication auth = + PasswordAuthentication auth = session.getPasswordAuthentication(getURLName()); if (auth != null) { @@ -251,7 +251,7 @@ public abstract class Service catch (UnknownHostException e) { } - PasswordAuthentication auth = + PasswordAuthentication auth = session.requestPasswordAuthentication(address, port, protocol, null, user); if (auth != null) @@ -279,7 +279,7 @@ public abstract class Service setConnected(true); notifyConnectionListeners(ConnectionEvent.OPENED); } - + /** * Provider implementation for a service. *

    @@ -298,7 +298,7 @@ public abstract class Service * @exception AuthenticationFailedException on authentication failure * @exception MessagingException for non-authentication failures */ - protected boolean protocolConnect(String host, int port, + protected boolean protocolConnect(String host, int port, String user, String password) throws MessagingException { @@ -367,7 +367,7 @@ public abstract class Service * * Note that all events are currently delivered synchronously, where in * Sun's implementation a different thread is used for event delivery. - * + * * TODO Examine the impact of this. */ @@ -403,7 +403,7 @@ public abstract class Service } /** - * Notify all connection listeners. + * Notify all connection listeners. */ protected void notifyConnectionListeners(int type) { Index: source/javax/mail/Session.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/Session.java,v retrieving revision 1.20 diff -u -p -r1.20 Session.java --- source/javax/mail/Session.java 1 Jun 2007 17:09:37 -0000 1.20 +++ source/javax/mail/Session.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * Session.java * Copyright (C) 2002, 2004, 2005 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -51,45 +51,45 @@ public final class Session { // Constant definitions of property locations. - + private static final String SYSTEM_PROVIDERS = (System.getProperty("java.home") + File.separator + "lib" + File.separator + "javamail.providers"); - + private static final String CUSTOM_PROVIDERS = "META-INF/javamail.providers"; - + private static final String DEFAULT_PROVIDERS = "META-INF/javamail.default.providers"; - + private static final String SYSTEM_ADDRESS_MAP = (System.getProperty("java.home") + File.separator + "lib" + File.separator + "javamail.address.map"); - + private static final String CUSTOM_ADDRESS_MAP = "META-INF/javamail.address.map"; - + private static final String DEFAULT_ADDRESS_MAP = "META-INF/javamail.default.address.map"; // Class data. private Properties props; - + private Authenticator authenticator; private HashMap authTable = new HashMap(); - + private boolean debug; private PrintStream debugOut = System.err; - + private ArrayList providers = new ArrayList(); private HashMap providersByProtocol = new HashMap(); @@ -185,7 +185,7 @@ public final class Session } return in; } - + /** * Loads the provider database description. */ @@ -201,7 +201,7 @@ public final class Session BufferedReader reader = new BufferedReader(new InputStreamReader(in)); for (String line = reader.readLine(); line != null; - line = reader.readLine()) + line = reader.readLine()) { line = line.trim(); if (!line.startsWith("#") && line.length() > 0) @@ -211,7 +211,7 @@ public final class Session String className = null; String vendor = null; String version = null; - for (StringTokenizer st = new StringTokenizer(line, ";"); + for (StringTokenizer st = new StringTokenizer(line, ";"); st.hasMoreTokens(); ) { String token = st.nextToken().trim(); @@ -246,7 +246,7 @@ public final class Session version = token.substring(equalsIndex + 1); } } - + if (type == null || protocol == null || className == null) { logger.warning("Invalid provider: " + line); @@ -277,7 +277,7 @@ public final class Session " providers", e); } } - + private void loadAddressMap(InputStream in, String description) { if (in == null) @@ -301,13 +301,13 @@ public final class Session " address map", e); } } - + /** * Returns a new session. * @param props a properties object holding relevant properties. * It is expected that the client supplies values for the properties * listed in Appendix A of the JavaMail spec (particularly - * mail.store.protocol, + * mail.store.protocol, * mail.transport.protocol, * mail.host, * mail.user, @@ -316,7 +316,7 @@ public final class Session * @param authenticator an authenticator used to call back to the * application when a user name and password is needed. */ - public static Session getInstance(Properties props, + public static Session getInstance(Properties props, Authenticator authenticator) { return new Session(props, authenticator); @@ -327,7 +327,7 @@ public final class Session * @param props a properties object holding relevant properties. * It is expected that the client supplies values for the properties * listed in Appendix A of the JavaMail spec (particularly - * mail.store.protocol, + * mail.store.protocol, * mail.transport.protocol, * mail.host, * mail.user, @@ -341,15 +341,15 @@ public final class Session /** * Returns the default session. - * If a default has not yet been setup, a new session is created + * If a default has not yet been setup, a new session is created * and installed as the default. *

    - * Since the default session is potentially available to all code - * executing in the same Java virtual machine, and the session can - * contain security sensitive information such as user names and - * passwords, access to the default session is restricted. - * The Authenticator object, which must be created by the caller, - * is used indirectly to check access permission. The Authenticator + * Since the default session is potentially available to all code + * executing in the same Java virtual machine, and the session can + * contain security sensitive information such as user names and + * passwords, access to the default session is restricted. + * The Authenticator object, which must be created by the caller, + * is used indirectly to check access permission. The Authenticator * object passed in when the session is created is compared with * the Authenticator object passed in to subsequent requests to get the * default session. If both objects are the same, or are from the same @@ -363,7 +363,7 @@ public final class Session * @param props Properties object that hold relevant properties. * It is expected that the client supplies values for the properties * listed in Appendix A of the JavaMail spec (particularly - * mail.store.protocol, + * mail.store.protocol, * mail.transport.protocol, * mail.host, * mail.user, @@ -389,20 +389,20 @@ public final class Session } return defaultSession; } - + /** * Get the default Session object. - * If a default has not yet been setup, a new Session object is created + * If a default has not yet been setup, a new Session object is created * and installed as the default. *

    - * Note that a default session created with no Authenticator is available - * to all code executing in the same Java virtual machine, and the session - * can contain security sensitive information such as user names and + * Note that a default session created with no Authenticator is available + * to all code executing in the same Java virtual machine, and the session + * can contain security sensitive information such as user names and * passwords. * @param props Properties object that hold relevant properties. * It is expected that the client supplies values for the properties * listed in Appendix A of the JavaMail spec(particularly - * mail.store.protocol, + * mail.store.protocol, * mail.transport.protocol, * mail.host, * mail.user, @@ -419,10 +419,10 @@ public final class Session *

    * Since the debug setting can be turned on only after the Session has been * created, to turn on debugging in the Session constructor, set the property - * mail.debug in the Properties object passed in to the - * constructor to true. The value of the mail.debug property - * is used to initialize the per-Session debugging flag. Subsequent calls - * to the setDebug method manipulate the per-Session debugging + * mail.debug in the Properties object passed in to the + * constructor to true. The value of the mail.debug property + * is used to initialize the per-Session debugging flag. Subsequent calls + * to the setDebug method manipulate the per-Session debugging * flag and have no affect on the mail.debug property. */ public void setDebug(boolean debug) @@ -439,8 +439,8 @@ public final class Session } /** - * This method returns an array of all the implementations installed - * via the javamail.[default.]providers files that can be loaded + * This method returns an array of all the implementations installed + * via the javamail.[default.]providers files that can be loaded * using the ClassLoader available to this application. */ public Provider[] getProviders() @@ -452,14 +452,14 @@ public final class Session /** * Returns the default Provider for the protocol specified. - * Checks mail.<protocol>.class property first - * and if it exists, returns the Provider associated with - * this implementation. If it doesn't exist, returns the Provider that - * appeared first in the configuration files. - * If an implementation for the protocol isn't found, + * Checks mail.<protocol>.class property first + * and if it exists, returns the Provider associated with + * this implementation. If it doesn't exist, returns the Provider that + * appeared first in the configuration files. + * If an implementation for the protocol isn't found, * throws NoSuchProviderException * @param protocol Configured protocol(i.e. smtp, imap, etc) - * @param NoSuchProviderException If a provider for the given protocol + * @param NoSuchProviderException If a provider for the given protocol * is not found. */ public Provider getProvider(String protocol) @@ -512,7 +512,7 @@ public final class Session /** * Get a Store object that implements this user's desired Store protocol. - * The mail.store.protocol property specifies the desired + * The mail.store.protocol property specifies the desired * protocol. If an appropriate Store object is not obtained, * NoSuchProviderException is thrown */ @@ -536,8 +536,8 @@ public final class Session /** * Get a Store object for the given URLName. * If the requested Store object cannot be obtained, - * NoSuchProviderException is thrown. - * The "scheme" part of the URL string(Refer RFC 1738) is used to + * NoSuchProviderException is thrown. + * The "scheme" part of the URL string(Refer RFC 1738) is used to * locate the Store protocol. * @param url URLName that represents the desired Store */ @@ -576,7 +576,7 @@ public final class Session throw new NoSuchProviderException("not a store"); } } - + /** * Get a Transport object that implements this user's desired Transport * protocol. @@ -605,7 +605,7 @@ public final class Session /** * Get a Transport object for the given URLName. * If the requested Transport object cannot be obtained, - * NoSuchProviderException is thrown. The "scheme" part of the URL + * NoSuchProviderException is thrown. The "scheme" part of the URL * string(Refer RFC 1738) is used to locate the Transport protocol. * @param url URLName that represents the desired Transport * @exception NoSuchProviderException If the provider is not found. @@ -667,16 +667,16 @@ public final class Session * Get a closed Folder object for the given URLName. * If the requested Folder object cannot be obtained, null is returned. *

    - * The "scheme" part of the URL string(Refer RFC 1738) is used to locate + * The "scheme" part of the URL string(Refer RFC 1738) is used to locate * the Store protocol. The rest of the URL string(that is, the - * "schemepart", as per RFC 1738) is used by that Store in a protocol + * "schemepart", as per RFC 1738) is used by that Store in a protocol * dependent manner to locate and instantiate the appropriate Folder object. *

    * Note that RFC 1738 also specifies the syntax for the "schemepart" for * IP-based protocols(IMAP4, POP3, etc.). Providers of IP-based mail Stores * should implement that syntax for referring to Folders. * @param url URLName that represents the desired folder - * @exception NoSuchProviderException If a provider for the given URLName + * @exception NoSuchProviderException If a provider for the given URLName * is not found. * @param MessagingException if the Folder could not be located or created. */ @@ -700,7 +700,7 @@ public final class Session url = new URLName(provider.getProtocol(), null, -1, null, null, null); } - + Class providerClass = null; ClassLoader loader; if (authenticator != null) @@ -753,7 +753,7 @@ public final class Session /** * Save a PasswordAuthentication for this(store or transport) URLName. - * If pw is null the entry corresponding to the URLName + * If pw is null the entry corresponding to the URLName * is removed. *

    * This is normally used only by the store or transport implementations to @@ -788,7 +788,7 @@ public final class Session *

        Connecting to  mail service on host , port .
        
    -   
    +
        User Name: 
        Password:
        * @param addr InetAddress of the host. may be null.
    @@ -803,13 +803,13 @@ public final class Session
       {
         if (authenticator != null)
           {
    -        return authenticator.requestPasswordAuthentication(address, port, 
    +        return authenticator.requestPasswordAuthentication(address, port,
                                                                protocol, prompt,
                                                                defaultUserName);
           }
         return null;
       }
    -  
    +
       /**
        * Returns the Properties object associated with this Session.
        */
    @@ -817,7 +817,7 @@ public final class Session
       {
         return props;
       }
    -  
    +
       /**
        * Returns the value of the specified property.
        * Returns null if this property does not exist.
    Index: source/javax/mail/Store.java
    ===================================================================
    RCS file: /sources/classpathx/mail/source/javax/mail/Store.java,v
    retrieving revision 1.11
    diff -u -p -r1.11 Store.java
    --- source/javax/mail/Store.java	26 Nov 2005 18:40:20 -0000	1.11
    +++ source/javax/mail/Store.java	21 Nov 2007 05:10:00 -0000
    @@ -1,19 +1,19 @@
     /*
      * Store.java
      * Copyright (C) 2002 The Free Software Foundation
    - * 
    + *
      * This file is part of GNU JavaMail, a library.
    - * 
    + *
      * GNU JavaMail is free software; you can redistribute it and/or modify
      * it under the terms of the GNU General Public License as published by
      * the Free Software Foundation; either version 2 of the License, or
      * (at your option) any later version.
    - * 
    + *
      * GNU JavaMail is distributed in the hope that it will be useful,
      * but WITHOUT ANY WARRANTY; without even the implied warranty of
      * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      * GNU General Public License for more details.
    - * 
    + *
      * You should have received a copy of the GNU General Public License
      * along with this library; if not, write to the Free Software
      * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
    @@ -39,7 +39,7 @@ import javax.mail.event.StoreListener;
      * @author Chris Burdess
      * @version 1.4
      */
    -public abstract class Store 
    +public abstract class Store
       extends Service
     {
     
    @@ -117,7 +117,7 @@ public abstract class Store 
       }
     
       // -- Event management --
    -  
    +
       /*
        * Because the propagation of events of different kinds in the JavaMail
        * API is so haphazard, I have here sacrificed a small time advantage for
    @@ -129,10 +129,10 @@ public abstract class Store 
        *
        * Note that all events are currently delivered synchronously, where in
        * Sun's implementation a different thread is used for event delivery.
    -   * 
    +   *
        * TODO Examine the impact of this.
        */
    -  
    +
       // -- Store events --
     
       /**
    @@ -245,10 +245,10 @@ public abstract class Store 
       /**
        * Notifies all folder listeners about the renaming of a folder.
        */
    -  protected void notifyFolderRenamedListeners(Folder oldFolder, 
    +  protected void notifyFolderRenamedListeners(Folder oldFolder,
                                                    Folder newFolder)
       {
    -    FolderEvent event = new FolderEvent(this, oldFolder, newFolder, 
    +    FolderEvent event = new FolderEvent(this, oldFolder, newFolder,
                                              FolderEvent.RENAMED);
         fireFolderRenamed(event);
       }
    Index: source/javax/mail/StoreClosedException.java
    ===================================================================
    RCS file: /sources/classpathx/mail/source/javax/mail/StoreClosedException.java,v
    retrieving revision 1.10
    diff -u -p -r1.10 StoreClosedException.java
    --- source/javax/mail/StoreClosedException.java	26 Nov 2005 18:40:20 -0000	1.10
    +++ source/javax/mail/StoreClosedException.java	21 Nov 2007 05:10:00 -0000
    @@ -1,19 +1,19 @@
     /*
      * StoreClosedException.java
      * Copyright (C) 2002 The Free Software Foundation
    - * 
    + *
      * This file is part of GNU JavaMail, a library.
    - * 
    + *
      * GNU JavaMail is free software; you can redistribute it and/or modify
      * it under the terms of the GNU General Public License as published by
      * the Free Software Foundation; either version 2 of the License, or
      * (at your option) any later version.
    - * 
    + *
      * GNU JavaMail is distributed in the hope that it will be useful,
      * but WITHOUT ANY WARRANTY; without even the implied warranty of
      * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      * GNU General Public License for more details.
    - * 
    + *
      * You should have received a copy of the GNU General Public License
      * along with this library; if not, write to the Free Software
      * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
    @@ -38,7 +38,7 @@ package javax.mail;
      * @author Chris Burdess
      * @version 1.4
      */
    -public class StoreClosedException 
    +public class StoreClosedException
       extends MessagingException
     {
     
    Index: source/javax/mail/Transport.java
    ===================================================================
    RCS file: /sources/classpathx/mail/source/javax/mail/Transport.java,v
    retrieving revision 1.12
    diff -u -p -r1.12 Transport.java
    --- source/javax/mail/Transport.java	26 Nov 2005 18:40:20 -0000	1.12
    +++ source/javax/mail/Transport.java	21 Nov 2007 05:10:00 -0000
    @@ -1,19 +1,19 @@
     /*
      * Transport.java
      * Copyright (C) 2002 The Free Software Foundation
    - * 
    + *
      * This file is part of GNU JavaMail, a library.
    - * 
    + *
      * GNU JavaMail is free software; you can redistribute it and/or modify
      * it under the terms of the GNU General Public License as published by
      * the Free Software Foundation; either version 2 of the License, or
      * (at your option) any later version.
    - * 
    + *
      * GNU JavaMail is distributed in the hope that it will be useful,
      * but WITHOUT ANY WARRANTY; without even the implied warranty of
      * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      * GNU General Public License for more details.
    - * 
    + *
      * You should have received a copy of the GNU General Public License
      * along with this library; if not, write to the Free Software
      * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
    @@ -40,7 +40,7 @@ import javax.mail.event.TransportListene
      * @author Chris Burdess
      * @version 1.4
      */
    -public abstract class Transport 
    +public abstract class Transport
       extends Service
     {
     
    @@ -61,11 +61,11 @@ public abstract class Transport 
     
       /**
        * Sends the specified message.
    -   * The message will be sent to all recipient addresses specified in the 
    +   * The message will be sent to all recipient addresses specified in the
        * message, using transports appropriate to each address (specified by the
        * javamail.address.map resource).
        * @param msg the message to send
    -   * @exception SendFailedException if the message could not be sent to 
    +   * @exception SendFailedException if the message could not be sent to
        * some or any of the recipients
        */
       public static void send(Message msg)
    @@ -80,7 +80,7 @@ public abstract class Transport 
        * specified in the message itself.
        * @param msg the message to send
        * @param addresses the addresses to which to send the message
    -   * @exception SendFailedException if the message could not be sent to 
    +   * @exception SendFailedException if the message could not be sent to
        * some or any of the recipients
        */
       public static void send(Message msg, Address[] addresses)
    @@ -116,15 +116,15 @@ public abstract class Transport 
                 addressesByType.put(type, addressList);
               }
           }
    -    
    +
         int size = addressesByType.size();
         if (size == 0)
           {
             throw new SendFailedException("No recipient addresses");
           }
    -    
    +
         Session session = msg.session;
    -    if (session == null) 
    +    if (session == null)
           {
             session = Session.getDefaultInstance(System.getProperties(), null);
           }
    @@ -134,18 +134,18 @@ public abstract class Transport 
         ArrayList validSent = new ArrayList();
         ArrayList validUnsent = new ArrayList();
         ArrayList invalid = new ArrayList();
    -    
    +
         for (Iterator i = addressesByType.values().iterator(); i.hasNext(); )
           {
             ArrayList addressList = (ArrayList) i.next();
             Address[] addressArray = new Address[addressList.size()];
             addressList.toArray(addressArray);
    -        
    +
             if (addressArray.length < 1)
               {
                 break;
               }
    -        
    +
             Transport transport = session.getTransport(addressArray[0]);
             if (transport == null)
               {
    @@ -169,9 +169,9 @@ public abstract class Transport 
                       {
                         ex.setNextException(sfex);
                       }
    -                
    +
                     Address[] a;
    -                
    +
                     a = sfex.getValidSentAddresses();
                     if (a != null)
                       {
    @@ -206,13 +206,13 @@ public abstract class Transport 
                   }
               }
           }
    -    
    +
         if (error || invalid.size() != 0 || validSent.size() != 0)
           {
             Address[] validSentAddresses = null;
             Address[] validUnsentAddresses = null;
             Address[] invalidAddresses = null;
    -        
    +
             if (validSent.size() > 0)
               {
                 validSentAddresses = new Address[validSent.size()];
    @@ -239,7 +239,7 @@ public abstract class Transport 
        * Sends the message to the specified list of addresses.
        * @param msg the message to be sent
        * @param addresses the addresses to send this message to
    -   * @exception SendFailedException if the send failed because of 
    +   * @exception SendFailedException if the send failed because of
        * invalid addresses
        * @exception MessagingException if the transport is not connected
        */
    @@ -247,7 +247,7 @@ public abstract class Transport 
         throws MessagingException;
     
       // -- Event management --
    -  
    +
       /*
        * Because the propagation of events of different kinds in the JavaMail
        * API is so haphazard, I have here sacrificed a small time advantage for
    @@ -259,10 +259,10 @@ public abstract class Transport 
        *
        * Note that all events are currently delivered synchronously, where in
        * Sun's implementation a different thread is used for event delivery.
    -   * 
    +   *
        * TODO Examine the impact of this.
        */
    -  
    +
       // -- Transport events --
     
       /**
    @@ -297,13 +297,13 @@ public abstract class Transport 
       /**
        * Notifies all transport listeners.
        */
    -  protected void notifyTransportListeners(int type, 
    +  protected void notifyTransportListeners(int type,
                                                Address[] validSent,
                                                Address[] validUnsent,
                                                Address[] invalid,
                                                Message msg)
       {
    -    TransportEvent event = 
    +    TransportEvent event =
           new TransportEvent(this, type, validSent, validUnsent, invalid, msg);
         switch (type)
           {
    @@ -320,7 +320,7 @@ public abstract class Transport 
       }
     
       /*
    -   * Propagates a MESSAGE_DELIVERED TransportEvent 
    +   * Propagates a MESSAGE_DELIVERED TransportEvent
        * to all registered listeners.
        */
       void fireMessageDelivered(TransportEvent event)
    @@ -339,9 +339,9 @@ public abstract class Transport 
               }
           }
       }
    -  
    +
       /*
    -   * Propagates a MESSAGE_NOT_DELIVERED TransportEvent 
    +   * Propagates a MESSAGE_NOT_DELIVERED TransportEvent
        * to all registered listeners.
        */
       void fireMessageNotDelivered(TransportEvent event)
    @@ -360,9 +360,9 @@ public abstract class Transport 
               }
           }
       }
    -  
    +
       /*
    -   * Propagates a MESSAGE_PARTIALLY_DELIVERED TransportEvent 
    +   * Propagates a MESSAGE_PARTIALLY_DELIVERED TransportEvent
        * to all registered listeners.
        */
       void fireMessagePartiallyDelivered(TransportEvent event)
    @@ -381,6 +381,6 @@ public abstract class Transport 
               }
           }
       }
    -  
    +
     }
     
    Index: source/javax/mail/UIDFolder.java
    ===================================================================
    RCS file: /sources/classpathx/mail/source/javax/mail/UIDFolder.java,v
    retrieving revision 1.11
    diff -u -p -r1.11 UIDFolder.java
    --- source/javax/mail/UIDFolder.java	26 Nov 2005 18:40:20 -0000	1.11
    +++ source/javax/mail/UIDFolder.java	21 Nov 2007 05:10:00 -0000
    @@ -1,19 +1,19 @@
     /*
      * UIDFolder.java
      * Copyright (C) 2002 The Free Software Foundation
    - * 
    + *
      * This file is part of GNU JavaMail, a library.
    - * 
    + *
      * GNU JavaMail is free software; you can redistribute it and/or modify
      * it under the terms of the GNU General Public License as published by
      * the Free Software Foundation; either version 2 of the License, or
      * (at your option) any later version.
    - * 
    + *
      * GNU JavaMail is distributed in the hope that it will be useful,
      * but WITHOUT ANY WARRANTY; without even the implied warranty of
      * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      * GNU General Public License for more details.
    - * 
    + *
      * You should have received a copy of the GNU General Public License
      * along with this library; if not, write to the Free Software
      * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
    @@ -38,7 +38,7 @@ import java.util.NoSuchElementException;
      * fashion; that is, if the message number of message x is greater
      * than the message number of message y, its UID will also be greater
      * than that of y.
    - * 
    + *
      * @see RFC 2060 http://www.ietf.org/rfc/rfc2060.txt
      * @author Chris Burdess
      * @version 1.4
    @@ -47,9 +47,9 @@ public interface UIDFolder
     {
     
       /**
    -   * A fetch profile item for fetching UIDs. 
    +   * A fetch profile item for fetching UIDs.
        */
    -  static class FetchProfileItem 
    +  static class FetchProfileItem
         extends FetchProfile.Item
       {
     
    @@ -62,12 +62,12 @@ public interface UIDFolder
         {
           super(name);
         }
    -    
    +
       }
     
       /**
        * This special value can be used as the end parameter in
    -   * getMessages(start, end) to denote the last UID 
    +   * getMessages(start, end) to denote the last UID
        * in this folder.
        */
       long LASTUID = -1L;
    @@ -75,7 +75,7 @@ public interface UIDFolder
       /**
        * Returns the UIDValidity value associated with this folder.
        * 

    - * A client should compare this value against a UIDValidity value + * A client should compare this value against a UIDValidity value * saved from a previous session to ensure that any cached UIDs are valid. */ long getUIDValidity() @@ -91,7 +91,7 @@ public interface UIDFolder /** * Returns the messages in the given range. - * The special value LASTUID can be used as the end parameter + * The special value LASTUID can be used as the end parameter * to indicate the last available UID. * @param start the start UID * @param end the end UID @@ -110,13 +110,13 @@ public interface UIDFolder throws MessagingException; /** - * Returns the UID for the specified message. + * Returns the UID for the specified message. * @param message a message in this folder * @exception NoSuchElementException if the given message is not in this * folder */ long getUID(Message message) throws MessagingException; - + } Index: source/javax/mail/URLName.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/URLName.java,v retrieving revision 1.11 diff -u -p -r1.11 URLName.java --- source/javax/mail/URLName.java 26 Nov 2005 18:40:20 -0000 1.11 +++ source/javax/mail/URLName.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * URLName.java * Copyright(C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *(at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -59,14 +59,14 @@ public class URLName private InetAddress hostAddress; private boolean gotHostAddress = false; - - + + private int hashCode; /** * Creates a URLName object from the specified protocol, host, * port number, file, username, and password. - * Specifying a port number of -1 indicates that the URL should + * Specifying a port number of -1 indicates that the URL should * use the default port for the protocol. */ public URLName(String protocol, String host, int port, @@ -116,7 +116,7 @@ public class URLName } /** - * Returns the protocol of this URLName. + * Returns the protocol of this URLName. * Returns null if this URLName has no protocol. */ public String getProtocol() @@ -233,7 +233,7 @@ public class URLName } return fullURL; } - + /** * Compares two URLNames. The result is true if and only if the argument is * not null and is a URLName object that represents the same URLName as this @@ -274,7 +274,7 @@ public class URLName return false; } } - if (username != url.username && + if (username != url.username && (username==null || !username.equals(url.username))) { return false; @@ -377,7 +377,7 @@ public class URLName { hostPart = url.substring(colonIndex + 3); } - + // user:password@host? int atIndex = hostPart.lastIndexOf('@'); if (atIndex != -1) @@ -395,7 +395,7 @@ public class URLName username = userPart; } } - + // host:port? if (hostPart.length() > 0 && hostPart.charAt(0) == '[') { @@ -430,7 +430,7 @@ public class URLName { file = url.substring(colonIndex + 1); } - + int hashIndex = (file != null) ? file.indexOf('#') : -1; if (hashIndex != -1) { @@ -438,5 +438,5 @@ public class URLName file = file.substring(0, hashIndex); } } - + } Index: source/javax/mail/event/ConnectionAdapter.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/event/ConnectionAdapter.java,v retrieving revision 1.10 diff -u -p -r1.10 ConnectionAdapter.java --- source/javax/mail/event/ConnectionAdapter.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/event/ConnectionAdapter.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * ConnectionAdapter.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -28,7 +28,7 @@ package javax.mail.event; /** - * An adapter for connection events. + * An adapter for connection events. * * @author Chris Burdess * @version 1.4 Index: source/javax/mail/event/ConnectionEvent.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/event/ConnectionEvent.java,v retrieving revision 1.10 diff -u -p -r1.10 ConnectionEvent.java --- source/javax/mail/event/ConnectionEvent.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/event/ConnectionEvent.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * ConnectionEvent.java * Copyright (C) 2002 The Free Software Fooundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/event/ConnectionListener.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/event/ConnectionListener.java,v retrieving revision 1.11 diff -u -p -r1.11 ConnectionListener.java --- source/javax/mail/event/ConnectionListener.java 26 Nov 2005 18:40:20 -0000 1.11 +++ source/javax/mail/event/ConnectionListener.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * ConnectionListener.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/event/FolderAdapter.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/event/FolderAdapter.java,v retrieving revision 1.10 diff -u -p -r1.10 FolderAdapter.java --- source/javax/mail/event/FolderAdapter.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/event/FolderAdapter.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * FolderAdapter.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/event/FolderEvent.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/event/FolderEvent.java,v retrieving revision 1.10 diff -u -p -r1.10 FolderEvent.java --- source/javax/mail/event/FolderEvent.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/event/FolderEvent.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * FolderEvent.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -87,7 +87,7 @@ public class FolderEvent * @param newFolder the folder that represents the new name * @param type the event type (RENAMED) */ - public FolderEvent(Object source, Folder oldFolder, Folder newFolder, + public FolderEvent(Object source, Folder oldFolder, Folder newFolder, int type) { super(source); Index: source/javax/mail/event/FolderListener.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/event/FolderListener.java,v retrieving revision 1.11 diff -u -p -r1.11 FolderListener.java --- source/javax/mail/event/FolderListener.java 26 Nov 2005 18:40:20 -0000 1.11 +++ source/javax/mail/event/FolderListener.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * FolderListener.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -53,6 +53,6 @@ public interface FolderListener * A folder was renamed. */ void folderRenamed(FolderEvent e); - + } Index: source/javax/mail/event/MailEvent.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/event/MailEvent.java,v retrieving revision 1.10 diff -u -p -r1.10 MailEvent.java --- source/javax/mail/event/MailEvent.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/event/MailEvent.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * MessagingException.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -35,7 +35,7 @@ import java.util.EventObject; * @author Chris Burdess * @version 1.4 */ -public abstract class MailEvent +public abstract class MailEvent extends EventObject { @@ -48,5 +48,5 @@ public abstract class MailEvent * Invokes the appropriate method on a listener for this type of event. */ public abstract void dispatch(Object listener); - + } Index: source/javax/mail/event/MessageChangedEvent.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/event/MessageChangedEvent.java,v retrieving revision 1.10 diff -u -p -r1.10 MessageChangedEvent.java --- source/javax/mail/event/MessageChangedEvent.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/event/MessageChangedEvent.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * MessageChangedEvent.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -35,7 +35,7 @@ import javax.mail.Message; * @author Chris Burdess * @version 1.4 */ -public class MessageChangedEvent +public class MessageChangedEvent extends MailEvent { @@ -95,6 +95,6 @@ public class MessageChangedEvent { ((MessageChangedListener) listener).messageChanged(this); } - + } Index: source/javax/mail/event/MessageChangedListener.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/event/MessageChangedListener.java,v retrieving revision 1.11 diff -u -p -r1.11 MessageChangedListener.java --- source/javax/mail/event/MessageChangedListener.java 26 Nov 2005 18:40:20 -0000 1.11 +++ source/javax/mail/event/MessageChangedListener.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * MessageChangeListener.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/event/MessageCountAdapter.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/event/MessageCountAdapter.java,v retrieving revision 1.10 diff -u -p -r1.10 MessageCountAdapter.java --- source/javax/mail/event/MessageCountAdapter.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/event/MessageCountAdapter.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * MessageCountAdapter.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/event/MessageCountEvent.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/event/MessageCountEvent.java,v retrieving revision 1.10 diff -u -p -r1.10 MessageCountEvent.java --- source/javax/mail/event/MessageCountEvent.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/event/MessageCountEvent.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * MessageCountEvent.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -73,7 +73,7 @@ public class MessageCountEvent * @param removed whether this event is the result of a specific expunge * @param msgs the messages added or removed */ - public MessageCountEvent(Folder source, int type, boolean removed, + public MessageCountEvent(Folder source, int type, boolean removed, Message[] msgs) { super(source); Index: source/javax/mail/event/MessageCountListener.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/event/MessageCountListener.java,v retrieving revision 1.11 diff -u -p -r1.11 MessageCountListener.java --- source/javax/mail/event/MessageCountListener.java 26 Nov 2005 18:40:20 -0000 1.11 +++ source/javax/mail/event/MessageCountListener.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * MessageCountListener.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -48,6 +48,6 @@ public interface MessageCountListener * Messages were removed (expunged) from a folder. */ void messagesRemoved(MessageCountEvent e); - + } Index: source/javax/mail/event/StoreEvent.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/event/StoreEvent.java,v retrieving revision 1.10 diff -u -p -r1.10 StoreEvent.java --- source/javax/mail/event/StoreEvent.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/event/StoreEvent.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * StoreEvent.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -95,5 +95,5 @@ public class StoreEvent { ((StoreListener) listener).notification(this); } - + } Index: source/javax/mail/event/StoreListener.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/event/StoreListener.java,v retrieving revision 1.11 diff -u -p -r1.11 StoreListener.java --- source/javax/mail/event/StoreListener.java 26 Nov 2005 18:40:20 -0000 1.11 +++ source/javax/mail/event/StoreListener.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * StoreListener.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/event/TransportAdapter.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/event/TransportAdapter.java,v retrieving revision 1.10 diff -u -p -r1.10 TransportAdapter.java --- source/javax/mail/event/TransportAdapter.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/event/TransportAdapter.java 21 Nov 2007 05:10:00 -0000 @@ -1,19 +1,19 @@ /* * TransportAdapter.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/event/TransportEvent.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/event/TransportEvent.java,v retrieving revision 1.11 diff -u -p -r1.11 TransportEvent.java --- source/javax/mail/event/TransportEvent.java 26 Nov 2005 18:40:20 -0000 1.11 +++ source/javax/mail/event/TransportEvent.java 21 Nov 2007 05:10:01 -0000 @@ -1,19 +1,19 @@ /* * TransportEvent.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -47,7 +47,7 @@ public class TransportEvent public static final int MESSAGE_DELIVERED = 1; /** - * The message was not sent. + * The message was not sent. */ public static final int MESSAGE_NOT_DELIVERED = 2; @@ -104,7 +104,7 @@ public class TransportEvent } /** - * Returns the addresses that are valid but to which this message was not + * Returns the addresses that are valid but to which this message was not * delivered. */ public Address[] getValidUnsentAddresses() Index: source/javax/mail/event/TransportListener.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/event/TransportListener.java,v retrieving revision 1.11 diff -u -p -r1.11 TransportListener.java --- source/javax/mail/event/TransportListener.java 26 Nov 2005 18:40:20 -0000 1.11 +++ source/javax/mail/event/TransportListener.java 21 Nov 2007 05:10:01 -0000 @@ -1,19 +1,19 @@ /* * TransportListener.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -53,6 +53,6 @@ public interface TransportListener * A message was partially delivered. */ void messagePartiallyDelivered(TransportEvent e); - + } Index: source/javax/mail/internet/AddressException.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/internet/AddressException.java,v retrieving revision 1.10 diff -u -p -r1.10 AddressException.java --- source/javax/mail/internet/AddressException.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/internet/AddressException.java 21 Nov 2007 05:10:01 -0000 @@ -1,19 +1,19 @@ /* * AddressException.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -120,6 +120,6 @@ public class AddressException } return buffer.toString(); } - + } Index: source/javax/mail/internet/ContentDisposition.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/internet/ContentDisposition.java,v retrieving revision 1.10 diff -u -p -r1.10 ContentDisposition.java --- source/javax/mail/internet/ContentDisposition.java 26 Nov 2005 18:40:20 -0000 1.10 +++ source/javax/mail/internet/ContentDisposition.java 21 Nov 2007 05:10:01 -0000 @@ -1,19 +1,19 @@ /* * ContentDisposition.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -79,9 +79,9 @@ public class ContentDisposition { throw new ParseException(); } - + disposition = token.getValue(); - + s = ht.getRemainder(); if (s != null) { @@ -165,7 +165,7 @@ public class ContentDisposition { StringBuffer buffer = new StringBuffer(); buffer.append(disposition); - + // Add the parameters, using the toString(int) method // which allows the resulting string to fold properly onto the next // header line. @@ -174,6 +174,6 @@ public class ContentDisposition return buffer.toString(); } } - + } Index: source/javax/mail/internet/ContentType.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/internet/ContentType.java,v retrieving revision 1.11 diff -u -p -r1.11 ContentType.java --- source/javax/mail/internet/ContentType.java 26 Nov 2005 18:40:20 -0000 1.11 +++ source/javax/mail/internet/ContentType.java 21 Nov 2007 05:10:01 -0000 @@ -1,19 +1,19 @@ /* * ContentType.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -201,7 +201,7 @@ public class ContentType { return null; } - + StringBuffer buffer = new StringBuffer(); buffer.append(primaryType); buffer.append('/'); @@ -258,6 +258,6 @@ public class ContentType return false; } } - + } Index: source/javax/mail/internet/HeaderTokenizer.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/internet/HeaderTokenizer.java,v retrieving revision 1.11 diff -u -p -r1.11 HeaderTokenizer.java --- source/javax/mail/internet/HeaderTokenizer.java 26 Nov 2005 18:40:20 -0000 1.11 +++ source/javax/mail/internet/HeaderTokenizer.java 21 Nov 2007 05:10:01 -0000 @@ -1,19 +1,19 @@ /* * HeaderTokenizer.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -56,7 +56,7 @@ public class HeaderTokenizer /** * A comment. - * The value of this token is the comment string without the comment + * The value of this token is the comment string without the comment * start and end symbols. */ public static final int COMMENT = -3; @@ -87,14 +87,14 @@ public class HeaderTokenizer this.type = type; this.value = value; } - + /** * Returns the token type. * If the token is a delimiter or a control character, * the type is the integer value of that character. * Otherwise, its value is one of the following: *

      - *
    • ATOM: a sequence of ASCII characters delimited by either + *
    • ATOM: a sequence of ASCII characters delimited by either * SPACE, CTL, '(', '"' or the specified SPECIALS *
    • QUOTEDSTRING: a sequence of ASCII characters within quotes *
    • COMMENT: a sequence of ASCII characters within '(' and ')' @@ -125,7 +125,7 @@ public class HeaderTokenizer * MIME specials. */ public static final String MIME = "()<>@,;:\\\"\t []/?="; - + /* * The EOF token. */ @@ -163,7 +163,7 @@ public class HeaderTokenizer * peek(). */ private int peek = 0; - + private int maxPos; /** @@ -256,10 +256,10 @@ public class HeaderTokenizer { return EOF; } - + boolean needsFilter = false; char c; - + // comment for (c = header.charAt(pos); c == '('; c = header.charAt(pos)) { @@ -287,12 +287,12 @@ public class HeaderTokenizer } pos++; } - + if (parenCount != 0) { throw new ParseException("Illegal comment"); } - + if (!skipComments) { String ret = needsFilter ? @@ -300,13 +300,13 @@ public class HeaderTokenizer header.substring(start, pos - 1); return new Token(Token.COMMENT, ret); } - + if (skipWhitespace() == Token.EOF) { return EOF; } } - + // quotedstring if (c == '"') { @@ -335,7 +335,7 @@ public class HeaderTokenizer } throw new ParseException("Illegal quoted string"); } - + // delimiter if (c < ' ' || c >= '\177' || delimiters.indexOf(c) >= 0) { @@ -343,13 +343,13 @@ public class HeaderTokenizer char[] chars = new char[] { c }; return new Token(c, new String(chars)); } - + // atom int start = pos; while (pos < maxPos) { c = header.charAt(pos); - if (c < ' ' || c >= '\177' || c == '(' || c == ' ' || c == '"' || + if (c < ' ' || c >= '\177' || c == '(' || c == ' ' || c == '"' || delimiters.indexOf(c) >= 0) { break; @@ -358,7 +358,7 @@ public class HeaderTokenizer } return new Token(Token.ATOM, header.substring(start, pos)); } - + /* * Advance pos over any whitespace delimiters. */ Index: source/javax/mail/internet/InternetAddress.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/internet/InternetAddress.java,v retrieving revision 1.15 diff -u -p -r1.15 InternetAddress.java --- source/javax/mail/internet/InternetAddress.java 26 Apr 2007 10:16:51 -0000 1.15 +++ source/javax/mail/internet/InternetAddress.java 21 Nov 2007 05:10:01 -0000 @@ -1,19 +1,19 @@ /* * InternetAddress.java * Copyright (C) 2002, 2004 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -65,7 +65,7 @@ public class InternetAddress * The RFC 2047 encoded version of the personal name. */ protected String encodedPersonal; - + /** * Constructor for an empty address. */ @@ -305,7 +305,7 @@ public class InternetAddress { } } - + StringBuffer buffer = new StringBuffer(); if (encodedPersonal != null) { @@ -391,7 +391,7 @@ public class InternetAddress if (other instanceof InternetAddress) { String otherAddress = ((InternetAddress) other).getAddress(); - return (this == other || + return (this == other || (address != null && address.equalsIgnoreCase(otherAddress))); } return false; @@ -450,7 +450,7 @@ public class InternetAddress fl = addressText.length(); } int ll = addressText.lastIndexOf(crlf); // pos of last crlf - + if ((used + fl) > 76) { buffer.append("\r\n\t"); @@ -538,7 +538,7 @@ public class InternetAddress } /** - * Parses the given comma-separated sequence of RFC 822 addresses into + * Parses the given comma-separated sequence of RFC 822 addresses into * InternetAddresses. * @param addresslist the comma-separated addresses * @exception AddressException if the parse failed @@ -552,7 +552,7 @@ public class InternetAddress /** * Parses the given comma-separated sequence of RFC 822 addresses into * InternetAddresses. - * If strict is false, simple email addresses separated by + * If strict is false, simple email addresses separated by * spaces are also allowed. If strict is true, many (but not * all) of the RFC 822 syntax rules are enforced. * Even if strict is true, addresses composed of simple @@ -570,7 +570,7 @@ public class InternetAddress /** * Parses the given comma-separated sequence of RFC 822 addresses into * InternetAddresses. - * If strict is false, simple email addresses separated by + * If strict is false, simple email addresses separated by * spaces are also allowed. If strict is true, many (but not * all) of the RFC 822 syntax rules are enforced. * @param addresslist the comma-separated addresses @@ -633,7 +633,7 @@ public class InternetAddress case '\r': case ' ': break; - + case '<': // bra-ket delimited address inAddress = true; if (gotDelimiter) @@ -688,7 +688,7 @@ public class InternetAddress break; case '>': throw new AddressException("Unmatched '>'", addresslist, pos); - + case '(': // paren delimited personal inAddress = true; if (pStart >= 0 && pEnd == -1) @@ -730,7 +730,7 @@ public class InternetAddress break; case ')': throw new AddressException("Unmatched ')'", addresslist, pos); - + case '"': // quote delimited personal inAddress = true; if (pStart == -1) @@ -760,7 +760,7 @@ public class InternetAddress addresslist, pos); } break; - + case '[': inAddress = true; pos++; @@ -786,7 +786,7 @@ public class InternetAddress addresslist, pos); } break; - + case ',': // address delimiter if (pStart == -1) { @@ -841,7 +841,7 @@ public class InternetAddress pStart = -1; pEnd = -1; break; - + case ':': // group indicator inAddress = true; if (inGroup) @@ -869,7 +869,7 @@ public class InternetAddress gotDelimiter = false; pStart = pEnd = -1; break; - + default: if (pStart == -1) { @@ -878,7 +878,7 @@ public class InternetAddress break; } } - + if (pStart > -1) { if (pEnd == -1) @@ -916,7 +916,7 @@ public class InternetAddress } } } - + InternetAddress[] addresses = new InternetAddress[acc.size()]; acc.toArray(addresses); return addresses; @@ -956,7 +956,7 @@ public class InternetAddress } } } - + // Get atomic parts String localName = address; String domain = null; @@ -978,7 +978,7 @@ public class InternetAddress { throw new AddressException("Missing final @domain", address); } - + // Check atomic parts String illegalWS = "\t\n\r "; int len = 4; // illegalWS.length() @@ -1048,7 +1048,7 @@ public class InternetAddress needsQuotes = true; } } - + if (needsQuotes) { StringBuffer buffer = new StringBuffer(len + 2); Index: source/javax/mail/internet/InternetHeaders.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/internet/InternetHeaders.java,v retrieving revision 1.22 diff -u -p -r1.22 InternetHeaders.java --- source/javax/mail/internet/InternetHeaders.java 27 Mar 2007 14:41:54 -0000 1.22 +++ source/javax/mail/internet/InternetHeaders.java 21 Nov 2007 05:10:01 -0000 @@ -1,19 +1,19 @@ /* * InternetHeaders.java * Copyright (C) 2002, 2005 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -61,7 +61,7 @@ public class InternetHeaders protected static class InternetHeader extends Header { - + /** * The name. * @since JavaMail 1.4 @@ -73,7 +73,7 @@ public class InternetHeaders * @since JavaMail 1.4 */ protected String line; - + public InternetHeader(String line) { super(null, null); @@ -81,7 +81,7 @@ public class InternetHeaders name = (i < 0) ? line.trim() : line.substring(0, i).trim(); this.line = line; } - + public InternetHeader(String name, String value) { super(null, null); @@ -109,7 +109,7 @@ public class InternetHeaders { return line; } - + int pos, len = line.length(); for (pos = i + 1; pos < len; pos++) { @@ -119,7 +119,7 @@ public class InternetHeaders break; } } - + return line.substring(pos); } @@ -137,7 +137,7 @@ public class InternetHeaders { return name.equalsIgnoreCase(other); } - + } /* @@ -152,7 +152,7 @@ public class InternetHeaders private boolean stringForm; private boolean matching; private InternetHeader nextHeader; - + HeaderEnumeration(Iterator source, String[] names, boolean stringForm, boolean matching) { @@ -161,7 +161,7 @@ public class InternetHeaders this.stringForm = stringForm; this.matching = matching; } - + /** * Enumeration syntax */ @@ -181,7 +181,7 @@ public class InternetHeaders } return (nextHeader != null); } - + /** * Enumeration syntax */ @@ -203,10 +203,10 @@ public class InternetHeaders { throw new NoSuchElementException(); } - + InternetHeader header = nextHeader; nextHeader = null; - + if (stringForm) { return header.line; @@ -218,37 +218,37 @@ public class InternetHeaders { throw new UnsupportedOperationException(); } - + private InternetHeader getNext() { - while (source.hasNext()) + while (source.hasNext()) { InternetHeader header = (InternetHeader) source.next(); if (header.line == null) { continue; } - + if (names == null) { return (matching) ? null : header; } - + for (int i = 0; i < names.length; i++) { if (!header.nameEquals(names[i])) { continue; } - + if (matching) { return header; } - + return getNext(); } - + if (!matching) { return header; @@ -256,9 +256,9 @@ public class InternetHeaders } return null; } - + } - + /** * The list of headers. * @since JavaMail 1.4 @@ -319,7 +319,7 @@ public class InternetHeaders LineInputStream in = new LineInputStream(is); try { - for (String line = in.readLine(); line != null; line = in.readLine()) + for (String line = in.readLine(); line != null; line = in.readLine()) { line = trim(line); if (line.length() == 0) @@ -342,7 +342,7 @@ public class InternetHeaders public String[] getHeader(String name) { ArrayList acc = new ArrayList(headers.size()); - for (Iterator i = headers.iterator(); i.hasNext(); ) + for (Iterator i = headers.iterator(); i.hasNext(); ) { InternetHeader header = (InternetHeader) i.next(); if (header.nameEquals(name) && header.line != null) @@ -374,7 +374,7 @@ public class InternetHeaders { return null; } - + if (delimiter == null || h.length == 1) { return h[0]; @@ -574,6 +574,6 @@ public class InternetHeaders } return line; } - + } Index: source/javax/mail/internet/MailDateFormat.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/internet/MailDateFormat.java,v retrieving revision 1.11 diff -u -p -r1.11 MailDateFormat.java --- source/javax/mail/internet/MailDateFormat.java 26 Nov 2005 18:40:20 -0000 1.11 +++ source/javax/mail/internet/MailDateFormat.java 21 Nov 2007 05:10:01 -0000 @@ -1,19 +1,19 @@ /* * MailDateFormat.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -136,7 +136,7 @@ public class MailDateFormat // Get time offset in minutes int zoneOffset = (calendar.get(Calendar.ZONE_OFFSET) + calendar.get(Calendar.DST_OFFSET)) / 60000; - + // Apply + or - appropriately if (zoneOffset < 0) { @@ -147,7 +147,7 @@ public class MailDateFormat { buf.append('+'); } - + // Set the 2 2-char fields as specified above int tzhours = zoneOffset / 60; buf.append(Character.forDigit(tzhours / 10, 10)); @@ -229,7 +229,7 @@ public class MailDateFormat end = skipNonWhitespace(text, start + 1, len); int second = Integer.parseInt(text.substring(start, end)); calendar.set(Calendar.SECOND, second); - + if (end != len) { start = skipWhitespace(text, end + 1, len); @@ -265,7 +265,7 @@ public class MailDateFormat } } pos.setIndex(end); - + return calendar.getTime(); } catch (NumberFormatException e) @@ -285,7 +285,7 @@ public class MailDateFormat { pos++; } - return pos; + return pos; } private int skipNonWhitespace(final String text, int pos, final int len) @@ -294,7 +294,7 @@ public class MailDateFormat { pos++; } - return pos; + return pos; } private int skipToColon(final String text, int pos, final int len) @@ -303,7 +303,7 @@ public class MailDateFormat { pos++; } - return pos; + return pos; } /** Index: source/javax/mail/internet/MimeBodyPart.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/internet/MimeBodyPart.java,v retrieving revision 1.18 diff -u -p -r1.18 MimeBodyPart.java --- source/javax/mail/internet/MimeBodyPart.java 16 Jul 2007 18:05:24 -0000 1.18 +++ source/javax/mail/internet/MimeBodyPart.java 21 Nov 2007 05:10:01 -0000 @@ -1,19 +1,19 @@ /* * MimeBodyPart.java * Copyright (C) 2002, 2004, 2005 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -102,7 +102,7 @@ public class MimeBodyPart static final String CONTENT_MD5_NAME = "Content-MD5"; static final String CONTENT_LANGUAGE_NAME = "Content-Language"; static final String CONTENT_DESCRIPTION_NAME = "Content-Description"; - + static final String TEXT_PLAIN = "text/plain"; /** @@ -130,17 +130,17 @@ public class MimeBodyPart contentStream = sis.newStream(sis.getPosition(), -1L); return; } - + // Buffer the stream if necessary if (!(is instanceof ByteArrayInputStream) && !(is instanceof BufferedInputStream)) { is = new BufferedInputStream(is); } - + // Read the headers headers = new InternetHeaders(is); - + // Read stream into byte array(see MimeMessage.parse()) try { @@ -277,9 +277,9 @@ public class MimeBodyPart /** * Sets the Content-Disposition header field of this part. - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification - * @exception IllegalStateException if this body part is obtained + * @exception IllegalStateException if this body part is obtained * from a READ_ONLY folder */ public void setDisposition(String disposition) @@ -312,8 +312,8 @@ public class MimeBodyPart if (encoding != null) { encoding = encoding.trim(); - if (encoding.equalsIgnoreCase("7bit") || - encoding.equalsIgnoreCase("8bit") || + if (encoding.equalsIgnoreCase("7bit") || + encoding.equalsIgnoreCase("8bit") || encoding.equalsIgnoreCase("quoted-printable") || encoding.equalsIgnoreCase("base64")) { @@ -349,9 +349,9 @@ public class MimeBodyPart /** * Sets the Content-ID header field of this part. - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification - * @exception IllegalStateException if this body part is obtained + * @exception IllegalStateException if this body part is obtained * from a READ_ONLY folder * @since JavaMail 1.3 */ @@ -379,9 +379,9 @@ public class MimeBodyPart /** * Sets the Content-MD5 header field of this part. - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification - * @exception IllegalStateException if this body part is obtained + * @exception IllegalStateException if this body part is obtained * from a READ_ONLY folder */ public void setContentMD5(String md5) @@ -392,7 +392,7 @@ public class MimeBodyPart /** * Returns the languages specified in the Content-Language header of this - * part, as defined by RFC 1766. This method returns null if + * part, as defined by RFC 1766. This method returns null if * this header is not available. */ public String[] getContentLanguage() @@ -415,7 +415,7 @@ public class MimeBodyPart acc.add(token.getValue()); break; } - } + } if (acc.size() > 0) { String[] languages = new String[acc.size()]; @@ -429,9 +429,9 @@ public class MimeBodyPart /** * Sets the Content-Language header of this part. * @param languages the array of language tags - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification - * @exception IllegalStateException if this body part is obtained + * @exception IllegalStateException if this body part is obtained * from a READ_ONLY folder */ public void setContentLanguage(String[] languages) @@ -484,9 +484,9 @@ public class MimeBodyPart * If description contains non US-ASCII characters, it will * be encoded using the platform default charset. * @param description the content description - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification - * @exception IllegalStateException if this body part is obtained + * @exception IllegalStateException if this body part is obtained * from a READ_ONLY folder */ public void setDescription(String description) @@ -502,9 +502,9 @@ public class MimeBodyPart * be encoded using the specified charset. * @param description the content description * @param charset the charset used for encoding - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification - * @exception IllegalStateException if this body part is obtained + * @exception IllegalStateException if this body part is obtained * from a READ_ONLY folder */ public void setDescription(String description, String charset) @@ -579,9 +579,9 @@ public class MimeBodyPart /** * Sets the filename associated with this body part. - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification - * @exception IllegalStateException if this body part is obtained + * @exception IllegalStateException if this body part is obtained * from a READ_ONLY folder */ public void setFileName(String filename) @@ -642,7 +642,7 @@ public class MimeBodyPart } /** - * Returns the unencoded bytes of the content. + * Returns the unencoded bytes of the content. */ protected InputStream getContentStream() throws MessagingException @@ -693,9 +693,9 @@ public class MimeBodyPart /** * Sets the content of this part using the specified data handler. - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification - * @exception IllegalStateException if this body part is obtained + * @exception IllegalStateException if this body part is obtained * from a READ_ONLY folder */ public void setDataHandler(DataHandler dh) @@ -714,9 +714,9 @@ public class MimeBodyPart * installed and accept objects of the type given. * @param o the content object * @param type the MIME type of the object - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification - * @exception IllegalStateException if this body part is obtained + * @exception IllegalStateException if this body part is obtained * from a READ_ONLY folder */ public void setContent(Object o, String type) @@ -736,7 +736,7 @@ public class MimeBodyPart * Sets the content of this part using the specified text, and with a * MIME type of "text/plain". *

      - * If the text contains non US-ASCII characters, it will be encoded + * If the text contains non US-ASCII characters, it will be encoded * using the platform default charset. * @param text the text content */ @@ -750,7 +750,7 @@ public class MimeBodyPart * Sets the content of this part using the specified text, and with a * MIME type of "text/plain". *

      - * If the text contains non US-ASCII characters, it will be encoded + * If the text contains non US-ASCII characters, it will be encoded * using the specified charset. * @param text the text content * @param charset the charset used for any encoding @@ -760,12 +760,12 @@ public class MimeBodyPart { setText(text, charset, "plain"); } - + /** * Sets the content of this part using the specified text, and with a * text MIME type of the specified subtype. *

      - * If the text contains non US-ASCII characters, it will be encoded + * If the text contains non US-ASCII characters, it will be encoded * using the specified charset. * @param text the text content * @param charset the charset used for any encoding @@ -795,9 +795,9 @@ public class MimeBodyPart /** * Sets the content of this part to be the specified multipart. * @param mp the multipart content - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification - * @exception IllegalStateException if this body part is obtained + * @exception IllegalStateException if this body part is obtained * from a READ_ONLY folder */ public void setContent(Multipart mp) @@ -818,7 +818,7 @@ public class MimeBodyPart { final String charset = "US-ASCII"; final byte[] sep = { 0x0d, 0x0a }; - + // Write the headers for (Enumeration e = getAllHeaderLines(); e.hasMoreElements(); ) @@ -896,9 +896,9 @@ public class MimeBodyPart * Sets the specified header. * @param name the header name * @param value the header value - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification - * @exception IllegalStateException if this body part is obtained + * @exception IllegalStateException if this body part is obtained * from a READ_ONLY folder */ public void setHeader(String name, String value) @@ -911,9 +911,9 @@ public class MimeBodyPart * Adds the specified header. * @param name the header name * @param value the header value - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification - * @exception IllegalStateException if this body part is obtained + * @exception IllegalStateException if this body part is obtained * from a READ_ONLY folder */ public void addHeader(String name, String value) @@ -925,9 +925,9 @@ public class MimeBodyPart /** * Removes all headers with the specified name. * @param name the header name - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification - * @exception IllegalStateException if this body part is obtained + * @exception IllegalStateException if this body part is obtained * from a READ_ONLY folder */ public void removeHeader(String name) @@ -968,9 +968,9 @@ public class MimeBodyPart /** * Adds an RFC 822 header-line to this part. - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification - * @exception IllegalStateException if this body part is obtained + * @exception IllegalStateException if this body part is obtained * from a READ_ONLY folder */ public void addHeaderLine(String line) @@ -1011,9 +1011,9 @@ public class MimeBodyPart /** * Updates the headers of this part, based on the content. - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification - * @exception IllegalStateException if this body part is obtained + * @exception IllegalStateException if this body part is obtained * from a READ_ONLY folder */ protected void updateHeaders() @@ -1029,7 +1029,7 @@ public class MimeBodyPart { MimeMultipart mmp = (MimeMultipart) dh.getContent(); mmp.updateHeaders(); - } + } else if (ct.match("message/rfc822")) { } @@ -1042,7 +1042,7 @@ public class MimeBodyPart MimeUtility.getEncoding(dh)); } } - + // Update Content-Type if nonexistent, // and Content-Type "name" with Content-Disposition "filename" // parameter(see setFilename()) @@ -1096,7 +1096,7 @@ public class MimeBodyPart { attachFile(new File(file)); } - + /** * Saves the content of this part to the specified file. * @param file the file @@ -1116,7 +1116,7 @@ public class MimeBodyPart out.close(); } } - + /** * Saves the content of this part to the specified file. * @param file the file @@ -1127,6 +1127,6 @@ public class MimeBodyPart { saveFile(new File(file)); } - + } Index: source/javax/mail/internet/MimeMessage.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/internet/MimeMessage.java,v retrieving revision 1.27 diff -u -p -r1.27 MimeMessage.java --- source/javax/mail/internet/MimeMessage.java 26 Apr 2007 10:16:51 -0000 1.27 +++ source/javax/mail/internet/MimeMessage.java 21 Nov 2007 05:10:01 -0000 @@ -1,19 +1,19 @@ /* * MimeMessage.java * Copyright (C) 2002, 2004, 2005 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -95,7 +95,7 @@ public class MimeMessage if (type.equals("Newsgroups")) { return NEWSGROUPS; - } + } return super.readResolve(); } @@ -104,7 +104,7 @@ public class MimeMessage { super(type); } - + } /** @@ -146,9 +146,9 @@ public class MimeMessage /** * Indicates whether we do not need to call saveChanges on * the message. - * This flag is set to false by the public constructor and set to true + * This flag is set to false by the public constructor and set to true * by the saveChanges method. - * The writeTo method checks this flag and calls the + * The writeTo method checks this flag and calls the * saveChanges method as necessary. */ protected boolean saved; @@ -169,7 +169,7 @@ public class MimeMessage static final String SUBJECT_NAME = "Subject"; static final String DATE_NAME = "Date"; static final String MESSAGE_ID_NAME = "Message-ID"; - + /** * Constructor for an empty message. */ @@ -260,7 +260,7 @@ public class MimeMessage * @param content the content byte array * @param msgnum the message number of this message within the folder */ - protected MimeMessage(Folder folder, InternetHeaders headers, + protected MimeMessage(Folder folder, InternetHeaders headers, byte[] content, int msgnum) throws MessagingException { @@ -270,7 +270,7 @@ public class MimeMessage } /** - * Parses the given input stream, setting the headers and content fields + * Parses the given input stream, setting the headers and content fields * appropriately. * This resets the modified flag. * @param is the message input stream @@ -287,7 +287,7 @@ public class MimeMessage else { // buffer it - if (!(is instanceof ByteArrayInputStream) && + if (!(is instanceof ByteArrayInputStream) && !(is instanceof BufferedInputStream)) { is = new BufferedInputStream(is); @@ -309,7 +309,7 @@ public class MimeMessage { ByteArrayOutputStream bos = new ByteArrayOutputStream(len); byte[] b = new byte[len]; - for (int l = is.read(b); l != -1; l = is.read(b)) + for (int l = is.read(b); l != -1; l = is.read(b)) { bos.write(b, 0, l); } @@ -325,7 +325,7 @@ public class MimeMessage } // -- From -- - + /** * Returns the value of the RFC 822 From header field. * If this header field is absent, the Sender header field is used instead. @@ -344,9 +344,9 @@ public class MimeMessage /** * Sets the RFC 822 From header field. * @param address the sender of this message - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder */ public void setFrom(Address address) @@ -365,15 +365,15 @@ public class MimeMessage /** * Sets the RFC 822 From header field using the value of the * InternetAddress.getLocalAddress method. - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder */ public void setFrom() throws MessagingException { - InternetAddress localAddress = + InternetAddress localAddress = InternetAddress.getLocalAddress(session); if (localAddress != null) { @@ -388,9 +388,9 @@ public class MimeMessage /** * Adds the specified addresses to From header field. * @param addresses the senders of this message - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder */ public void addFrom(Address[] addresses) @@ -420,9 +420,9 @@ public class MimeMessage /** * Sets the RFC 822 Sender header field. * @param address the sender of this message - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder * @since JavaMail 1.3 */ @@ -434,7 +434,7 @@ public class MimeMessage } // -- To -- - + /** * Returns the recipients of the given type. * @param type the recipient type @@ -473,7 +473,7 @@ public class MimeMessage { Address[] both = new Address[recipients.length + newsgroups.length]; System.arraycopy(recipients, 0, both, 0, recipients.length); - System.arraycopy(newsgroups, 0, both, recipients.length, + System.arraycopy(newsgroups, 0, both, recipients.length, newsgroups.length); return both; } @@ -484,9 +484,9 @@ public class MimeMessage * @param type the recipient type * @param addresses the addresses, or null to remove recipients of this * type - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder */ public void setRecipients(Message.RecipientType type, Address[] addresses) @@ -514,9 +514,9 @@ public class MimeMessage * @param type the recipient type * @param addresses the addresses, or null to remove recpients of this * type - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder */ public void setRecipients(Message.RecipientType type, String addresses) @@ -544,9 +544,9 @@ public class MimeMessage * Adds the given addresses to the recipients of the specified type. * @param type the recipient type * @param addresses the addresses - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder */ public void addRecipients(Message.RecipientType type, Address[] addresses) @@ -570,9 +570,9 @@ public class MimeMessage * Adds the given addresses to the recipients of the specified type. * @param type the recipient type * @param addresses the addresses - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder */ public void addRecipients(Message.RecipientType type, String addresses) @@ -612,9 +612,9 @@ public class MimeMessage * Sets the RFC 822 Reply-To header field. * @param addresses the addresses, or null to remove this * header - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder */ public void setReplyTo(Address[] addresses) @@ -690,7 +690,7 @@ public class MimeMessage /** * Returns the value of the Subject header field. *

      - * If the subject is encoded as per RFC 2047, it is decoded and converted + * If the subject is encoded as per RFC 2047, it is decoded and converted * into Unicode. */ public String getSubject() @@ -714,12 +714,12 @@ public class MimeMessage /** * Sets the Subject header field. *

      - * If the subject contains non US-ASCII characters, it will be encoded + * If the subject contains non US-ASCII characters, it will be encoded * using the platform default charset. * @param subject the subject - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder */ public void setSubject(String subject) @@ -731,13 +731,13 @@ public class MimeMessage /** * Sets the Subject header field. *

      - * If the subject contains non US-ASCII characters, it will be encoded + * If the subject contains non US-ASCII characters, it will be encoded * using the specified charset. * @param subject the subject * @param charset the charset used for any encoding - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder */ public void setSubject(String subject, String charset) @@ -782,9 +782,9 @@ public class MimeMessage /** * Sets the RFC 822 Date header field. * @param date the sent date, or null to remove this header - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder */ public void setSentDate(Date date) @@ -891,7 +891,7 @@ public class MimeMessage public String getDisposition() throws MessagingException { - String disposition = + String disposition = getHeader(MimeBodyPart.CONTENT_DISPOSITION_NAME, null); if (disposition != null) { @@ -903,9 +903,9 @@ public class MimeMessage /** * Sets the Content-Disposition header field of this message. * @param disposition the disposition value to set, or null to remove - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder * @see MimeBodyPart#setDisposition */ @@ -936,13 +936,13 @@ public class MimeMessage public String getEncoding() throws MessagingException { - String encoding = + String encoding = getHeader(MimeBodyPart.CONTENT_TRANSFER_ENCODING_NAME, null); if (encoding != null) { encoding = encoding.trim(); - if (encoding.equalsIgnoreCase("7bit") || - encoding.equalsIgnoreCase("8bit") || + if (encoding.equalsIgnoreCase("7bit") || + encoding.equalsIgnoreCase("8bit") || encoding.equalsIgnoreCase("quoted-printable") || encoding.equalsIgnoreCase("base64")) { @@ -979,9 +979,9 @@ public class MimeMessage /** * Sets the Content-ID header field of this message. - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder */ public void setContentID(String cid) @@ -1009,9 +1009,9 @@ public class MimeMessage /** * Sets the Content-MD5 header field of this message. - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder * @see MimeBodyPart#setContentMD5 */ @@ -1052,9 +1052,9 @@ public class MimeMessage * If the description contains non US-ASCII characters, it will be encoded * using the platform default charset. * @param description the content description - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder * @see MimeBodyPart#setDescription */ @@ -1071,9 +1071,9 @@ public class MimeMessage * using the specified charset. * @param description the content description * @param charset the charset used for any encoding - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder * @see MimeBodyPart#setDescription */ @@ -1099,7 +1099,7 @@ public class MimeMessage } /** - * Returns the languages specified in the Content-Language header field + * Returns the languages specified in the Content-Language header field * of this message, as defined by RFC 1766. This method returns * null if this header is not available. * @see MimeBodyPart#getContentLanguage @@ -1124,7 +1124,7 @@ public class MimeMessage acc.add(token.getValue()); break; } - } + } if (acc.size() > 0) { String[] languages = new String[acc.size()]; @@ -1138,9 +1138,9 @@ public class MimeMessage /** * Sets the Content-Language header of this message. * @param languages the array of language tags - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder * @see MimeBodyPart#setContentLanguage */ @@ -1219,9 +1219,9 @@ public class MimeMessage /** * Sets the filename associated with this part. - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder * @see MimeBodyPart#setFileName */ @@ -1334,9 +1334,9 @@ public class MimeMessage /** * Sets the content of this part using the specified data handler. - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder * @see MimeBodyPart#setDataHandler */ @@ -1357,9 +1357,9 @@ public class MimeMessage * installed and accept objects of the type given. * @param o the content object * @param type the MIME type of the object - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder * @see MimeBodyPart#setContent */ @@ -1373,7 +1373,7 @@ public class MimeMessage * Sets the content of this message using the specified text, and with a * MIME type of "text/plain". *

      - * If the string contains non US-ASCII characters, it will be encoded + * If the string contains non US-ASCII characters, it will be encoded * using the platform default charset. * @param text the text content * @see MimeBodyPart#setText(String) @@ -1388,7 +1388,7 @@ public class MimeMessage * Sets the content of this message using the specified text, and with a * MIME type of "text/plain". *

      - * If the string contains non US-ASCII characters, it will be encoded + * If the string contains non US-ASCII characters, it will be encoded * using the specified charset. * @param text the text content * @param charset the charset used for any encoding @@ -1399,12 +1399,12 @@ public class MimeMessage { setText(text, charset, "plain"); } - + /** * Sets the content of this message using the specified text, and with a * text MIME type of the specified subtype. *

      - * If the string contains non US-ASCII characters, it will be encoded + * If the string contains non US-ASCII characters, it will be encoded * using the specified charset. * @param text the text content * @param charset the charset used for any encoding @@ -1435,9 +1435,9 @@ public class MimeMessage /** * Sets the content of this message to be the specified multipart. * @param mp the multipart content - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder * @see MimeBodyPart#setContent(Multipart) */ @@ -1477,7 +1477,7 @@ public class MimeMessage // duplication. HashSet set = new HashSet(); set.addAll(Arrays.asList(addresses)); - + InternetAddress localAddress = InternetAddress.getLocalAddress(session); if (localAddress != null) @@ -1490,12 +1490,12 @@ public class MimeMessage set.addAll( Arrays.asList( InternetAddress.parse(alternates, false))); } - + set.addAll(Arrays.asList(getRecipients(Message.RecipientType.TO))); addresses = new Address[set.size()]; set.toArray(addresses); - - boolean replyAllCC = + + boolean replyAllCC = new Boolean(session.getProperty("mail.replyallcc")).booleanValue(); if (addresses.length > 0) { @@ -1508,24 +1508,24 @@ public class MimeMessage message.addRecipients(Message.RecipientType.TO, addresses); } } - + set.clear(); set.addAll(Arrays.asList(getRecipients(Message.RecipientType.CC))); addresses = new Address[set.size()]; set.toArray(addresses); - + if (addresses != null && addresses.length > 0) { message.addRecipients(Message.RecipientType.CC, addresses); } - + addresses = getRecipients(RecipientType.NEWSGROUPS); if (addresses != null && addresses.length > 0) { message.setRecipients(RecipientType.NEWSGROUPS, addresses); } } - + // Set In-Reply-To(will be replaced by References for NNTP) String mid = getHeader(MESSAGE_ID_NAME, null); if (mid != null) @@ -1628,7 +1628,7 @@ public class MimeMessage // TODO make buffer size configurable int len = 8192; byte[] bytes = new byte[len]; - while ((len = is.read(bytes)) > -1) + while ((len = is.read(bytes)) > -1) { os.write(bytes, 0, len); } @@ -1646,7 +1646,7 @@ public class MimeMessage /** * Returns all the values for the specified header name. - * Note that headers may be encoded as per RFC 2047 if they + * Note that headers may be encoded as per RFC 2047 if they * contain non-US-ASCII characters: these should be decoded. * @param name the header name */ @@ -1674,9 +1674,9 @@ public class MimeMessage * Sets the specified header. * @param name the header name * @param value the header value - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder */ public void setHeader(String name, String value) @@ -1689,9 +1689,9 @@ public class MimeMessage * Adds the specified header. * @param name the header name * @param value the header value - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder */ public void addHeader(String name, String value) @@ -1703,9 +1703,9 @@ public class MimeMessage /** * Removes all headers with the specified name. * @param name the header name - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder */ public void removeHeader(String name) @@ -1746,9 +1746,9 @@ public class MimeMessage /** * Adds an RFC 822 header-line to this message. - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder */ public void addHeaderLine(String line) @@ -1808,9 +1808,9 @@ public class MimeMessage /** * Sets the flags for this message. - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder */ public void setFlags(Flags flag, boolean set) @@ -1830,9 +1830,9 @@ public class MimeMessage * Saves any changes to this message. * Header fields in the message are updated appropriately to be consistent * with the message contents. - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder */ public void saveChanges() @@ -1845,9 +1845,9 @@ public class MimeMessage /** * Updates the headers of this part, based on the content. - * @exception IllegalWriteException if the underlying implementation + * @exception IllegalWriteException if the underlying implementation * does not support modification of existing values - * @exception IllegalStateException if this message is obtained from + * @exception IllegalStateException if this message is obtained from * a READ_ONLY folder * @see MimeBodyPart#updateHeaders */ @@ -1865,7 +1865,7 @@ public class MimeMessage { MimeMultipart mmp = (MimeMultipart) dh.getContent(); mmp.updateHeaders(); - } + } else if (ct.match("message/rfc822")) { } @@ -1906,14 +1906,14 @@ public class MimeMessage throw new MessagingException("I/O error", e); } } - + // Below is MimeMessage-specific. // set mime version setHeader("Mime-Version", "1.0"); // set new message-id if necessary updateMessageId(); } - + /** * Creates the headers from the given input stream. * @param is the input stream to read the headers from Index: source/javax/mail/internet/MimeMultipart.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/internet/MimeMultipart.java,v retrieving revision 1.20 diff -u -p -r1.20 MimeMultipart.java --- source/javax/mail/internet/MimeMultipart.java 26 Nov 2005 18:40:21 -0000 1.20 +++ source/javax/mail/internet/MimeMultipart.java 21 Nov 2007 05:10:01 -0000 @@ -1,19 +1,19 @@ /* * MimeMultipart.java * Copyright (C) 2002, 2005 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -221,7 +221,7 @@ public class MimeMultipart { final String charset = "US-ASCII"; final byte[] sep = { 0x0d, 0x0a }; - + parse(); ContentType ct = new ContentType(contentType); String boundaryParam = ct.getParameter("boundary"); @@ -234,10 +234,10 @@ public class MimeMultipart throw new MessagingException("Missing boundary parameter"); } byte[] boundary = ("--" + boundaryParam).getBytes(charset); - + if (preamble != null) os.write(preamble.getBytes(charset)); - + synchronized (parts) { int len = parts.size(); @@ -279,7 +279,7 @@ public class MimeMultipart sis = (SharedInputStream) is; } // buffer it - if (!(is instanceof ByteArrayInputStream) && + if (!(is instanceof ByteArrayInputStream) && !(is instanceof BufferedInputStream)) { is = new BufferedInputStream(is); @@ -296,7 +296,7 @@ public class MimeMultipart } String boundary = (boundaryParam == null) ? null : "--" + boundaryParam; - + LineInputStream lis = new LineInputStream(is); String line; StringBuffer preambleBuf = null; @@ -324,10 +324,10 @@ public class MimeMultipart { throw new MessagingException("No start boundary"); } - + byte[] bbytes = boundary.getBytes(); int blen = bbytes.length; - + long start = 0L, end = 0L; for (boolean done = false; !done;) { @@ -354,7 +354,7 @@ public class MimeMultipart { bos = new ByteArrayOutputStream(); } - + // NB this routine uses the InputStream.mark() method // if it is not supported by the underlying stream // we will run into problems @@ -383,7 +383,7 @@ public class MimeMultipart } pos++; } - + if (pos == blen) { c = is.read(); @@ -458,7 +458,7 @@ public class MimeMultipart } } } - + // Create a body part from the stream MimeBodyPart bp; if (sis != null) @@ -471,7 +471,7 @@ public class MimeMultipart } addBodyPart(bp); } - + } catch (IOException e) { @@ -538,7 +538,7 @@ public class MimeMultipart } return line; } - + /** * Creates headers from the specified input stream. * @param is the input stream to read the headers from @@ -548,7 +548,7 @@ public class MimeMultipart { return new InternetHeaders(is); } - + /** * Creates a MIME body part object from the given headers and byte content. * @param headers the part headers @@ -560,7 +560,7 @@ public class MimeMultipart { return new MimeBodyPart(headers, content); } - + /** * Creates a MIME body part from the specified input stream. * @param is the input stream to parse the part from @@ -570,6 +570,6 @@ public class MimeMultipart { return new MimeBodyPart(is); } - + } Index: source/javax/mail/internet/MimePart.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/internet/MimePart.java,v retrieving revision 1.11 diff -u -p -r1.11 MimePart.java --- source/javax/mail/internet/MimePart.java 26 Nov 2005 18:40:21 -0000 1.11 +++ source/javax/mail/internet/MimePart.java 21 Nov 2007 05:10:01 -0000 @@ -1,19 +1,19 @@ /* * MimePart.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -96,7 +96,7 @@ public interface MimePart throws MessagingException; /** - * Returns the value of the Content-ID header field of this part. + * Returns the value of the Content-ID header field of this part. */ String getContentID() throws MessagingException; @@ -111,7 +111,7 @@ public interface MimePart * Sets the Content-MD5 header value for this part. * @exception IllegalWriteException if the underlying implementation does not * support modification - * @param IllegalStateException if this part is obtained from a READ_ONLY + * @param IllegalStateException if this part is obtained from a READ_ONLY * folder */ void setContentMD5(String md5) @@ -140,7 +140,7 @@ public interface MimePart * Sets the content of this message using the specified text, and with a * MIME type of "text/plain". *

      - * If the string contains non US-ASCII characters, it will be encoded + * If the string contains non US-ASCII characters, it will be encoded * using the platform default charset. * @param text the text content */ @@ -151,19 +151,19 @@ public interface MimePart * Sets the content of this message using the specified text, and with a * MIME type of "text/plain". *

      - * If the string contains non US-ASCII characters, it will be encoded + * If the string contains non US-ASCII characters, it will be encoded * using the specified charset. * @param text the text content * @param charset the charset to use for any encoding */ void setText(String text, String charset) throws MessagingException; - + /** * Sets the content of this message using the specified text, and with a * text MIME type of the specified subtype. *

      - * If the string contains non US-ASCII characters, it will be encoded + * If the string contains non US-ASCII characters, it will be encoded * using the specified charset. * @param text the text content * @param charset the charset to use for any encoding @@ -172,6 +172,6 @@ public interface MimePart */ void setText(String text, String charset, String subtype) throws MessagingException; - + } Index: source/javax/mail/internet/MimePartDataSource.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/internet/MimePartDataSource.java,v retrieving revision 1.11 diff -u -p -r1.11 MimePartDataSource.java --- source/javax/mail/internet/MimePartDataSource.java 26 Nov 2005 18:40:21 -0000 1.11 +++ source/javax/mail/internet/MimePartDataSource.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * MimePartDataSource.java * Copyright (C) 2002, 2005 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -90,7 +90,7 @@ public class MimePartDataSource { throw new MessagingException("Unknown part type"); } - + String encoding = part.getEncoding(); return (encoding != null) ? MimeUtility.decode(is, encoding) : is; } @@ -136,6 +136,6 @@ public class MimePartDataSource } return context; } - + } Index: source/javax/mail/internet/MimeUtility.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/internet/MimeUtility.java,v retrieving revision 1.22 diff -u -p -r1.22 MimeUtility.java --- source/javax/mail/internet/MimeUtility.java 28 Apr 2007 07:10:25 -0000 1.22 +++ source/javax/mail/internet/MimeUtility.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * MimeUtility.java * Copyright (C) 2002, 2004, 2005 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -69,7 +69,7 @@ public class MimeUtility private MimeUtility() { } - + /** * Returns the Content-Transfer-Encoding that should be applied to the input * stream of this data source, to make it mail safe. @@ -119,7 +119,7 @@ public class MimeUtility } return encoding; } - + /** * Returns the Content-Transfer-Encoding that needs to be applied to the * given content in order to make it mail safe. @@ -139,7 +139,7 @@ public class MimeUtility { ContentType ct = new ContentType(dh.getContentType()); boolean text = ct.match("text/*"); - + AsciiOutputStream aos = new AsciiOutputStream(!text, encodeeolStrict() && !text); try @@ -188,7 +188,7 @@ public class MimeUtility { return new QPInputStream(is); } - if (encoding.equalsIgnoreCase("uuencode") || + if (encoding.equalsIgnoreCase("uuencode") || encoding.equalsIgnoreCase("x-uuencode")) { return new UUInputStream(is); @@ -231,8 +231,8 @@ public class MimeUtility { return new UUOutputStream(os); } - if (encoding.equalsIgnoreCase("binary") || - encoding.equalsIgnoreCase("7bit") || + if (encoding.equalsIgnoreCase("binary") || + encoding.equalsIgnoreCase("7bit") || encoding.equalsIgnoreCase("8bit")) { return os; @@ -272,8 +272,8 @@ public class MimeUtility { return new UUOutputStream(os, filename); } - if (encoding.equalsIgnoreCase("binary") || - encoding.equalsIgnoreCase("7bit") || + if (encoding.equalsIgnoreCase("binary") || + encoding.equalsIgnoreCase("7bit") || encoding.equalsIgnoreCase("8bit")) { return os; @@ -298,7 +298,7 @@ public class MimeUtility * RFC 2047. * @param text the Unicode string * @param charset the charset, or null to use the platform default charset - * @param encoding the encoding to be used ("B" or "Q") + * @param encoding the encoding to be used ("B" or "Q") */ public static String encodeText(String text, String charset, String encoding) throws UnsupportedEncodingException @@ -323,7 +323,7 @@ public class MimeUtility StringBuffer buffer = new StringBuffer(); StringBuffer extra = new StringBuffer(); boolean decoded = false; - while (st.hasMoreTokens()) + while (st.hasMoreTokens()) { String token = st.nextToken(); char c = token.charAt(0); @@ -388,7 +388,7 @@ public class MimeUtility return encodeWord(text, charset, encoding, true); } - private static String encodeWord(String text, String charset, + private static String encodeWord(String text, String charset, String encoding, boolean word) throws UnsupportedEncodingException { @@ -432,33 +432,33 @@ public class MimeUtility throw new UnsupportedEncodingException("Unknown transfer encoding: " + encoding); } - + StringBuffer encodingBuffer = new StringBuffer(); encodingBuffer.append("=?"); encodingBuffer.append(charset); encodingBuffer.append("?"); encodingBuffer.append(encoding); encodingBuffer.append("?"); - + StringBuffer buffer = new StringBuffer(); encodeBuffer(buffer, - text, - javaCharset, - bEncoding, - 68 - charset.length(), - encodingBuffer.toString(), + text, + javaCharset, + bEncoding, + 68 - charset.length(), + encodingBuffer.toString(), true, word); return buffer.toString(); } private static void encodeBuffer(StringBuffer buffer, - String text, - String charset, - boolean bEncoding, - int max, + String text, + String charset, + boolean bEncoding, + int max, String encoding, - boolean keepTogether, + boolean keepTogether, boolean word) throws UnsupportedEncodingException { @@ -476,12 +476,12 @@ public class MimeUtility if (elen > max && len > 1) { encodeBuffer(buffer, - text.substring(0, len / 2), - charset, - bEncoding, - max, - encoding, - keepTogether, + text.substring(0, len / 2), + charset, + bEncoding, + max, + encoding, + keepTogether, word); encodeBuffer(buffer, text.substring(len / 2, len), @@ -522,11 +522,11 @@ public class MimeUtility { buffer.append((char) bytes[i]); } - + buffer.append("?="); } } - + /** * Decodes the specified string using the RFC 2047 rules for parsing an * "encoded-word". @@ -580,7 +580,7 @@ public class MimeUtility { bytes[i] = (byte) chars[i]; } - + ByteArrayInputStream bis = new ByteArrayInputStream(bytes); InputStream is; if (encoding.equalsIgnoreCase("B")) @@ -704,7 +704,7 @@ public class MimeUtility * Quotes the specified word, if it contains any characters from the * given "specials" list. *

      - * The HeaderTokenizer class defines two "specials" lists, + * The HeaderTokenizer class defines two "specials" lists, * MIME and RFC 822. * @param word the word to be quoted * @param specials the set of special characters @@ -729,7 +729,7 @@ public class MimeUtility } buffer.append(c2); } - + buffer.append('"'); return buffer.toString(); } @@ -738,7 +738,7 @@ public class MimeUtility needsQuotes = true; } } - + if (needsQuotes) { StringBuffer buffer = new StringBuffer(len + 2); @@ -771,7 +771,7 @@ public class MimeUtility /* * Load the charset conversion tables. */ - static + static { String mappings = "/META-INF/javamail.charset.map"; InputStream in = (MimeUtility.class).getResourceAsStream(mappings); @@ -810,7 +810,7 @@ public class MimeUtility { return; } - + if (line.trim().length() != 0 && !line.startsWith("#")) { StringTokenizer st = new StringTokenizer(line, "\t "); @@ -873,7 +873,7 @@ public class MimeUtility } // -- Java default charset -- - + /* * Local cache for the system default Java charset. * @see #getDefaultJavaCharset @@ -902,10 +902,10 @@ public class MimeUtility // InputStreamReader has access to the platform default encoding. // We create a dummy input stream to feed it with, just to get // this encoding value. - InputStreamReader isr = + InputStreamReader isr = new InputStreamReader(new InputStream() { public int read() { return 0; } }); defaultJavaCharset = isr.getEncoding(); - + // If all else fails use UTF-8 if (defaultJavaCharset == null) { @@ -915,9 +915,9 @@ public class MimeUtility } return javaCharset(defaultJavaCharset); } - + // -- Calculating multipart boundaries -- - + private static int part = 0; /* @@ -956,7 +956,7 @@ public class MimeUtility // These methods provide checks on whether collections of bytes contain // all-ASCII, majority-ASCII, or minority-ASCII bytes. - + // Constants public static final int ALL = -1; static final int ALL_ASCII = 1; @@ -978,7 +978,7 @@ public class MimeUtility nonAsciiCount++; } } - + if (nonAsciiCount == 0) { return ALL_ASCII; @@ -999,7 +999,7 @@ public class MimeUtility blockLen = (len != ALL) ? Math.min(len, 4096) : 4096; bytes = new byte[blockLen]; } - while (len != 0) + while (len != 0) { int readLen; try @@ -1037,7 +1037,7 @@ public class MimeUtility nonAsciiCount++; } } - + } catch (IOException e) { @@ -1078,7 +1078,7 @@ public class MimeUtility static final int LF = 0x0a; static final int CR = 0x0d; - + private boolean strict; private boolean eolStrict; private int asciiCount = 0; @@ -1088,25 +1088,25 @@ public class MimeUtility private int last = -1; private boolean islong = false; private boolean eolCheckFailed = false; - + public AsciiOutputStream(boolean strict, boolean eolStrict) { this.strict = strict; this.eolStrict = eolStrict; } - + public void write(int c) throws IOException { check(c); } - + public void write(byte[] bytes) throws IOException { write(bytes, 0, bytes.length); } - + public void write(byte[] bytes, int offset, int length) throws IOException { @@ -1115,9 +1115,9 @@ public class MimeUtility { check(bytes[i]); } - + } - + private final void check(int c) throws IOException { @@ -1156,7 +1156,7 @@ public class MimeUtility } last = c; } - + int status() { if (ret != 0) @@ -1173,7 +1173,7 @@ public class MimeUtility } return (asciiCount <= nonAsciiCount) ? MAJORITY_ASCII : MINORITY_ASCII; } - + } /** Index: source/javax/mail/internet/NewsAddress.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/internet/NewsAddress.java,v retrieving revision 1.11 diff -u -p -r1.11 NewsAddress.java --- source/javax/mail/internet/NewsAddress.java 26 Nov 2005 18:40:21 -0000 1.11 +++ source/javax/mail/internet/NewsAddress.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * NewsAddress.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -45,7 +45,7 @@ public class NewsAddress * The address type. */ private static final String TYPE = "news"; - + /** * The name of the newsgroup. */ @@ -140,7 +140,7 @@ public class NewsAddress { NewsAddress na = (NewsAddress) a; return (newsgroup.equals(na.newsgroup) && - ((host == null && na.host == null) || + ((host == null && na.host == null) || (host != null && na.host != null && host.equalsIgnoreCase(na.host)))); } @@ -209,6 +209,6 @@ public class NewsAddress acc.toArray(addresses); return addresses; } - + } Index: source/javax/mail/internet/ParameterList.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/internet/ParameterList.java,v retrieving revision 1.14 diff -u -p -r1.14 ParameterList.java --- source/javax/mail/internet/ParameterList.java 26 Nov 2005 18:40:21 -0000 1.14 +++ source/javax/mail/internet/ParameterList.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * ParameterList.java * Copyright (C) 2002, 2005 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -72,21 +72,21 @@ public class ParameterList new GetSystemPropertyAction("mail.mime.decodeparameters"); boolean decodeParameters = "true".equals(AccessController.doPrivileged(a)); - + LinkedHashMap charsets = new LinkedHashMap(); HeaderTokenizer ht = new HeaderTokenizer(s, HeaderTokenizer.MIME); for (int type = 0; type != HeaderTokenizer.Token.EOF; ) { HeaderTokenizer.Token token = ht.next(); type = token.getType(); - + if (type != HeaderTokenizer.Token.EOF) { if (type != 0x3b) // ';' { throw new ParseException("expected ';': " + s); } - + token = ht.next(); type = token.getType(); if (type != HeaderTokenizer.Token.ATOM) @@ -94,17 +94,17 @@ public class ParameterList throw new ParseException("expected parameter name: " + s); } String key = token.getValue().toLowerCase(); - + token = ht.next(); type = token.getType(); if (type != 0x3d) // '=' { throw new ParseException("expected '=': " + s); } - + token = ht.next(); type = token.getType(); - if (type != HeaderTokenizer.Token.ATOM && + if (type != HeaderTokenizer.Token.ATOM && type != HeaderTokenizer.Token.QUOTEDSTRING) { throw new ParseException("expected parameter value: " + s); @@ -340,7 +340,7 @@ public class ParameterList new GetSystemPropertyAction("mail.mime.encodeparameters"); boolean encodeParameters = "true".equals(AccessController.doPrivileged(a)); - + StringBuffer buffer = new StringBuffer(); for (Iterator i = list.entrySet().iterator(); i.hasNext(); ) { @@ -349,7 +349,7 @@ public class ParameterList String[] vc = (String[]) entry.getValue(); String value = vc[0]; String charset = vc[1]; - + if (encodeParameters) { try @@ -361,13 +361,13 @@ public class ParameterList // ignore } } - + value = MimeUtility.quote(value, HeaderTokenizer.MIME); - + // delimiter buffer.append("; "); used += 2; - + // wrap to next line if necessary int len = key.length() + value.length() + 1; if ((used + len) > 76) @@ -375,7 +375,7 @@ public class ParameterList buffer.append("\r\n\t"); used = 8; } - + // append key=value buffer.append(key); buffer.append('='); @@ -383,7 +383,7 @@ public class ParameterList } return buffer.toString(); } - + /* * Needed to provide an enumeration interface for the key iterator. */ @@ -407,7 +407,7 @@ public class ParameterList { return source.next(); } - + } } Index: source/javax/mail/internet/ParseException.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/internet/ParseException.java,v retrieving revision 1.10 diff -u -p -r1.10 ParseException.java --- source/javax/mail/internet/ParseException.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/internet/ParseException.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * ParseException.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/internet/SharedInputStream.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/internet/SharedInputStream.java,v retrieving revision 1.10 diff -u -p -r1.10 SharedInputStream.java --- source/javax/mail/internet/SharedInputStream.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/internet/SharedInputStream.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * SharedInputStream.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -51,7 +51,7 @@ public interface SharedInputStream /** * Returns a new InputStream representing a subset of the data from this - * InputStream, from start (inclusive) up to + * InputStream, from start (inclusive) up to * end (exclusive). start must be non-negative. * If end is -1, the new stream ends at the same place * as this stream. The returned InputStream will also implement the @@ -60,6 +60,6 @@ public interface SharedInputStream * @param end the end position + 1 */ InputStream newStream(long start, long end); - + } Index: source/javax/mail/search/AddressStringTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/AddressStringTerm.java,v retrieving revision 1.10 diff -u -p -r1.10 AddressStringTerm.java --- source/javax/mail/search/AddressStringTerm.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/search/AddressStringTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * AddressStringTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/search/AddressTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/AddressTerm.java,v retrieving revision 1.10 diff -u -p -r1.10 AddressTerm.java --- source/javax/mail/search/AddressTerm.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/search/AddressTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * AddressTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -68,7 +68,7 @@ public abstract class AddressTerm public boolean equals(Object other) { - return ((other instanceof AddressTerm) && + return ((other instanceof AddressTerm) && ((AddressTerm) other).address.equals(address)); } @@ -76,6 +76,6 @@ public abstract class AddressTerm { return address.hashCode(); } - + } Index: source/javax/mail/search/AndTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/AndTerm.java,v retrieving revision 1.10 diff -u -p -r1.10 AndTerm.java --- source/javax/mail/search/AndTerm.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/search/AndTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * AndTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -109,7 +109,7 @@ public final class AndTerm } return false; } - + public int hashCode() { int acc = 0; @@ -119,6 +119,6 @@ public final class AndTerm } return acc; } - + } Index: source/javax/mail/search/BodyTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/BodyTerm.java,v retrieving revision 1.11 diff -u -p -r1.11 BodyTerm.java --- source/javax/mail/search/BodyTerm.java 26 Nov 2005 18:40:21 -0000 1.11 +++ source/javax/mail/search/BodyTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * BodyTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -89,6 +89,6 @@ public final class BodyTerm { return ((other instanceof BodyTerm) && super.equals(other)); } - + } Index: source/javax/mail/search/ComparisonTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/ComparisonTerm.java,v retrieving revision 1.10 diff -u -p -r1.10 ComparisonTerm.java --- source/javax/mail/search/ComparisonTerm.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/search/ComparisonTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * ComparisonTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -74,7 +74,7 @@ public abstract class ComparisonTerm public boolean equals(Object other) { - return ((other instanceof ComparisonTerm) && + return ((other instanceof ComparisonTerm) && ((ComparisonTerm)other).comparison == comparison); } Index: source/javax/mail/search/DateTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/DateTerm.java,v retrieving revision 1.10 diff -u -p -r1.10 DateTerm.java --- source/javax/mail/search/DateTerm.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/search/DateTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * DateTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/search/FlagTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/FlagTerm.java,v retrieving revision 1.10 diff -u -p -r1.10 FlagTerm.java --- source/javax/mail/search/FlagTerm.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/search/FlagTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * FlagTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -42,7 +42,7 @@ public final class FlagTerm /** * Indicates whether to test for the presence or absence of the specified - * flag. If true, test whether all the specified flags are present, + * flag. If true, test whether all the specified flags are present, * otherwise test whether all the specified flags are absent. */ protected boolean set; @@ -131,6 +131,6 @@ public final class FlagTerm { return set ? flags.hashCode() : ~flags.hashCode(); } - + } Index: source/javax/mail/search/FromStringTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/FromStringTerm.java,v retrieving revision 1.10 diff -u -p -r1.10 FromStringTerm.java --- source/javax/mail/search/FromStringTerm.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/search/FromStringTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * FromStringTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/search/FromTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/FromTerm.java,v retrieving revision 1.10 diff -u -p -r1.10 FromTerm.java --- source/javax/mail/search/FromTerm.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/search/FromTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * FromTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/search/HeaderTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/HeaderTerm.java,v retrieving revision 1.10 diff -u -p -r1.10 HeaderTerm.java --- source/javax/mail/search/HeaderTerm.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/search/HeaderTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * HeaderTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -104,6 +104,6 @@ public final class HeaderTerm { return headerName.toLowerCase().hashCode() + super.hashCode(); } - + } Index: source/javax/mail/search/IntegerComparisonTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/IntegerComparisonTerm.java,v retrieving revision 1.10 diff -u -p -r1.10 IntegerComparisonTerm.java --- source/javax/mail/search/IntegerComparisonTerm.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/search/IntegerComparisonTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * IntegerComparisonTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -56,7 +56,7 @@ public abstract class IntegerComparisonT return number; } - /** + /** * Returns the type of comparison. */ public int getComparison() @@ -95,6 +95,6 @@ public abstract class IntegerComparisonT { return number + super.hashCode(); } - + } Index: source/javax/mail/search/MessageIDTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/MessageIDTerm.java,v retrieving revision 1.10 diff -u -p -r1.10 MessageIDTerm.java --- source/javax/mail/search/MessageIDTerm.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/search/MessageIDTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * MessageIDTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -79,6 +79,6 @@ public final class MessageIDTerm { return (other instanceof MessageIDTerm && super.equals(other)); } - + } Index: source/javax/mail/search/MessageNumberTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/MessageNumberTerm.java,v retrieving revision 1.10 diff -u -p -r1.10 MessageNumberTerm.java --- source/javax/mail/search/MessageNumberTerm.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/search/MessageNumberTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * MessageNumberTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/search/NotTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/NotTerm.java,v retrieving revision 1.10 diff -u -p -r1.10 NotTerm.java --- source/javax/mail/search/NotTerm.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/search/NotTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * NotTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -76,6 +76,6 @@ public final class NotTerm { return term.hashCode() << 1; } - + } Index: source/javax/mail/search/OrTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/OrTerm.java,v retrieving revision 1.10 diff -u -p -r1.10 OrTerm.java --- source/javax/mail/search/OrTerm.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/search/OrTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * OrTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -120,6 +120,6 @@ public final class OrTerm } return acc; } - + } Index: source/javax/mail/search/ReceivedDateTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/ReceivedDateTerm.java,v retrieving revision 1.11 diff -u -p -r1.11 ReceivedDateTerm.java --- source/javax/mail/search/ReceivedDateTerm.java 26 Nov 2005 18:40:21 -0000 1.11 +++ source/javax/mail/search/ReceivedDateTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * ReceivedDateTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/search/RecipientStringTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/RecipientStringTerm.java,v retrieving revision 1.11 diff -u -p -r1.11 RecipientStringTerm.java --- source/javax/mail/search/RecipientStringTerm.java 26 Nov 2005 18:40:21 -0000 1.11 +++ source/javax/mail/search/RecipientStringTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * RecipientStringTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -101,6 +101,6 @@ public final class RecipientStringTerm { return type.hashCode() + super.hashCode(); } - + } Index: source/javax/mail/search/RecipientTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/RecipientTerm.java,v retrieving revision 1.10 diff -u -p -r1.10 RecipientTerm.java --- source/javax/mail/search/RecipientTerm.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/search/RecipientTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * RecipientTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/search/SearchException.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/SearchException.java,v retrieving revision 1.10 diff -u -p -r1.10 SearchException.java --- source/javax/mail/search/SearchException.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/search/SearchException.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * SearchException.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/search/SearchTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/SearchTerm.java,v retrieving revision 1.10 diff -u -p -r1.10 SearchTerm.java --- source/javax/mail/search/SearchTerm.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/search/SearchTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * SearchTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/search/SentDateTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/SentDateTerm.java,v retrieving revision 1.11 diff -u -p -r1.11 SentDateTerm.java --- source/javax/mail/search/SentDateTerm.java 26 Nov 2005 18:40:21 -0000 1.11 +++ source/javax/mail/search/SentDateTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * SentDateTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -74,6 +74,6 @@ public final class SentDateTerm { return (other instanceof SentDateTerm && super.equals(other)); } - + } Index: source/javax/mail/search/SizeTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/SizeTerm.java,v retrieving revision 1.10 diff -u -p -r1.10 SizeTerm.java --- source/javax/mail/search/SizeTerm.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/search/SizeTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * SizeTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -73,6 +73,6 @@ public final class SizeTerm { return (other instanceof SizeTerm && super.equals(other)); } - + } Index: source/javax/mail/search/StringTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/StringTerm.java,v retrieving revision 1.10 diff -u -p -r1.10 StringTerm.java --- source/javax/mail/search/StringTerm.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/search/StringTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * StringTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -98,12 +98,12 @@ public abstract class StringTerm StringTerm st = (StringTerm)other; if (ignoreCase) { - return st.pattern.equalsIgnoreCase(pattern) && + return st.pattern.equalsIgnoreCase(pattern) && st.ignoreCase == ignoreCase; } else { - return st.pattern.equals(pattern) && + return st.pattern.equals(pattern) && st.ignoreCase == ignoreCase; } } @@ -114,6 +114,6 @@ public abstract class StringTerm { return (ignoreCase) ? pattern.hashCode() : ~pattern.hashCode(); } - + } Index: source/javax/mail/search/SubjectTerm.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/search/SubjectTerm.java,v retrieving revision 1.10 diff -u -p -r1.10 SubjectTerm.java --- source/javax/mail/search/SubjectTerm.java 26 Nov 2005 18:40:21 -0000 1.10 +++ source/javax/mail/search/SubjectTerm.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * SubjectTerm.java * Copyright (C) 2002 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Index: source/javax/mail/util/ByteArrayDataSource.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/util/ByteArrayDataSource.java,v retrieving revision 1.1 diff -u -p -r1.1 ByteArrayDataSource.java --- source/javax/mail/util/ByteArrayDataSource.java 26 Nov 2005 18:40:21 -0000 1.1 +++ source/javax/mail/util/ByteArrayDataSource.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * ByteArrayDataSource.java * Copyright (C) 2005 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -165,12 +165,12 @@ public class ByteArrayDataSource { throw new IOException("writing to this stream is not allowed"); } - + public void write(byte[] b, int off, int len) throws IOException { throw new IOException("writing to this stream is not allowed"); } - + } } Index: source/javax/mail/util/SharedByteArrayInputStream.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/util/SharedByteArrayInputStream.java,v retrieving revision 1.1 diff -u -p -r1.1 SharedByteArrayInputStream.java --- source/javax/mail/util/SharedByteArrayInputStream.java 26 Nov 2005 18:40:21 -0000 1.1 +++ source/javax/mail/util/SharedByteArrayInputStream.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * SharedByteArrayInputStream.java * Copyright (C) 2005 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -55,7 +55,7 @@ public class SharedByteArrayInputStream super(buf); off = 0; } - + /** * Constructor with a byte array, offset and length. * @param buf the byte array @@ -87,5 +87,5 @@ public class SharedByteArrayInputStream int len = (int) (end - start); return new SharedByteArrayInputStream(buf, off + (int) start, len); } - + } Index: source/javax/mail/util/SharedFileInputStream.java =================================================================== RCS file: /sources/classpathx/mail/source/javax/mail/util/SharedFileInputStream.java,v retrieving revision 1.2 diff -u -p -r1.2 SharedFileInputStream.java --- source/javax/mail/util/SharedFileInputStream.java 24 Apr 2007 13:27:10 -0000 1.2 +++ source/javax/mail/util/SharedFileInputStream.java 21 Nov 2007 05:10:02 -0000 @@ -1,19 +1,19 @@ /* * SharedFileInputStream.java * Copyright (C) 2005 The Free Software Foundation - * + * * This file is part of GNU JavaMail, a library. - * + * * GNU JavaMail is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * GNU JavaMail is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -71,12 +71,12 @@ public class SharedFileInputStream * The number of bytes in this stream. */ protected long datalen; - + /** * The open streams count; */ private final int[] openCount; - + /** * Constructor with file. * @param file the file @@ -104,7 +104,7 @@ public class SharedFileInputStream datalen = in.length(); openCount = new int[]{1}; } - + /** * Constructor with file and buffer size. * @param file the file @@ -241,5 +241,5 @@ public class SharedFileInputStream { close(); } - + } Index: test/src/AllTests.java =================================================================== RCS file: /sources/classpathx/mail/test/src/AllTests.java,v retrieving revision 1.4 diff -u -p -r1.4 AllTests.java --- test/src/AllTests.java 6 Jun 2005 21:00:48 -0000 1.4 +++ test/src/AllTests.java 21 Nov 2007 05:10:02 -0000 @@ -18,7 +18,7 @@ public class AllTests addTest(NonFolderTest.suite()); addTest(MimeMessageTest.suite()); } - + public static void main(String[] args) { try @@ -33,5 +33,5 @@ public class AllTests System.exit(1); } } - + } Index: test/src/FolderTest.java =================================================================== RCS file: /sources/classpathx/mail/test/src/FolderTest.java,v retrieving revision 1.5 diff -u -p -r1.5 FolderTest.java --- test/src/FolderTest.java 21 Feb 2005 13:29:26 -0000 1.5 +++ test/src/FolderTest.java 21 Nov 2007 05:10:02 -0000 @@ -22,7 +22,7 @@ public class FolderTest extends TestCase implements ConnectionListener { - + private Session session; private URLName url; private Store store; @@ -30,13 +30,13 @@ public class FolderTest private ConnectionEvent connectionEvent; private FolderEvent folderEvent; - + public FolderTest(String name, String url) { super(name); this.url = new URLName(url); } - + protected void setUp() throws Exception { @@ -73,7 +73,7 @@ public class FolderTest store = null; session = null; } - + public void testOpen() throws Exception { @@ -84,7 +84,7 @@ public class FolderTest assertNotNull(connectionEvent); assertEquals(connectionEvent.getType(), ConnectionEvent.OPENED); } - + public void testClose() throws Exception { @@ -160,5 +160,5 @@ public class FolderTest } return suite; } - + } Index: test/src/NonFolderTest.java =================================================================== RCS file: /sources/classpathx/mail/test/src/NonFolderTest.java,v retrieving revision 1.2 diff -u -p -r1.2 NonFolderTest.java --- test/src/NonFolderTest.java 25 Jan 2004 16:40:04 -0000 1.2 +++ test/src/NonFolderTest.java 21 Nov 2007 05:10:02 -0000 @@ -31,7 +31,7 @@ public class NonFolderTest extends TestCase implements FolderListener, MessageCountListener { - + private Session session; private URLName url; private Store store; @@ -39,7 +39,7 @@ public class NonFolderTest private FolderEvent folderEvent; private MessageCountEvent countEvent; - + public NonFolderTest(String name, String url) { super(name); @@ -237,5 +237,5 @@ public class NonFolderTest } return suite; } - + } Index: test/src/SessionTest.java =================================================================== RCS file: /sources/classpathx/mail/test/src/SessionTest.java,v retrieving revision 1.2 diff -u -p -r1.2 SessionTest.java --- test/src/SessionTest.java 17 Feb 2005 11:37:24 -0000 1.2 +++ test/src/SessionTest.java 21 Nov 2007 05:10:02 -0000 @@ -12,29 +12,29 @@ import junit.textui.TestRunner; public class SessionTest extends TestCase { - + private Session session; - + public SessionTest(String name) { super(name); } - + protected void setUp() { session = Session.getInstance(System.getProperties()); } - + protected void tearDown() { session = null; } - + public void testGetInstance() { assertNotNull(session); } - + public void testGetProvider() { Provider[] pp = session.getProviders(); @@ -77,10 +77,10 @@ public class SessionTest fail(e.getMessage()); } } - + public static Test suite() { return new TestSuite(SessionTest.class); } - + } Index: test/src/StoreTest.java =================================================================== RCS file: /sources/classpathx/mail/test/src/StoreTest.java,v retrieving revision 1.3 diff -u -p -r1.3 StoreTest.java --- test/src/StoreTest.java 10 Sep 2003 20:13:54 -0000 1.3 +++ test/src/StoreTest.java 21 Nov 2007 05:10:02 -0000 @@ -19,13 +19,13 @@ public class StoreTest extends TestCase implements ConnectionListener { - + private Session session; private URLName url; private Store store; private ConnectionEvent event; - + public StoreTest(String name, String url) { super(name); @@ -162,5 +162,5 @@ public class StoreTest } return suite; } - + }