Skip to content

Commit

Permalink
Added more javadocs
Browse files Browse the repository at this point in the history
Signed-off-by: jansupol <[email protected]>
  • Loading branch information
jansupol committed Dec 4, 2024
1 parent 6d65fc1 commit fe3c49b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
import org.glassfish.jersey.jackson.internal.AbstractObjectMapper;
import org.glassfish.jersey.jackson.internal.jackson.jaxrs.cfg.JaxRSFeature;


/**
* The Jackson {@link ObjectMapper} supporting {@link JaxRSFeature}s.
*/
public class JaxRSFeatureObjectMapper extends AbstractObjectMapper {

public JaxRSFeatureObjectMapper() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
import java.util.List;
import java.util.Optional;

/**
* Internal holder class for {@link JaxRSFeature} settings and their values.
*/
public class JaxrsFeatureBag<T extends JaxrsFeatureBag> {
protected static final String JAXRS_FEATURE = "jersey.config.jackson.jaxrs.feature";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import com.fasterxml.jackson.databind.ObjectMapper;
import org.glassfish.jersey.jackson.JacksonFeature;
import org.glassfish.jersey.jackson.JaxRSObjectMapper;
import org.glassfish.jersey.jackson.JaxRSFeatureObjectMapper;
import org.glassfish.jersey.jackson.internal.jackson.jaxrs.cfg.JaxRSFeature;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
Expand Down Expand Up @@ -88,7 +88,7 @@ public static class JaxrsFetureContextResolver implements ContextResolver<Object

@Override
public ObjectMapper getContext(Class<?> type) {
JaxRSObjectMapper objectMapper = new JaxRSObjectMapper();
JaxRSFeatureObjectMapper objectMapper = new JaxRSFeatureObjectMapper();
objectMapper.disable(JaxRSFeature.READ_FULL_STREAM);
return objectMapper;
}
Expand Down

0 comments on commit fe3c49b

Please sign in to comment.