Skip to content

Commit

Permalink
ttools: avoid taplint E-MDQ-CTYP error report for BOOLEAN!=boolean
Browse files Browse the repository at this point in the history
This behaviour may technically be an error since BOOLEAN TAPType doesn't
exist, but it's better reported elsewhere (if at all).
  • Loading branch information
mbtaylor committed Apr 2, 2014
1 parent adea5c2 commit 5a638f7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ttools/src/docs/sun256.xml
Expand Up @@ -8541,6 +8541,8 @@ eds. C. Gabriel et al., ASP Conf. Ser. 351, p. 666 (2006)
<li>Fixed some bugs related to TAP table uploads.
In particular these could cause incorrect table upload error
reports in <code>taplint</code>.</li>
<li>Avoid <code>taplint</code> MDQ stage data type mismatch error
report for BOOLEAN/boolean declared/returned data.</li>
</ul>
</p></dd>

Expand Down
Expand Up @@ -258,6 +258,16 @@ private static boolean compatibleDataTypesOneWay( String dt1, String dt2 ) {
dt1.equals( "INTEGER" ) ) && dt2.equals( "boolean" ) ) {
return true;
}

/* This one is a bit tricky. It is debatable whether TAPType of
* "BOOLEAN" is even legal (yes according to VODataService 3.5.3,
* but no according to TAP sec 2.5 - this item is raised in the
* TAP Implementation Notes IVOA Note, sec 2.2.6). But whether it
* is or not, it probably doesn't make sense to report the error
* here. */
if ( dt1.equals( "BOOLEAN" ) && dt2.equals( "boolean" ) ) {
return true;
}
return false;
}

Expand Down

0 comments on commit 5a638f7

Please sign in to comment.