File tree 3 files changed +13
-4
lines changed
main/java/com/exceptionless/exceptionlessclient/utils
test/java/com/exceptionless/exceptionlessclient
3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ public final class Utils {
17
17
JSON_MAPPER = new ObjectMapper ();
18
18
JSON_MAPPER .registerModule (new JavaTimeModule ());
19
19
JSON_MAPPER .disable (SerializationFeature .WRITE_DATES_AS_TIMESTAMPS );
20
+ JSON_MAPPER .disable (SerializationFeature .FAIL_ON_EMPTY_BEANS );
20
21
}
21
22
22
23
private static final Logger LOG = LoggerFactory .getLogger (Utils .class );
Original file line number Diff line number Diff line change 1
1
package com .exceptionless .exceptionlessclient ;
2
2
3
3
import com .exceptionless .exceptionlessclient .configuration .ConfigurationManager ;
4
- import com .exceptionless .exceptionlessclient .models .Event ;
5
- import com .exceptionless .exceptionlessclient .models .UserDescription ;
6
4
import com .exceptionless .exceptionlessclient .enums .EventPropertyKey ;
7
5
import com .exceptionless .exceptionlessclient .enums .EventType ;
8
- import com .exceptionless .exceptionlessclient .settings . SettingsResponse ;
9
- import com .exceptionless .exceptionlessclient .submission . SubmissionResponse ;
6
+ import com .exceptionless .exceptionlessclient .models . Event ;
7
+ import com .exceptionless .exceptionlessclient .models . UserDescription ;
10
8
import com .exceptionless .exceptionlessclient .queue .DefaultEventQueue ;
11
9
import com .exceptionless .exceptionlessclient .settings .DefaultSettingsClient ;
12
10
import com .exceptionless .exceptionlessclient .settings .ServerSettings ;
11
+ import com .exceptionless .exceptionlessclient .settings .SettingsResponse ;
13
12
import com .exceptionless .exceptionlessclient .storage .InMemoryStorage ;
14
13
import com .exceptionless .exceptionlessclient .storage .InMemoryStorageProvider ;
15
14
import com .exceptionless .exceptionlessclient .submission .DefaultSubmissionClient ;
15
+ import com .exceptionless .exceptionlessclient .submission .SubmissionResponse ;
16
16
import org .junit .jupiter .api .BeforeEach ;
17
17
import org .junit .jupiter .api .Test ;
18
18
import org .junit .jupiter .api .extension .ExtendWith ;
Original file line number Diff line number Diff line change 1
1
package com .exceptionless .exceptionlessclient .utils ;
2
2
3
+ import com .fasterxml .jackson .core .JsonProcessingException ;
3
4
import org .junit .jupiter .api .Test ;
4
5
5
6
import java .net .URI ;
@@ -80,4 +81,11 @@ public void itCanMatchAValueToAPattern() {
80
81
assertThat (Utils .match ("abc" , "def" )).isFalse ();
81
82
assertThat (Utils .match ("ABC" , "abc" )).isTrue ();
82
83
}
84
+
85
+ @ Test
86
+ public void itCanSerializeEmptyBeans () throws JsonProcessingException {
87
+ class EmptyBean {}
88
+
89
+ assertThat (Utils .JSON_MAPPER .writeValueAsString (new EmptyBean ())).isEqualTo ("{}" );
90
+ }
83
91
}
You can’t perform that action at this time.
0 commit comments