S3 compatible blobStores sometimes return date in the format:
"2014-07-23T20:53:17+0000" instead of the more common
"2014-07-23T18:09:39.944Z". This caused jclouds to barf with an
IllegalArgumentException.

This commit tries to parse both the formats for S3. The exception
is thrown if both fail.

Added unit tests for the same.
You can merge this Pull Request by running:

  git pull https://github.com/maginatics/jclouds parse-date-seconds-format

Or you can view, comment on it, or merge it online at:

  https://github.com/jclouds/jclouds/pull/456

-- Commit Summary --

  * Try iso8601SecondsDateParse if iso8601DateParse fails.

-- File Changes --

    M apis/s3/src/main/java/org/jclouds/s3/xml/CopyObjectHandler.java (12)
    M apis/s3/src/main/java/org/jclouds/s3/xml/ListAllMyBucketsHandler.java (12)
    M apis/s3/src/main/java/org/jclouds/s3/xml/ListBucketHandler.java (12)
    M apis/s3/src/test/java/org/jclouds/s3/xml/CopyObjectHandlerTest.java (19)
    M apis/s3/src/test/java/org/jclouds/s3/xml/ListBucketHandlerTest.java (20)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/456.patch
https://github.com/jclouds/jclouds/pull/456.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/456

Reply via email to