Issue #263 has been updated by Stefano Lenzi.

Yes we may decide to use the smallest Java size for storing the data, but 
considering that we are using Object (Integer, Short, and so on) it is easier 
to upcast everything to Integer (when it fits) or Long (when it is needed).
It will avoid casting issues and it would not wast so much memory, considering 
that Object requires 8 bytes for overhead of JVM plus the actual content for 
storing the data Byte = 1, Short = 2, Integer = 4, and Long = 8; but due to 
8-byte alignment all the above types require 16 bytes of momery (As far as I 
know)

See  
http://stackoverflow.com/questions/258120/what-is-the-memory-consumption-of-an-object-in-java

So if you agree we can close the issue.
 
----------------------------------------
Bug #263: Datatype 16-bit enumeration cannot be held in a Byte
http://zb4o.aaloa.org/redmine/issues/263#change-687

Author: Philipp  Buluschek
Status: Resolved
Priority: Normal
Assignee: Stefano Lenzi
Category: zigbee.zcl.library
Target version: org.aaloa.zb4osgi.zigbee.zcl.library-0.9.0
Has a patch: No
Has license agreement signed: No


In ZigBeeType.java

    Enumeration16bit(0x31, 2, false, Byte.class),

should be

    Enumeration16bit(0x31, 2, false, Integer.class),

as Byte cannot hold 16 bits.


-- 
DO NOT ANSWER TO THIS E-MAIL ADDRESS, NO ONE WILL READ IT. PLEASE WRITE TO 
[email protected]
ZigBee 4 OSGi - Redmine E-Mail Notificatioon
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://zb4o.aaloa.org/redmine
_______________________________________________
Dev mailing list
[email protected]
http://zb4osgi.aaloa.org/mailman/listinfo/dev

Reply via email to