From 68666ccb93872da6c26348960978552717423240 Mon Sep 17 00:00:00 2001
From: gmantele <gmantele@ari.uni-heidelberg.de>
Date: Fri, 9 Sep 2016 19:15:09 +0200
Subject: [PATCH] [TAP] Follow up of the previous commit with BOOLEAN
 datatypes: c5cba4ba50fe3d749d29394ba4328e9dbc8a6f32. The cast into a Short
 object is absolutely required for the FITS format.

---
 src/tap/data/ResultSetTableIterator.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tap/data/ResultSetTableIterator.java b/src/tap/data/ResultSetTableIterator.java
index 8b7202d..938e5ac 100644
--- a/src/tap/data/ResultSetTableIterator.java
+++ b/src/tap/data/ResultSetTableIterator.java
@@ -708,7 +708,7 @@ public class ResultSetTableIterator implements TableIterator {
 				colValue = ISO8601Format.format(((Timestamp)colValue).getTime());
 			// if the column value is a Boolean object, format it as a SMALLINT:
 			else if (colValue instanceof Boolean)
-				colValue = ((Boolean)colValue) ? 1 : 0;
+				colValue = ((Boolean)colValue) ? (short)1 : (short)0;
 			// if the column should be only a character:
 			else if (colType != null && colValue != null && colType.type == DBDatatype.CHAR && (colType.length == 1 || colType.length <= 0) && colValue instanceof String)
 				colValue = ((String)colValue).charAt(0);
-- 
GitLab