rich7420 commented on code in PR #11075:
URL: https://github.com/apache/ozone/pull/11075#discussion_r3829742014
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/PutBucketLifecycleConfigurationUnmarshaller.java:
##########
@@ -17,64 +17,14 @@
package org.apache.hadoop.ozone.s3.endpoint;
-import static org.apache.hadoop.ozone.s3.util.S3Consts.S3_XML_NAMESPACE;
-
-import java.io.InputStream;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.ext.MessageBodyReader;
-import javax.xml.XMLConstants;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.UnmarshallerHandler;
-import javax.xml.parsers.SAXParserFactory;
-import org.xml.sax.InputSource;
-import org.xml.sax.XMLReader;
-
/**
- * Custom unmarshaller to read Lifecycle configuration namespace.
+ * Custom unmarshaller to read Lifecycle configuration.
*/
public class PutBucketLifecycleConfigurationUnmarshaller
- implements MessageBodyReader<S3LifecycleConfiguration> {
-
- private final JAXBContext context;
- private final XMLReader xmlReader;
+ extends MessageUnmarshaller<S3LifecycleConfiguration> {
Review Comment:
nit: the two sibling unmarshallers (`MultiDeleteRequestUnmarshaller`,
`CompleteMultipartUploadRequestUnmarshaller`) each ship a `Test*Unmarshaller`
with a with-/without-namespace round-trip; a small parallel
`TestPutBucketLifecycleConfigurationUnmarshaller` would lock in the namespace +
malformed-XML handling at this level. The `putBucketLifecycleConfiguration`
path is already covered by `TestS3LifecycleConfigurationPut`, so this is
symmetry, not a coverage gap.
Also the class javadoc dropped the "namespace" mention while the base still
applies the S3 namespace filter — worth keeping the original wording.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]