Repository: asterixdb Updated Branches: refs/heads/master 604c921ae -> 1c3dc6181
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/1c3dc618/hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/data/marshalling/ShortSerializerDeserializer.java ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/data/marshalling/ShortSerializerDeserializer.java b/hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/data/marshalling/ShortSerializerDeserializer.java index 69799a9..1ffe8f1 100644 --- a/hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/data/marshalling/ShortSerializerDeserializer.java +++ b/hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/data/marshalling/ShortSerializerDeserializer.java @@ -35,19 +35,27 @@ public class ShortSerializerDeserializer implements ISerializerDeserializer<Shor @Override public Short deserialize(DataInput in) throws HyracksDataException { + return read(in); + } + + @Override + public void serialize(Short instance, DataOutput out) throws HyracksDataException { + write(instance, out); + } + + public static short read(DataInput in) throws HyracksDataException { try { return in.readShort(); } catch (IOException e) { - throw new HyracksDataException(e); + throw HyracksDataException.create(e); } } - @Override - public void serialize(Short instance, DataOutput out) throws HyracksDataException { + public static void write(short instance, DataOutput out) throws HyracksDataException { try { - out.writeShort(instance.intValue()); + out.writeShort(instance); } catch (IOException e) { - throw new HyracksDataException(e); + throw HyracksDataException.create(e); } } } http://git-wip-us.apache.org/repos/asf/asterixdb/blob/1c3dc618/hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/data/marshalling/UTF8StringSerializerDeserializer.java ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/data/marshalling/UTF8StringSerializerDeserializer.java b/hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/data/marshalling/UTF8StringSerializerDeserializer.java index 8dccf70..dcdc77b 100644 --- a/hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/data/marshalling/UTF8StringSerializerDeserializer.java +++ b/hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/data/marshalling/UTF8StringSerializerDeserializer.java @@ -49,7 +49,7 @@ public class UTF8StringSerializerDeserializer implements ISerializerDeserializer try { return UTF8StringUtil.readUTF8(in, utf8StringReader); } catch (IOException e) { - throw new HyracksDataException(e); + throw HyracksDataException.create(e); } } @@ -58,7 +58,7 @@ public class UTF8StringSerializerDeserializer implements ISerializerDeserializer try { UTF8StringUtil.writeUTF8(instance, out, utf8StringWriter); } catch (IOException e) { - throw new HyracksDataException(e); + throw HyracksDataException.create(e); } } }