Permalink
Commits on Jan 8, 2010
Commits on Jan 4, 2010
  1. Missing ASF license header from DecodeMonitor (thanks Norman)

    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@895585 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Jan 4, 2010
  2. Make sure MimeEntity use the "monitoring" version of QuotedPrintable/…

    …Base64 decoders. (MIME4J-156)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@895516 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Jan 4, 2010
Commits on Jan 3, 2010
  1. Cleanup: no need to redeclare getParseException in every ParsedField …

    …abstract implementation.
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@895502 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Jan 3, 2010
  2. Introduced DecodeMonitor as optional parameter for the entry points (…

    …DefaultFieldParser, MessageImpl, MimeStreamParser, MimeTokenStream). (MIME4J-158)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@895498 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Jan 3, 2010
  3. Changed AddressBuilder.methods to throw ParseException instead of Ill…

    …egalStateException.
    
    Moved DecodeMonitor usage up to parser and field.*.parser methods (MIME4J-158)
    (Also including some minor change like MessageImpl to Message references).
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@895489 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Jan 3, 2010
  4. MimeUtil.getHeaderParams moved temporarily to DefaultFieldParser that…

    … was the only client of that method (this helps organizing code. but I think that the entry points for field parsing still needs improvement) (MIME4J-157)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@895488 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Jan 3, 2010
  5. Introduced a DecodeMonitor object with 2 basic implementations (SILEN…

    …T, STRICT). The decoding classes/methods in codec have been upgraded to use a DecodeMonitor instead of the internal boolean strict. Fixed a bug in QuotedPrintableInputStream that sometimes was not converting a lonely LF to CRLF. Added some malformation monitoring to QuotedPrintableInputStream (lone LF and lone CR are "monitored"). Added some more invalid data monitoring to Base64InputStream that now "notifies" unexpected chars (non base64, non CR, LF or SP). (MIME4J-158 + MIME4J-161)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@895486 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Jan 3, 2010
  6. remove empty package

    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@895484 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Jan 3, 2010
Commits on Jan 2, 2010
  1. Removed commons-loggin from CharsetUtil. Removed unused static method…

    … (MIME4J-159)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@895299 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Jan 2, 2010
  2. Hide some visibility for DecoderUtil static methods to better show wh…

    …at is the public method exposed (decodeEncodedWords) (related to MIME4J-145)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@895294 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Jan 2, 2010
  3. Moved parser "implementation" classes to the "impl" subpackage. This …

    …is not the final solution, but at least this better separate dependencies. Maybe we should better have "parser" => "parser.stream" and "parser.impl" => "parser", but this is a detail at this point of the reorganization process. (preparing MIME4J-157)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@895243 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Jan 2, 2010
  4. Moved parser "implementation" classes to the "impl" subpackage. This …

    …is not the final solution, but at least this better separate dependencies. Maybe we should better have "parser" => "parser.stream" and "parser.impl" => "parser", but this is a detail at this point of the reorganization process. (preparing MIME4J-157)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@895241 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Jan 2, 2010
  5. Extracted "BasicMimeTokenStream" class from MimeTokenStream, so to is…

    …olate dependency from Maximal/Default BodyDescriptor (preparing MIME4J-157)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@895236 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Jan 2, 2010
Commits on Jan 1, 2010
  1. Changed Field "ByteSequence getRaw" to a more conservative "writeTo(O…

    …utputStream)". This remove ByteSequence from mime4j-DOM dependencies. Moved FieldParser interface to field.impl (this will need more care, later, while refactoring the parser package) (MIME4J-156)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@895034 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Jan 1, 2010
  2. No need to throw an exception as the contract allow us to refuse unre…

    …ading. So simply return false to a new unread and added comment to the unread javadoc to explain the contract. (MIME4J-58)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@895032 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Jan 1, 2010
  3. Make sure unread throws an exception if called before the previous un…

    …read buffer has been fully consumed (Thanks to Oleg for reviewing) (MIME4J-58)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@895031 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Jan 1, 2010
  4. Group and Mailbox had "encoding" knowledge. This was the last bit mak…

    …ing the dom depending on encoding/decoding utils. Now the whole "dom" depends only on MimeException and ByteSequence (maybe this can be removed, too) (MIME4J-156)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@895030 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Jan 1, 2010
  5. Moved MessageWriter to message.impl (needs more thinking). Removed an…

    …y package dependency from Message classes. Removed ByteSequence from Multipart (optimization done in MultipartImpl only). Removed CodecUtil dependency by duplicating the stream copy method. Moved descriptor package classes to the parser package. They was too much interconnected. (MIME4J-156)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@895022 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Jan 1, 2010
  6. Reference only the main ParseException and not the field parser impl …

    …specific implementation (avoid cyclic dependency) (MIME4J-156)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@895021 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Jan 1, 2010
  7. Remove static parse methods from Address beans. Created an AddressBui…

    …lder in the address.parser package for that methods. Moved "Builder" to that package too. (MIME4J-156)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@895016 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Jan 1, 2010
