@@ -101,7 +101,7 @@ String result = jsonb.toJson(dogs);
101
101
102
102
// We can also deserialize back into a raw collection, but since there is no way to infer a type here,
103
103
// the result will be a list of java.util.Map instances with string keys.
104
- dogs = jsonb.fromJson(result, ArrayList.getClass() );
104
+ dogs = jsonb.fromJson(result, ArrayList.class );
105
105
----
106
106
107
107
==== Mapping a generic collection
@@ -517,7 +517,7 @@ public class CustomerAdapter implements JsonbAdapter<Customer, CustomerAnnotated
517
517
public CustomerAnnotated adaptToJson(Customer c) throws Exception {
518
518
if (c == null)
519
519
return null;
520
- CustomerAnnotated customer = new Customer ();
520
+ CustomerAnnotated customer = new CustomerAnnotated ();
521
521
customer.setId(c.getId());
522
522
customer.setName(c.getName());
523
523
return customer;
@@ -544,7 +544,7 @@ First scenario:
544
544
Jsonb jsonb = JsonbBuilder.create();
545
545
546
546
// Create customer
547
- Customer c = new Customer();
547
+ Customer customer = new Customer();
548
548
549
549
// Initialization code is skipped
550
550
@@ -576,7 +576,7 @@ JsonbConfig config = new JsonbConfig()
576
576
Jsonb jsonb = JsonbBuilder.create(config);
577
577
578
578
// Create customer
579
- Customer c = new Customer();
579
+ Customer customer = new Customer();
580
580
581
581
// Initialization code is skipped
582
582
0 commit comments