fhueske commented on a change in pull request #6823: [FLINK-10134] UTF-16 
support for TextInputFormat bug refixed
URL: https://github.com/apache/flink/pull/6823#discussion_r225479771
 
 

 ##########
 File path: 
flink-core/src/main/java/org/apache/flink/api/common/io/DelimitedInputFormat.java
 ##########
 @@ -215,6 +240,7 @@ public Charset getCharset() {
        public void setCharset(String charset) {
                this.charsetName = Preconditions.checkNotNull(charset);
                this.charset = null;
 
 Review comment:
   I would handle the different charsets with three `private` fields. 
   
   1. `configuredCharset`: This is the charset that is configured via 
`setCharset()`
   2. `bomIdentifiedCharset`: This is the charset that is set by 
`setBomFileCharset()`
   3. `charset`: This is the charset that is returned by `getCharset()`. If not 
set before (i.e., `null`), it is set first depending on the `configuredCharset` 
and `bomIdentifiedCharset`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to