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

TIFFTag.TIFF_RATIONAL, TIFFTag.TIFF_SRATIONAL - add zero denominator checks?

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 9
    • client-libs

      not sure if should be considered as an issue, but may cause some confusion (b142):

      long r[][] = {{1, 0}};
        int type = TIFFTag.TIFF_RATIONAL;
        TIFFField f = new TIFFField(new TIFFTag("tag", 666, 1 << type), type, r.length, r);

        System.out.println(f.getValueAsString(0));
        System.out.println(f.getAsLong(0));
        System.out.println(f.getAsInt(0));

      => output:

        1/0
        9223372036854775807 //confusing!
        2147483647 // confusing!

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

              Created:
              Updated: