beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (BEAM-3140) Unchecked return value from bis.read() in MutationGroupEncoder#decodeMutation
Date Sat, 04 Nov 2017 01:50:02 GMT
Ted Yu created BEAM-3140:
----------------------------

             Summary: Unchecked return value from bis.read() in MutationGroupEncoder#decodeMutation
                 Key: BEAM-3140
                 URL: https://issues.apache.org/jira/browse/BEAM-3140
             Project: Beam
          Issue Type: Bug
          Components: sdk-java-gcp
            Reporter: Ted Yu
            Assignee: Chamikara Jayalath
            Priority: Minor


{code}
  private Mutation decodeMutation(ByteArrayInputStream bis) throws IOException {
    Mutation.Op op = Mutation.Op.values()[bis.read()];
    if (op == Mutation.Op.DELETE) {
      return decodeDelete(bis);
{code}
The return value from bis.read() should be checked before it is used to dereference values().



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message