timuralp commented on a change in pull request #103: URL: https://github.com/apache/jclouds/pull/103#discussion_r606752482
########## File path: apis/s3/src/main/java/org/jclouds/s3/xml/ListAllMyBucketsHandler.java ########## @@ -56,9 +57,18 @@ public ListAllMyBucketsHandler(DateService dateParser) { public void endElement(String uri, String name, String qName) { if (qName.equals("ID")) { // owner stuff - currentOwner = new CanonicalUser(currentOrNull(currentText)); + if (currentDisplayName == null) { + currentOwner = new CanonicalUser(currentOrNull(currentText)); + } else { + currentOwner = new CanonicalUser( + currentOrNull(currentText), currentDisplayName); + } } else if (qName.equals("DisplayName")) { - currentOwner.setDisplayName(currentOrNull(currentText)); + if (currentOwner == null) { + currentDisplayName = currentOrNull(currentText); + } else { + currentOwner.setDisplayName(currentOrNull(currentText)); Review comment: I updated the patch with a test for a reverse order of <Buckets> and <Owner> tags and expanded the CanonicalUser class to allow setting the ID and a public constructor. This allowed me to change the parser to avoid relying on the order of the elements when processing the XML. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org