Skip to content

Commit 51c63d3

Browse files
committed
Need to prevent exception from overrideFormatFeatures
1 parent 7e89cfe commit 51c63d3

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ public enum Feature {
149149
*<p>
150150
* Feature is disabled by default.
151151
*/
152-
// @Deprecated
153152
ESCAPE_NON_ASCII(false),
154153

155154
// 23-Nov-2015, tatu: for [core#223], if and when it gets implemented

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -784,10 +784,9 @@ public int getFormatFeatures() {
784784
* @since 2.6
785785
*/
786786
public JsonParser overrideFormatFeatures(int values, int mask) {
787-
throw new IllegalArgumentException("No FormatFeatures defined for parser of type "+getClass().getName());
788-
/*
789-
_formatFeatures = (_formatFeatures & ~mask) | (values & mask);
790-
*/
787+
// 08-Oct-2018, tatu: For 2.10 we actually do get `JsonReadFeature`s so...
788+
// throw new IllegalArgumentException("No FormatFeatures defined for parser of type "+getClass().getName());
789+
return this;
791790
}
792791

793792
/*

src/main/java/com/fasterxml/jackson/core/json/JsonReadFeature.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public enum JsonReadFeature
2424
* <b>disabled by default</b> for parsers and must be
2525
* explicitly enabled.
2626
*/
27-
@SuppressWarnings("deprecation")
27+
@SuppressWarnings("deprecation")
2828
ALLOW_JAVA_COMMENTS(false, JsonParser.Feature.ALLOW_COMMENTS),
2929

3030
/**

0 commit comments

Comments
 (0)