Skip to content

Commit dc024d9

Browse files
committed
Some more renaming wrt #1051 (decorateWith() -> addDecorator())
1 parent 36050bf commit dc024d9

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

src/main/java/com/fasterxml/jackson/core/TSFBuilder.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public B configure(JsonWriteFeature f, boolean state) {
279279
return _failNonJSON(f);
280280
}
281281

282-
// // // Other configuration
282+
// // // Other configuration, decorators
283283

284284
public B inputDecorator(InputDecorator dec) {
285285
_inputDecorator = dec;
@@ -291,6 +291,16 @@ public B outputDecorator(OutputDecorator dec) {
291291
return _this();
292292
}
293293

294+
public B addDecorator(JsonGeneratorDecorator decorator) {
295+
if (_generatorDecorators == null) {
296+
_generatorDecorators = new ArrayList<>();
297+
}
298+
_generatorDecorators.add(decorator);
299+
return _this();
300+
}
301+
302+
// // // Other configuration, constraints
303+
294304
/**
295305
* Sets the constraints for streaming reads.
296306
*
@@ -305,14 +315,6 @@ public B streamReadConstraints(StreamReadConstraints streamReadConstraints) {
305315

306316
// // // Other methods
307317

308-
public B decorateWith(JsonGeneratorDecorator decorator) {
309-
if (_generatorDecorators == null) {
310-
_generatorDecorators = new ArrayList<>();
311-
}
312-
_generatorDecorators.add(decorator);
313-
return _this();
314-
}
315-
316318
/**
317319
* Method for constructing actual {@link TokenStreamFactory} instance, given
318320
* configuration.

src/test/java/com/fasterxml/jackson/core/json/TestDecorators.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public void testDeprecatedMethods() throws IOException
173173
public void testGeneratorDecoration() throws Exception
174174
{
175175
JsonFactory f = JsonFactory.builder()
176-
.decorateWith(new SimpleGeneratorDecorator())
176+
.addDecorator(new SimpleGeneratorDecorator())
177177
.build();
178178
final String EXP = a2q("{'password':'***'}");
179179

0 commit comments

Comments
 (0)