Opened 15 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)
Change History (2)
by , 15 years ago
Attachment: | QueryExample.java added |
---|
comment:1 by , 15 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
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.
RasJ use that displays the presented bug