Opened 16 years ago

Closed 15 years ago

#1 closed defect (wontfix)

RasJ communication bug

Reported by: Andrei Aiordachioaie Owned by:
Priority: major Milestone:
Component: java Version: 8.0
Keywords: rasj Cc:
Complexity: Medium

Description

This ticket refers to the following RasQL query:
select max_cells(c.0) from rgb as c
If I send this query via command line (rasql utility), then the result is 255.
If I send this query via RasJ, then the result is -1.

Attached is the Java source that uses RasJ to send this query, and prints the result.

Attachments (1)

QueryExample.java (2.5 KB ) - added by Andrei Aiordachioaie 16 years ago.
RasJ use that displays the presented bug

Download all attachments as: .zip

Change History (2)

by Andrei Aiordachioaie, 16 years ago

Attachment: QueryExample.java added

RasJ use that displays the presented bug

comment:1 by cj, 15 years ago

Resolution: wontfix
Status: newclosed

there is no bug. The problem is that Java does not have a 8-bit unsigned data type. Byte is a signed 8 bit and hence 255 is represented as -1. What one should do is to transform bytes to char by adding 28 if the 27 bit is set. Tested and it works.

Note: See TracTickets for help on using tickets.