smolnar82 commented on code in PR #828:
URL: https://github.com/apache/knox/pull/828#discussion_r1439519566


##########
gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/json/JsonFilterReader.java:
##########
@@ -77,6 +77,11 @@ class JsonFilterReader extends Reader {
     bufferingLevel = null;
     bufferingConfig = null;
     this.config = config;
+    jsonParserConfigInit();
+  }
+
+  private void jsonParserConfigInit() {
+    
parser.enable(com.fasterxml.jackson.core.JsonParser.Feature.ALLOW_NON_NUMERIC_NUMBERS);

Review Comment:
   Why don't you add this feature when creating the `factory` in line 69?
   Moreover, the referenced feature has been deprecated since 2.10 according to 
Jackson docs (we use 2.11.4 in Knox already):
   ```
           /**
            * Feature that allows parser to recognize set of
            * "Not-a-Number" (NaN) tokens as legal floating number
            * values (similar to how many other data formats and
            * programming language source code allows it).
            * Specific subset contains values that
            * <a href="http://www.w3.org/TR/xmlschema-2/";>XML Schema</a>
            * (see section 3.2.4.1, Lexical Representation)
            * allows (tokens are quoted contents, not including quotes):
            *<ul>
            *  <li>"INF" (for positive infinity), as well as alias of "Infinity"
            *  <li>"-INF" (for negative infinity), alias "-Infinity"
            *  <li>"NaN" (for other not-a-numbers, like result of division by 
zero)
            *</ul>
            *<p>
            * Since JSON specification does not allow use of such values,
            * this is a non-standard feature, and as such disabled by default.
             *
             * @deprecated Since 2.10 use {@link 
com.fasterxml.jackson.core.json.JsonReadFeature#ALLOW_NON_NUMERIC_NUMBERS} 
instead
             */
            @Deprecated
            ALLOW_NON_NUMERIC_NUMBERS(false),
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@knox.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to