Task #284

Unnecessary use of array

Added by Philipp Buluschek over 3 years ago. Updated over 3 years ago.

Status:Closed Start date:12/03/2014
Priority:Lowest Due date:
Assignee:Stefano Lenzi % Done:


Category:zigbee.zcl.library Spent time: -
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...

Associated revisions

Revision 1114
Added by Stefano Lenzi over 3 years ago

Removed unsed array ( fixes #284 )


#1 Updated by Stefano Lenzi over 3 years ago

  • Category set to zigbee.zcl.library
  • Status changed from New to In Progress
  • Assignee set to Stefano Lenzi
  • Target version set to org.aaloa.zb4osgi.zigbee.zcl.library-0.9.0

#2 Updated by Stefano Lenzi over 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

Applied in changeset r1114.

#3 Updated by Philipp Buluschek over 3 years ago

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.

public Object readZigBeeType(ZigBeeType type) {
  Object value;
    case Boolean:
      value = readBoolean();

Also available in: Atom PDF