Commits on Dec 31, 2009
  1. Remove dependencies from parser packages from fields interfaces (MIME…

    …4J-156)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@894916 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Dec 31, 2009
  2. Move field.impl (impl) dependencies from message (api) Entity object …

    …to the implementations (BodyPart and MessageImpl) (MIME4J-156)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@894915 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Dec 31, 2009
  3. Revert test change committed by mistake (MIME4J-156)

    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@894913 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Dec 31, 2009
  4. Moved field implementations and DefaultFieldParser/DelegatingFieldPar…

    …ser/Fields to the field.impl package. Extrapolated their interfaces and created interface placeholders in the original package. (MIME4J-156)
    
    (Entity api should not reference Impl fields: will need further refactoring later)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@894910 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Dec 31, 2009
  5. Extrapolated abstract Message object from current Message implementat…

    …ion. Moved "Fields" depending method from Message (api) to impl.MessageImpl (impl), leaving protected abstract placeholder in the abstract Message (MIME4J-156)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@894888 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Dec 31, 2009
  6. Moved "Fields" depending method from Entity (api) to BodyPart (impl) …

    …(MIME4J-156)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@894882 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Dec 31, 2009
  7. Refactored Entity and Message so to refer to "Fields" object only via…

    … protected methods. (MIME4J-156)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@894881 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Dec 31, 2009
  8. Moved more non-api (non-dom) classes from the message package (BodyCo…

    …pier, BodyPart). Separated abstract code from Multipart and moved implementation specifci MultipartImpl to impl package. BodyPart is simply an implementation of Entity. No need to create another level, moved BodyPart to the impl package and changed Multipart abstract class to deal with Entity instead of BodyPart (this is also a bugfix because Message should be "addable" to a Multipart) (MIME4J-156)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@894868 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Dec 31, 2009
  9. Created a message.impl package and started moving there non-api (non-…

    …dom) classes from the message package (MIME4J-156)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@894858 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Dec 31, 2009
  10. Added test messages (from the MIME4J-58 issue) to show differences be…

    …tween malformedHeaderStartsBody set to true or false. Updated testsuite runners so that when a testmessage name starts with "malformedHeaderStartsBody" then the option is set to true before starting tests (we could do this to test other options too).
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@894752 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Dec 31, 2009
  11. Added malformedHeaderStartsBody boolean option to MimeEntityConfig (M…

    …IME4J-58)
    
    Added unread(ByteArrayBuffer) method to LineReaderInputStream, only implemented by BufferedLineReaderInputStream.
    MimeEntity parseField now optionally unread the field (when in lenient mode). If the unread fails it throws an exception.
    Improved IllegalArgumentException handling in MimeBoundaryInputStream (boundary vs buffersize is more secure than before).
    MimeBoundaryInputStream.fillBuffer had a bug (while i > 0) replaced with (while i > buffer.pos()). It was never hit because of current "refill" behaviour.
    BufferedLineReaderInputStream now supports unread(ByteArrayBuffer): the unread simply put the passed buffer in place of the original buffer and consume it. The first time fillBuffer is called and the buffer is completely consumed the old buffer is restore. If fillbuffer is called before the buffer is consumed we throw an exception (never happens for the current refill behaviour, but protect future changes with an explicit exception).
    
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@894750 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Dec 31, 2009
Commits on Dec 30, 2009
  1. Revert uncompleted test methods committed previously by mistake.

    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@894647 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Dec 30, 2009
  2. Refactoring for MimeEntity:

    - now takes a simple InputStream in input and add the buffering internally.
    - now wants a MutableBodyDescripor to be used for this entity (and not a parent reference like before) (MIME5J-156)
    - MimeEntity/AbstractEntity do not more depend on Maximal/Default BodyDescriptor implementations.
    - removed T_IN_BODYPART and T_IN_MESSAGE "dummy" states (they are no more needed) (MIME4J-152)
    - Zero parts multipart messages were parsed as 1 empty part multipart messages. Fixed (MIME4J-152)
    - Added testmessages for the zero part multipart issue (MIME4J-152)
    - MimeEntity.skipHeader removed. Headless parsing is now done simply passing a MutableBodyDescriptor with the right contenttype and a custom startState to the MimeEntity class (no hacks inside MimeEntity) (related to MIME4J-153)
    - MimeTokenStream headless parsing doesn't start from T_END_HEADER state anymore but from the following state (MIME4J-153)
    - mimeStream renamed to mimePartStream (and also related methods).
    - MimeTokenStream now proxy the stop() request to the root mime entity (implemented MimeEntity.stop()).
    
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@894645 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Dec 30, 2009
  3. Added newChild method to MutableBodyDescriptor and its implementation…

    …s (part of MIME4J-155)
    
    git-svn-id: https://svn.apache.org/repos/asf/james/mime4j/branches/cycleclean@894642 13f79535-47bb-0310-9956-ffa450edef68
    Stefano Bagnara committed Dec 30, 2009