Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Nov 28, 2023
1 parent e290257 commit 5f961f5
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
package com.fasterxml.jackson.databind.ser.filter;

import java.util.Map;
import java.util.LinkedHashMap;

import com.fasterxml.jackson.annotation.JsonFilter;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.BaseMapTest;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectWriter;

import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.ser.FilterProvider;
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider;
import java.util.Map;
import java.util.LinkedHashMap;

/**
* Tests {@link SimpleFilterProvider} on registration of filters.
*/
Expand Down Expand Up @@ -91,7 +90,7 @@ public void testAddFilterWithEmptyStringId() throws Exception {
assertEquals(a2q("{'c':null,'d':'D is filtered'}"), jsonString);
}

public void testAddingNullFilter2ThrowsException() throws JsonProcessingException {
public void testAddingNullFilter2ThrowsException() throws Exception {
FilterProvider prov = new SimpleFilterProvider()
.addFilter("filterB", null);
ObjectWriter writer = MAPPER.writer(prov);
Expand All @@ -105,7 +104,7 @@ public void testAddingNullFilter2ThrowsException() throws JsonProcessingExceptio
}
}

public void testAddingNullFilterIdThrowsException() throws JsonProcessingException {
public void testAddingNullFilterIdThrowsException() throws Exception {
FilterProvider prov = new SimpleFilterProvider()
.addFilter(null, SimpleBeanPropertyFilter.serializeAll());
ObjectWriter writer = MAPPER.writer(prov);
Expand Down

0 comments on commit 5f961f5

Please sign in to comment.