Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Aug 3, 2023
1 parent df2c188 commit ed76ed4
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
9 changes: 6 additions & 3 deletions src/main/java/tools/jackson/core/TokenStreamFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public static int collectDefaults() {
/**
* Active ErrorReportConfiguration to use.
*/
protected ErrorReportConfiguration _errorReportConfiguration;
protected final ErrorReportConfiguration _errorReportConfiguration;

/*
/**********************************************************************
Expand All @@ -257,11 +257,12 @@ public static int collectDefaults() {
* @param formatReadFeatures Bitmask of format-specific read features enabled
* @param formatWriteFeatures Bitmask of format-specific write features enabled
*/
protected TokenStreamFactory(StreamReadConstraints src,
StreamWriteConstraints swc,
protected TokenStreamFactory(StreamReadConstraints src, StreamWriteConstraints swc,
ErrorReportConfiguration erc,
int formatReadFeatures, int formatWriteFeatures) {
_streamReadConstraints = src;
_streamWriteConstraints = swc;
_errorReportConfiguration = erc;
_factoryFeatures = DEFAULT_FACTORY_FEATURE_FLAGS;
_streamReadFeatures = DEFAULT_STREAM_READ_FEATURE_FLAGS;
_streamWriteFeatures = DEFAULT_STREAM_WRITE_FEATURE_FLAGS;
Expand All @@ -284,6 +285,7 @@ protected TokenStreamFactory(TSFBuilder<?,?> baseBuilder)
{
_streamReadConstraints = baseBuilder._streamReadConstraints;
_streamWriteConstraints = baseBuilder._streamWriteConstraints;
_errorReportConfiguration = baseBuilder._errorReportConfiguration;
_factoryFeatures = baseBuilder.factoryFeaturesMask();
_streamReadFeatures = baseBuilder.streamReadFeaturesMask();
_streamWriteFeatures = baseBuilder.streamWriteFeaturesMask();
Expand All @@ -301,6 +303,7 @@ protected TokenStreamFactory(TokenStreamFactory src)
{
_streamReadConstraints = src._streamReadConstraints;
_streamWriteConstraints = src._streamWriteConstraints;
_errorReportConfiguration = src._errorReportConfiguration;
_factoryFeatures = src._factoryFeatures;
_streamReadFeatures = src._streamReadFeatures;
_streamWriteFeatures = src._streamWriteFeatures;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tools/jackson/core/base/BinaryTSFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ public abstract class BinaryTSFactory
*/

protected BinaryTSFactory(StreamReadConstraints src,
StreamWriteConstraints swc,
StreamWriteConstraints swc, ErrorReportConfiguration erc,
int formatPF, int formatGF) {
super(src, swc, formatPF, formatGF);
super(src, swc, erc, formatPF, formatGF);
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/tools/jackson/core/base/DecorableTSFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ public T addDecorator(JsonGeneratorDecorator dec) {
/**********************************************************************
*/

protected DecorableTSFactory(StreamReadConstraints src,
StreamWriteConstraints swc,
protected DecorableTSFactory(StreamReadConstraints src, StreamWriteConstraints swc,
ErrorReportConfiguration erc,
int formatPF, int formatGF) {
super(src, swc, formatPF, formatGF);
super(src, swc, erc, formatPF, formatGF);
_inputDecorator = null;
_outputDecorator = null;
_generatorDecorators = null;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tools/jackson/core/base/TextualTSFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ public abstract class TextualTSFactory
*/

protected TextualTSFactory(StreamReadConstraints src,
StreamWriteConstraints swc,
StreamWriteConstraints swc, ErrorReportConfiguration erc,
int formatPF, int formatGF) {
super(src, swc, formatPF, formatGF);
super(src, swc, erc, formatPF, formatGF);
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/main/java/tools/jackson/core/json/JsonFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ public class JsonFactory
*/
public JsonFactory() {
super(StreamReadConstraints.defaults(), StreamWriteConstraints.defaults(),
ErrorReportConfiguration.defaults(),
DEFAULT_JSON_PARSER_FEATURE_FLAGS, DEFAULT_JSON_GENERATOR_FEATURE_FLAGS);
_rootValueSeparator = DEFAULT_ROOT_VALUE_SEPARATOR;
_characterEscapes = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ public class FactoryBaseImplsTest extends BaseTest
static class ToyBinaryFormatFactory
extends BinaryTSFactory
{
public ToyBinaryFormatFactory() { super(null, null, 0, 0); }
public ToyBinaryFormatFactory() {
super(StreamReadConstraints.defaults(), StreamWriteConstraints.defaults(),
ErrorReportConfiguration.defaults(), 0, 0);
}

@Override
protected JsonParser _createParser(ObjectReadContext readCtxt,
Expand Down Expand Up @@ -69,7 +72,8 @@ static class ToyTextualFormatFactory
extends TextualTSFactory
{
public ToyTextualFormatFactory() {
super(StreamReadConstraints.defaults(), StreamWriteConstraints.defaults(), 0, 0);
super(StreamReadConstraints.defaults(), StreamWriteConstraints.defaults(),
ErrorReportConfiguration.defaults(), 0, 0);
}

@Override
Expand Down

0 comments on commit ed76ed4

Please sign in to comment.