Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
329a6905
Commit
329a6905
authored
Mar 04, 2019
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish "Permit use of @JsonTest without Jackson"
Closes gh-16070
parent
36f71883
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
JsonExcludeFilter.java
...ework/boot/test/autoconfigure/json/JsonExcludeFilter.java
+8
-6
No files found.
spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/json/JsonExcludeFilter.java
View file @
329a6905
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -34,18 +34,20 @@ import org.springframework.util.ClassUtils;
...
@@ -34,18 +34,20 @@ import org.springframework.util.ClassUtils;
*/
*/
class
JsonExcludeFilter
extends
AnnotationCustomizableTypeExcludeFilter
{
class
JsonExcludeFilter
extends
AnnotationCustomizableTypeExcludeFilter
{
private
static
final
String
JACKSON_MODULE
=
"com.fasterxml.jackson.databind.Module"
;
private
static
final
Set
<
Class
<?>>
DEFAULT_INCLUDES
;
private
static
final
Set
<
Class
<?>>
DEFAULT_INCLUDES
;
static
{
static
{
Set
<
Class
<?>>
includes
=
new
LinkedHashSet
<
Class
<?>>();
Set
<
Class
<?>>
includes
=
new
LinkedHashSet
<
Class
<?>>();
includes
.
add
(
JsonComponent
.
class
);
try
{
try
{
includes
.
add
(
ClassUtils
.
forName
(
"com.fasterxml.jackson.databind.Module"
,
null
));
includes
.
add
(
ClassUtils
.
forName
(
JACKSON_MODULE
,
null
));
}
catch
(
Exception
ex
)
{
}
// Ignore
catch
(
Exception
ex
)
{
}
}
includes
.
add
(
JsonComponent
.
class
);
DEFAULT_INCLUDES
=
Collections
.
unmodifiableSet
(
includes
);
DEFAULT_INCLUDES
=
Collections
.
unmodifiableSet
(
includes
);
}
;
}
private
final
JsonTest
annotation
;
private
final
JsonTest
annotation
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment