[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-2d-dev
Subject: Re: [OpenJDK 2D-Dev] RFR 8149016: Misleading IllegalArgumentException message when a type that is ne
From: Phil Race <philip.race () oracle ! com>
Date: 2016-07-22 17:57:57
Message-ID: 57925EA5.9080306 () oracle ! com
[Download RAW message or body]
two cases of missing spaces between if and ( ..
else if(type < TIFFTag.MIN_DATATYPE || type > TIFFTag.MAX_DATATYPE) {
722 throw new IllegalArgumentException("Unknown data type "+type);
723 } else if(!tag.isDataTypeOK(type)) {
Fix before pushing. Otherwise fine.
-phil.
On 07/22/2016 10:50 AM, Brian Burkhalter wrote:
> Please review at your convenience.
>
> Issue:https://bugs.openjdk.java.net/browse/JDK-8149016
> Patch:http://cr.openjdk.java.net/~bpb/8149016/webrev.00/
> <http://cr.openjdk.java.net/%7Ebpb/8149016/webrev.00/>
>
> The problem is that the constructor
>
> TIFFField(TIFFTag tag, int type, long offset, TIFFDirectory dir) {}
>
> begins with an invocation of the constructor
>
> TIFFField(TIFFTag tag, int type, int count, Object data) {}
>
> which performs some checks not documented for the former constructor
> nor for that matter necessary. The fix is to change the former
> constructor to perform directly the actions for which it was
> previously relying on the latter constructor.
>
> As an aside, some " ” HTML entities were removed from “{@code}”
> tags wherein they are not interpreted during javadoc generation.
>
> Thanks,
>
> Brian
[Attachment #3 (text/html)]
<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">two cases of missing spaces between if
and ( ..<br>
<pre><span class="changed"> else if(type < TIFFTag.MIN_DATATYPE || type > \
TIFFTag.MAX_DATATYPE) {</span> <span class="changed"> 722 throw new \
IllegalArgumentException("Unknown data type "+type);</span> <span class="changed"> \
723 } else if(!tag.isDataTypeOK(type)) {</span></pre> <br>
Fix before pushing. Otherwise fine.<br>
<br>
-phil.<br>
<br>
On 07/22/2016 10:50 AM, Brian Burkhalter wrote:<br>
</div>
<blockquote
cite="mid:E4DAFF39-5C90-464E-BB54-B9FD5CA090C0@oracle.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
Please review at your convenience.
<div><br>
</div>
<div>Issue:<span class="Apple-tab-span" style="white-space:pre"> </span><a
moz-do-not-send="true"
href="https://bugs.openjdk.java.net/browse/JDK-8149016">https://bugs.openjdk.java.net/browse/JDK-8149016</a></div>
<div>Patch:<span class="Apple-tab-span" style="white-space:pre"> </span><a
moz-do-not-send="true"
href="http://cr.openjdk.java.net/%7Ebpb/8149016/webrev.00/">http://cr.openjdk.java.net/~bpb/8149016/webrev.00/</a></div>
<div><br>
</div>
<div>The problem is that the constructor</div>
<div><br>
</div>
<div>
<div style="margin: 0px; font-size: 11px; font-family: \
Menlo;">TIFFField(TIFFTag tag, <span style="color: #bb2ca2">int</span> type, <span
style="color: #bb2ca2">long</span> offset, TIFFDirectory
dir) {}</div>
</div>
<div><br>
</div>
<div>begins with an invocation of the constructor</div>
<div><br>
</div>
<div>
<div style="margin: 0px; font-size: 11px; font-family: \
Menlo;">TIFFField(TIFFTag tag, <span style="color: #bb2ca2">int</span> type, <span
style="color: #bb2ca2">int</span> count, Object data) {}</div>
</div>
<div><br>
</div>
<div>which performs some checks not documented for the former
constructor nor for that matter necessary. The fix is to change
the former constructor to perform directly the actions for which
it was previously relying on the latter constructor.</div>
<div><br>
</div>
<div>As an aside, some "&nbsp;” HTML entities were removed
from “{@code}” tags wherein they are not interpreted during
javadoc generation.</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Brian</div>
</blockquote>
<br>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic