Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-1918

Optimize logic and remove unnecessary temporary variables in YarnClient.class

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • master
    • None
    • plugins
    • None
    • Patch

    Description

      1.We have already determined the logic of the response! = Null and response.getStatus ()! = 200 in the getQueueResponse method, and do not need to be evaluated in the run method of the getQueueResponse method. Move "response.close ();" into the getQueueResponse method.
      2.There is no necessary to create so many useless temporary variables "String errMsg = errMessage;"
      just use errMessage is better practice.

      Attachments

        Activity

          People

            peng.jianhua peng.jianhua
            peng.jianhua peng.jianhua
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: