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

TIFFImageReadParam: should "contains()" check be appropriate for addAllowedTagSet() method?

    XMLWordPrintable

    Details

      Description

      Just a minor note: for now the user can add the same tag set multiple times, is it really necessary?

      For example:

              TIFFImageReadParam param = new TIFFImageReadParam();
              TIFFTagSet ts = ExifGPSTagSet.getInstance();

              param.addAllowedTagSet(ts);
              // <some code ...>
              // accidentally, do it again
              param.addAllowedTagSet(ts);
              // <some code ...>
              param.removeAllowedTagSet(ts);
              
              // output: "true" - that may be confusing
              System.out.println(param.getAllowedTagSets().contains(ts));

      checked with JDK9 b111

        Attachments

          Activity

            People

            Assignee:
            bpb Brian Burkhalter
            Reporter:
            avstepan Alexander Stepanov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: