[FAST-43] inputStream.read returns -1, indicating end-of-file and doesn't throw an Exception Created: 25/Mar/12  Updated: 11/Apr/12  Resolved: 11/Apr/12

Status: Resolved
Project: OpenFAST
Component/s: Types
Affects Version/s: 1.0.2, 1.0.3
Fix Version/s: 1.1.0

Type: Bug Priority: Default
Reporter: ivan Assignee: Jacob Northey
Resolution: Fixed Votes: 0
Labels: None


 Description   

org.openfast.template.type.codec.UnsignedInteger contains a method

public ScalarValue decode(InputStream in) {
long value = 0;
int byt;
try {
do

{ byt = in.read(); value = (value << 7) | (byt & 0x7f); }

while ((byt & 0x80) == 0);
} catch (IOException e)

{ throw new RuntimeException(e); }

return createValue(value);
}

it does not checks for eof condition (that return could be -1)


Generated at Sat Nov 23 18:46:19 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.