You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by fhueske <gi...@git.apache.org> on 2016/09/20 09:50:08 UTC

[GitHub] flink pull request #2304: [FLINK-4268] [core] Add parsers for BigDecimal/Big...

Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2304#discussion_r79573034
  
    --- Diff: flink-core/src/main/java/org/apache/flink/types/parser/BigDecParser.java ---
    @@ -120,7 +132,14 @@ public static final BigDecimal parseField(byte[] bytes, int startPos, int length
     			throw new NumberFormatException("There is leading or trailing whitespace in the numeric field.");
     		}
     
    -		String str = new String(bytes, startPos, i);
    -		return new BigDecimal(str);
    +		final char[] reuse = new char[i];
    --- End diff --
    
    `reuse` is not reused here but created new in every method invocation.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---