Uploaded image for project: 'Commons Imaging'
  1. Commons Imaging
  2. IMAGING-165

TiffReader.Collector adds values to a field List<TiffField> but never uses it

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0-alpha1
    • 1.0-alpha2
    • Format: TIFF
    • None

    Description

      org.apache.commons.imaging.formats.tiff.TiffReader.Collector adds values to a field List<TiffField> but never uses it. This could be the cause of some problems reported elsewhere.

      TiffReader contains an embedded class named Collector. This class has a private field named

      private static class Collector implements Listener {
              private final List<TiffField> fields = new ArrayList<TiffField>();
      

      There are values added in a method named

      public boolean addField(final TiffField field) {
           fields.add(field);
           return true;
      }
      

      This method is the only which uses this field so these values are never used. Is there a getter missing? Or was it intended to use these values in class TiffContents like "tiffHeader" and "directories"?

      public TiffContents getContents() {
          return new TiffContents(tiffHeader, directories);
      }
      

      At least the method "addField" seems unused but necessary to implement the "Listener" interface.

      Attachments

        Issue Links

          Activity

            People

              kinow Bruno P. Kinoshita
              mgmechanics Michael Groß
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m