Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4107056

Add warning for unused local members/arguments

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 1.2.0
    • tools
    • generic
    • solaris_2.5.1


      It would be nice if the javac compiler could give warnings similiar
      to gcc -Wall. The following two items were suggested by a licensee :-

      1. Generate warning if there are unused local members or arguments

      2. Generate warning for "x = x" occurences which often is a source
         error where the programmer has actually intended "this.x = x", eg:-
         private int count;
      public void setCount( int count ) {
      count = count; // should be this.count = count;
              }

            dstoutamsunw David Stoutamire (Inactive)
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: