@@ -72,7 +72,7 @@ public void setValue(String value) {
7272 String expected = "{\" customInterface\" :{\" value\" :\" value1\" }}" ;
7373 assertEquals (expected , defaultJsonb .toJson (unsupported ));
7474 try {
75- defaultJsonb .fromJson (expected , ClassWithUnsupportedFields .class );
75+ defaultJsonb .fromJson (expected , ClassWithUnsupportedFields .class );
7676 fail ("Should report an error" );
7777 } catch (JsonbException e ) {
7878 assertTrue (e .getMessage ().contains ("Cannot infer a type" ));
@@ -136,11 +136,11 @@ public void testMissingFieldDefaultNull() {
136136
137137 @ Test
138138 public void testMissingFieldIgnored () {
139- assertThrows (JsonbException .class , () -> {
140- Jsonb defaultConfig = JsonbBuilder .create (new JsonbConfig ().setProperty (FAIL_ON_UNKNOWN_PROPERTIES , true ));
141- String json = "{\" nestedPojo\" :{\" integerValue\" :10,\" missingField\" :5},\" optionalLong\" :11}" ;
142- SupportedTypes result = defaultConfig .fromJson (json , SupportedTypes .class );
143- });
139+ assertThrows (JsonbException .class , () -> {
140+ Jsonb defaultConfig = JsonbBuilder .create (new JsonbConfig ().setProperty (FAIL_ON_UNKNOWN_PROPERTIES , true ));
141+ String json = "{\" nestedPojo\" :{\" integerValue\" :10,\" missingField\" :5},\" optionalLong\" :11}" ;
142+ SupportedTypes result = defaultConfig .fromJson (json , SupportedTypes .class );
143+ });
144144 }
145145
146146 @ Test
@@ -229,19 +229,19 @@ public void testEmptyStringAsOptionalLong() {
229229
230230 @ Test
231231 public void testMalformedURL () {
232- Type type = new TestTypeToken <ScalarValueWrapper <URL >>(){}.getType ();
233- assertFail ("{\" value\" :\" www.oracle.com\" }" , type , "value" , URL .class );
232+ Type type = new TestTypeToken <ScalarValueWrapper <URL >>(){}.getType ();
233+ assertFail ("{\" value\" :\" www.oracle.com\" }" , type , "value" , URL .class );
234234 }
235235
236236 @ Test
237237 public void testMalformedURI () {
238- Type type = new TestTypeToken <ScalarValueWrapper <URI >>(){}.getType ();
239- assertFail ("{\" value\" :\" www .oracle .com\" }" , type , "value" , URI .class );
238+ Type type = new TestTypeToken <ScalarValueWrapper <URI >>(){}.getType ();
239+ assertFail ("{\" value\" :\" www .oracle .com\" }" , type , "value" , URI .class );
240240 }
241241
242242 private void assertFail (String json , Type type , String failureProperty , Class <?> failurePropertyClass ) {
243243 try {
244- defaultJsonb .fromJson (json , type );
244+ defaultJsonb .fromJson (json , type );
245245 fail ("Expected to catch JsonbException but did not" );
246246 } catch (JsonbException e ) {
247247 if (!e .getMessage ().contains (failureProperty ) || !e .getMessage ().contains (failurePropertyClass .getName ())) {
0 commit comments