Parse out of order ListBuckets response elements
authorTimur Alperovich <timur@timuralp.com>
Sun, 4 Apr 2021 01:06:41 +0000 (18:06 -0700)
committerAndrew Gaul <andrew@gaul.org>
Sun, 4 Apr 2021 11:06:26 +0000 (20:06 +0900)
commit04feb8f8482e48b6c26166edb3d6fd5a607d858b
tree641e00b7d3918a73b0c7dfd937f2a9b9e0d9f035
parentc995a04fe90b20b621af18fdf1674d3245d2a50e
Parse out of order ListBuckets response elements

Currently, jclouds assumes that the ListBuckets response follows a
specific order: the <Owner> tag, followed by the <Buckets> tag. Within
the <Owner> tag, jclouds further assumes that the <ID> must occur before
the <DisplayName> tag. If the XML body does not adhere to this order,
the parser throws a NullPointerException.

DigitalOcean spaces does not adhere to this order and returns the
<DisplayName> tag before the <ID> tag. The patch changes the parser to
not depend on the order of the tags.
apis/s3/src/main/java/org/jclouds/s3/domain/CanonicalUser.java
apis/s3/src/main/java/org/jclouds/s3/xml/ListAllMyBucketsHandler.java
apis/s3/src/test/java/org/jclouds/s3/xml/S3ParserTest.java