@@ -42,9 +42,9 @@ public void tearDown() throws Exception {
4242 @ Disabled // https://github.com/FasterXML/jackson-datatype-hibernate/issues/192
4343 @ Test
4444 public void testNoReplacePersistentCollection () throws Exception {
45- final ObjectMapper mapper = hibernateMapper (new Hibernate5JakartaModule ()
46- .configure (Hibernate5JakartaModule .Feature .FORCE_LAZY_LOADING , true )
47- );
45+ final ObjectMapper mapper = hibernateMapper (new Hibernate5JakartaModule ()
46+ .configure (Hibernate5JakartaModule .Feature .FORCE_LAZY_LOADING , true )
47+ );
4848
4949 Customer customer = em .find (Customer .class , 103 );
5050 assertFalse (Hibernate .isInitialized (customer .getPayments ()));
@@ -65,21 +65,21 @@ public void testNoReplacePersistentCollection() throws Exception {
6565 // [Issue#93], backwards compatible case
6666 @ Test
6767 public void testReplacePersistentCollection () throws Exception {
68- final ObjectMapper mapper = hibernateMapper (new Hibernate5JakartaModule ()
69- .configure (Hibernate5JakartaModule .Feature .FORCE_LAZY_LOADING , true )
70- .configure (Hibernate5JakartaModule .Feature .REPLACE_PERSISTENT_COLLECTIONS , true )
71- );
72-
73- Customer customer = em .find (Customer .class , 103 );
74- assertFalse (Hibernate .isInitialized (customer .getPayments ()));
75- String json = mapper .writerWithDefaultPrettyPrinter ().writeValueAsString (customer );
76- assertFalse (json .contains ("org.hibernate.collection" ));
77- // should force loading...
78- Set <Payment > payments = customer .getPayments ();
79-
80- assertTrue (Hibernate .isInitialized (payments ));
81- Customer stuff = mapper .readValue (json , Customer .class );
82- assertNotNull (stuff );
68+ final ObjectMapper mapper = hibernateMapper (new Hibernate5JakartaModule ()
69+ .configure (Hibernate5JakartaModule .Feature .FORCE_LAZY_LOADING , true )
70+ .configure (Hibernate5JakartaModule .Feature .REPLACE_PERSISTENT_COLLECTIONS , true )
71+ );
72+
73+ Customer customer = em .find (Customer .class , 103 );
74+ assertFalse (Hibernate .isInitialized (customer .getPayments ()));
75+ String json = mapper .writerWithDefaultPrettyPrinter ().writeValueAsString (customer );
76+ assertFalse (json .contains ("org.hibernate.collection" ));
77+ // should force loading...
78+ Set <Payment > payments = customer .getPayments ();
79+
80+ assertTrue (Hibernate .isInitialized (payments ));
81+ Customer stuff = mapper .readValue (json , Customer .class );
82+ assertNotNull (stuff );
8383
8484// Map<?, ?> stuff = mapper.readValue(json, Map.class);
8585//
0 commit comments