Skip to content

Commit

Permalink
[hotfix] Fix SimpleStringSchema serialization issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rmetzger committed Nov 28, 2015
1 parent 09ea3dd commit e9a2bc9
Showing 1 changed file with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import org.apache.flink.api.common.typeinfo.BasicTypeInfo;
import org.apache.flink.api.common.typeinfo.TypeInformation;

import java.nio.charset.Charset;

/**
* Very simple serialization schema for strings.
*/
Expand All @@ -30,19 +28,9 @@ public class SimpleStringSchema implements DeserializationSchema<String>,

private static final long serialVersionUID = 1L;

private Charset charset = Charset.defaultCharset();

public SimpleStringSchema() {

}

public SimpleStringSchema(Charset charset) {
this.charset = charset;
}

@Override
public String deserialize(byte[] message) {
return new String(message, charset);
return new String(message);
}

@Override
Expand All @@ -52,7 +40,7 @@ public boolean isEndOfStream(String nextElement) {

@Override
public byte[] serialize(String element) {
return element.getBytes(charset);
return element.getBytes();
}

@Override
Expand Down

0 comments on commit e9a2bc9

Please sign in to comment.