Skip to content

Commit bbe4298

Browse files
committed
Minor cbor read/write feature fixes
1 parent 5352b81 commit bbe4298

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

cbor/src/main/java/tools/jackson/dataformat/cbor/CBORFactory.java

+10-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public CBORFactory() {
8787
super(StreamReadConstraints.defaults(),
8888
StreamWriteConstraints.defaults(),
8989
ErrorReportConfiguration.defaults(),
90-
0,
90+
DEFAULT_CBOR_PARSER_FEATURE_FLAGS,
9191
DEFAULT_CBOR_GENERATOR_FEATURE_FLAGS);
9292
}
9393

@@ -192,9 +192,16 @@ public Class<CBORWriteFeature> getFormatWriteFeatureType() {
192192
}
193193

194194
/**
195-
* Check whether specified generator feature is enabled.
195+
* Check whether specified CBOR-specific stream read feature is enabled.
196196
*/
197-
public final boolean isEnabled(CBORWriteFeature f) {
197+
public boolean isEnabled(CBORReadFeature f) {
198+
return f.enabledIn(_formatReadFeatures);
199+
}
200+
201+
/**
202+
* Check whether specified CBOR-specific stream write feature is enabled.
203+
*/
204+
public boolean isEnabled(CBORWriteFeature f) {
198205
return f.enabledIn(_formatWriteFeatures);
199206
}
200207

0 commit comments

Comments
 (0)