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

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

XMLWordPrintable

      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

            bpb Brian Burkhalter
            avstepan Alexander Stepanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: