[zb4osgi Dev] [ZB4O - Task #284] Unnecessary use of array

redmine at zb4osgi.aaloa.org redmine at zb4osgi.aaloa.org
Thu Dec 4 14:21:42 CET 2014


Issue #284 has been updated by Philipp  Buluschek.


Sorry if I'm picky. The Object should not be initialized to null. 
So the compiler will assure that in all cases you have assigned a value (or thrown an exception), and nothing got forgotten.

<pre>
public Object readZigBeeType(ZigBeeType type) {
  Object value;
  switch(type){
    case Boolean:
      value = readBoolean();
  ...
</pre>
----------------------------------------
Task #284: Unnecessary use of array 
http://zb4o.aaloa.org/redmine/issues/284#change-739

Author: Philipp  Buluschek
Status: Closed
Priority: Lowest
Assignee: Stefano Lenzi
Category: zigbee.zcl.library
Target version: org.aaloa.zb4osgi.zigbee.zcl.library-0.9.0


In @it.cnr.isti.zigbee.zcl.library.impl.core.DefaultDeserializer.readZigBeeType(ZigBeeType)@ the deserialized value is put into an array although a plain @Object@ would do as well...


-- 
DO NOT ANSWER TO THIS E-MAIL ADDRESS, NO ONE WILL READ IT. PLEASE WRITE TO dev at zb4osgi.aaloa.org
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://zb4osgi.aaloa.org/pipermail/dev/attachments/20141204/b2d0c6bf/attachment.html>


More information about the Dev mailing list