Allow copyBlob lastModified to be null

This matches getBlob and other call sites.
pull/728/head
Andrew Gaul 2024-11-19 11:06:46 -08:00
rodzic 48c04eca6a
commit b2c4665641
1 zmienionych plików z 10 dodań i 3 usunięć

Wyświetl plik

@ -1914,8 +1914,12 @@ public class S3ProxyHandler {
xml.writeStartElement("CopyObjectResult");
xml.writeDefaultNamespace(AWS_XMLNS);
writeSimpleElement(xml, "LastModified",
formatDate(blobMetadata.getLastModified()));
var lastModified = blobMetadata.getLastModified();
if (lastModified != null) {
writeSimpleElement(xml, "LastModified",
formatDate(lastModified));
}
writeSimpleElement(xml, "ETag", maybeQuoteETag(eTag));
xml.writeEndElement();
@ -2731,7 +2735,10 @@ public class S3ProxyHandler {
xml.writeStartElement("CopyObjectResult");
xml.writeDefaultNamespace(AWS_XMLNS);
writeSimpleElement(xml, "LastModified", formatDate(lastModified));
if (lastModified != null) {
writeSimpleElement(xml, "LastModified",
formatDate(lastModified));
}
if (eTag != null) {
writeSimpleElement(xml, "ETag", maybeQuoteETag(eTag));
}