Skip to content

Commit

Permalink
minor compilation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Apr 11, 2018
1 parent b00d354 commit 6d1494f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import java.util.*;

import com.fasterxml.jackson.annotation.JsonTypeInfo;

import com.fasterxml.jackson.databind.DefaultTyping;
import com.fasterxml.jackson.databind.ObjectMapper;

/**
Expand All @@ -21,8 +21,9 @@ static class Simple {

public void testCanSerialize() throws IOException
{
ObjectMapper mapper = new ObjectMapper();
mapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.WRAPPER_ARRAY);
ObjectMapper mapper = ObjectMapper.builder()
.enableDefaultTyping(DefaultTyping.NON_FINAL, JsonTypeInfo.As.WRAPPER_ARRAY)
.build();

// construct test object
List<String> l = new ArrayList<String>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import javax.ws.rs.core.MediaType;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.databind.DefaultTyping;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;

Expand All @@ -28,8 +29,8 @@ public void testCanSerialize() throws IOException
{
ObjectMapper mapper = ObjectMapper.builder()
.disable(SerializationFeature.FLUSH_AFTER_WRITE_VALUE)
.enableDefaultTyping(DefaultTyping.NON_FINAL, JsonTypeInfo.As.WRAPPER_ARRAY)
.build();
mapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.WRAPPER_ARRAY);

JacksonJsonProvider provider = new JacksonJsonProvider(mapper);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import java.util.*;

import com.fasterxml.jackson.annotation.JsonTypeInfo;

import com.fasterxml.jackson.databind.DefaultTyping;
import com.fasterxml.jackson.databind.ObjectMapper;

/**
Expand All @@ -21,8 +21,9 @@ static class Simple {

public void testCanSerialize() throws IOException
{
ObjectMapper mapper = new ObjectMapper();
mapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.WRAPPER_ARRAY);
ObjectMapper mapper = ObjectMapper.builder()
.enableDefaultTyping(DefaultTyping.NON_FINAL, JsonTypeInfo.As.WRAPPER_ARRAY)
.build();

// construct test object
List<String> l = new ArrayList<String>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package com.fasterxml.jackson.jaxrs.yaml;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.databind.DefaultTyping;
import com.fasterxml.jackson.databind.ObjectMapper;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
* Unit test to check [JACKSON-540]
*/
public class TestCanSerialize extends JaxrsTestBase
{
static class Simple {
Expand All @@ -21,8 +19,9 @@ static class Simple {

public void testCanSerialize() throws IOException
{
ObjectMapper mapper = new ObjectMapper();
mapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.WRAPPER_ARRAY);
ObjectMapper mapper = ObjectMapper.builder()
.enableDefaultTyping(DefaultTyping.NON_FINAL, JsonTypeInfo.As.WRAPPER_ARRAY)
.build();

// construct test object
List<String> l = new ArrayList<String>();
Expand Down

0 comments on commit 6d1494f

Please sign in to comment.