@@ -11,9 +11,9 @@ public class AsyncNonStdParsingTest extends AsyncTestBase
11
11
{
12
12
public void testLargeUnquotedNames () throws Exception
13
13
{
14
- JsonFactory f = new JsonFactory ();
15
- f . configure ( JsonParser . Feature . ALLOW_UNQUOTED_FIELD_NAMES , true );
16
-
14
+ final JsonFactory f = JsonFactory . builder ()
15
+ . enable ( JsonReadFeature . ALLOW_UNQUOTED_FIELD_NAMES )
16
+ . build ();
17
17
StringBuilder sb = new StringBuilder (5000 );
18
18
sb .append ("[\n " );
19
19
final int REPS = 1050 ;
@@ -60,9 +60,9 @@ private void _testLargeUnquoted(JsonFactory f, int reps, String doc,
60
60
61
61
public void testSimpleUnquotedNames () throws Exception
62
62
{
63
- final JsonFactory f = new JsonFactory ();
64
- f . configure ( JsonParser . Feature . ALLOW_UNQUOTED_FIELD_NAMES , true );
65
-
63
+ final JsonFactory f = JsonFactory . builder ()
64
+ . enable ( JsonReadFeature . ALLOW_UNQUOTED_FIELD_NAMES )
65
+ . build ();
66
66
_testSimpleUnquoted (f , 0 , 99 );
67
67
_testSimpleUnquoted (f , 0 , 5 );
68
68
_testSimpleUnquoted (f , 0 , 3 );
@@ -171,9 +171,9 @@ private void _testSingleQuotesDefault(JsonFactory f,
171
171
*/
172
172
public void testAposQuotingEnabled () throws Exception
173
173
{
174
- JsonFactory f = new JsonFactory ();
175
- f . configure ( JsonParser . Feature . ALLOW_SINGLE_QUOTES , true );
176
-
174
+ final JsonFactory f = JsonFactory . builder ()
175
+ . enable ( JsonReadFeature . ALLOW_SINGLE_QUOTES )
176
+ . build ();
177
177
_testAposQuotingEnabled (f , 0 , 99 );
178
178
_testAposQuotingEnabled (f , 0 , 5 );
179
179
_testAposQuotingEnabled (f , 0 , 3 );
@@ -269,9 +269,9 @@ private void _testAposQuotingEnabled(JsonFactory f,
269
269
// test to verify that we implicitly allow escaping of apostrophe
270
270
public void testSingleQuotesEscaped () throws Exception
271
271
{
272
- JsonFactory f = new JsonFactory ();
273
- f . configure ( JsonParser . Feature . ALLOW_SINGLE_QUOTES , true );
274
-
272
+ final JsonFactory f = JsonFactory . builder ()
273
+ . enable ( JsonReadFeature . ALLOW_SINGLE_QUOTES )
274
+ . build ();
275
275
_testSingleQuotesEscaped (f , 0 , 99 );
276
276
_testSingleQuotesEscaped (f , 0 , 5 );
277
277
_testSingleQuotesEscaped (f , 0 , 3 );
@@ -296,9 +296,9 @@ private void _testSingleQuotesEscaped(JsonFactory f,
296
296
297
297
public void testNonStandardNameChars () throws Exception
298
298
{
299
- JsonFactory f = new JsonFactory ();
300
- f . configure ( JsonParser . Feature . ALLOW_UNQUOTED_FIELD_NAMES , true );
301
-
299
+ final JsonFactory f = JsonFactory . builder ()
300
+ . enable ( JsonReadFeature . ALLOW_UNQUOTED_FIELD_NAMES )
301
+ . build ();
302
302
_testNonStandardNameChars (f , 0 , 99 );
303
303
_testNonStandardNameChars (f , 0 , 6 );
304
304
_testNonStandardNameChars (f , 0 , 3 );
0 commit comments