Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-14533

Size of args cannot be less than zero in TraceAdmin#run as its linkedlist

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

        @Override
        public int run(String argv[]) throws Exception {
            LinkedList<String> args = new LinkedList<String>();
            ……
               if (args.size() < 0) {
                  System.err.println("You must specify an operation.");
                       return 1;
              }
      ……
      }
      

      From the code above, the args is a linklist obejct, so it cannot be less than zero.meaning that code below is wrong

       if (args.size() < 0) {
            System.err.println("You must specify an operation.");
            return 1;
          }
      

      Attachments

        1. HADOOP-14533-001.patch
          2 kB
          Weisen Han
        2. HADOOP-14533-002.patch
          2 kB
          Weisen Han

        Activity

          People

            Weisen Han Weisen Han
            Weisen Han Weisen Han
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: