[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] [9] RFR JDK-8169725: cannot use TIFFField(TIFFTag tag,
From:       Philip Race <philip.race () oracle ! com>
Date:       2016-11-23 16:03:17
Message-ID: 5835BDC5.2080108 () oracle ! com
[Download RAW message or body]

+1

-phil

On 11/16/16, 12:22 PM, Brian Burkhalter wrote:
> Here’s an updated version of the proposed changes.
>
> Thanks,
>
> Brian
>
> --- 
> a/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageMetadata.java
> +++ 
> b/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageMetadata.java
> @@ -87,7 +87,7 @@
>          rootIFD.initialize(stream, true, ignoreUnknownFields);
>      }
>
>
> -    public void addShortOrLongField(int tagNumber, int value) {
> +    public void addShortOrLongField(int tagNumber, long value) {
>          TIFFField field = new TIFFField(rootIFD.getTag(tagNumber), 
> value);
>          rootIFD.addTIFFField(field);
>      }
>
> --- 
> a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java
> +++ 
> b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java
> @@ -672,7 +672,7 @@
>       * for the supplied {@code TIFFTag}.
>       * @throws IllegalArgumentException if {@code value < 0}.
>       */
> -    public TIFFField(TIFFTag tag, int value) {
> +    public TIFFField(TIFFTag tag, long value) {
>          if(tag == null) {
>              throw new NullPointerException("tag == null!");
>          }
>
> On Nov 16, 2016, at 8:20 AM, Brian Burkhalter 
> <brian.burkhalter@oracle.com <mailto:brian.burkhalter@oracle.com>> wrote:
>
>> Thanks for investigating this. I agree that 
>> TIFFImageMetadata.addShortOrLongField() should similarly be changed.

[Attachment #3 (text/html)]

<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    +1<br>
    <br>
    -phil<br>
    <br>
    On 11/16/16, 12:22 PM, Brian Burkhalter wrote:
    <blockquote
      cite="mid:FE1426A7-D400-46B7-8CBD-6D677524A9C1@oracle.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      Here’s an updated version of the proposed changes.
      <div><br>
      </div>
      <div>Thanks,</div>
      <div><br>
      </div>
      <div>Brian<br>
        <div><br>
        </div>
        <div>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier;">---
a/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageMetadata.java</div>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier;">+++
b/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageMetadata.java</div>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier;">@@ -87,7 +87,7 @@</div>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier;">         rootIFD.initialize(stream, true,
            ignoreUnknownFields);</div>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier;">     }</div>
          <p style="margin: 0px; font-size: 11px; font-family: Courier;
            min-height: 13px;"> <br class="webkit-block-placeholder">
          </p>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier;">-    public void addShortOrLongField(int
            tagNumber, int value) {</div>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier;">+    public void addShortOrLongField(int
            tagNumber, long value) {</div>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier;">         TIFFField field = new
            TIFFField(rootIFD.getTag(tagNumber), value);</div>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier;">         rootIFD.addTIFFField(field);</div>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier;">     }</div>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier; min-height: 13px;"><br>
          </div>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier;">---
a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java</div>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier;">+++
b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java</div>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier;">@@ -672,7 +672,7 @@</div>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier;">      * for the supplied {@code TIFFTag}.</div>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier;">      * @throws IllegalArgumentException if {@code
            value &lt; 0}.</div>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier;">      */</div>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier;">-    public TIFFField(TIFFTag tag, int value) {</div>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier;">+    public TIFFField(TIFFTag tag, long value) {</div>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier;">         if(tag == null) {</div>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier;">             throw new NullPointerException("tag
            == null!");</div>
          <div style="margin: 0px; font-size: 11px; font-family:
            Courier;">         }</div>
          <div><br>
          </div>
          <div>
            <div>On Nov 16, 2016, at 8:20 AM, Brian Burkhalter &lt;<a
                moz-do-not-send="true"
                href="mailto:brian.burkhalter@oracle.com">brian.burkhalter@oracle.com</a>&gt;
              wrote:</div>
            <br class="Apple-interchange-newline">
            <blockquote type="cite"><span style="font-family: Helvetica;
                font-size: 12px; font-style: normal; font-variant:
                normal; font-weight: normal; letter-spacing: normal;
                line-height: normal; orphans: auto; text-align: start;
                text-indent: 0px; text-transform: none; white-space:
                normal; widows: auto; word-spacing: 0px;
                -webkit-text-stroke-width: 0px; float: none; display:
                inline !important;">Thanks for investigating this. I
                agree that TIFFImageMetadata.addShortOrLongField()
                should similarly be changed.</span></blockquote>
          </div>
        </div>
      </div>
    </blockquote>
  </body>
</html>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic