Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4192

Generated java async code generates a result structure that is unused (Coverity)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Duplicate
    • 0.10.0
    • None
    • Java - Compiler
    • None

    Description

      The async method generator for Java emits an onError handler which contains this pattern:

               public void onError(java.lang.Exception e) {
      1556            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
      1557            org.apache.thrift.TSerializable msg;
          CID 26029 (#1 of 1): DLS: Dead local store (FB.DLS_DEAD_LOCAL_STORE)1. defect: Dead store to result.
      1558            Delete_Bundle_Request_Data_result result = new Delete_Bundle_Request_Data_result();
      1559            if (e instanceof org.apache.thrift.transport.TTransportException) {
      1560              _LOGGER.error("TTransportException inside handler", e);
      1561              fb.close();
      1562              return;
      1563            } else if (e instanceof org.apache.thrift.TApplicationException) {
      

      The item on line 1558 is not used. Any call method in a service definition will cause this.

      Attachments

        Issue Links

          Activity

            People

              jking3 James E. King III
              jking3 James E. King III
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: