Bug #139

Identify command

Added by Han Alink over 5 years ago. Updated over 5 years ago.

Status:Closed Start date:10/18/2012
Priority:Urgent Due date:
Assignee:Stefano Lenzi % Done:

0%

Category:zigbee.tester Spent time: -
Target version:org.aaloa.zb4osgi.zigbee.tester-0.4.0
Has a patch:No Has license agreement signed:No

Description

The "Identify" Command (still) throws a nullpointer exception when the field is left empty.


Related issues

related to Improvement #146: Creating specialized input field for definig command para... New 10/22/2012
blocks Bug #134: addGroupIfIdentifying Command Closed 10/18/2012

Associated revisions

Revision 526
Added by Stefano Lenzi over 5 years ago

Better exception handling when issuing a command on the network ( refs #139 )

Revision 528
Added by Stefano Lenzi over 5 years ago

Fixes big issue introduced with r526: unable to set any numeric field to any value ( refs #139 )

History

#1 Updated by Stefano Lenzi over 5 years ago

  • Status changed from New to In Progress
  • Assignee changed from Francesco Furfari to Stefano Lenzi
  • Priority changed from Normal to High
  • Target version set to org.aaloa.zb4osgi.zigbee.zcl.library-1.X

#2 Updated by Stefano Lenzi over 5 years ago

Can you post the exception?

#3 Updated by Han Alink over 5 years ago

java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.valueOf(Unknown Source)
at java.lang.Integer.decode(Unknown Source)
at org.persona.zigbee.tester.gui.Command.invoke(Command.java:60)
at org.persona.zigbee.tester.gui.CommandActionPanel$1.actionPerformed(CommandActionPanel.java:95)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)

#4 Updated by Stefano Lenzi over 5 years ago

  • Status changed from In Progress to Feedback
  • Priority changed from High to Low
  • Target version changed from org.aaloa.zb4osgi.zigbee.zcl.library-1.X to org.aaloa.zb4osgi.zigbee.tester-0.4.0

The exception is thrown as expected, it is not a issue on the code that create or send the command but on the parsing of the user, so it is "only" an User interface issue.
Nevertheless, I have modified the way the exception for such kind of issue is reported, in order to provide a better feedback to user.

The perfect solution would be a bit more complex (i.e.: build an table with numeric input for numeric data, true/false combo box for boolean, textbox for string, and so on).

Do you have a different proposal?
If you agree I will close this ticket and create a new improvement ticket for modifying the ZigBee Tester as described

#5 Updated by Han Alink over 5 years ago

I'm confused now; even a valid value now leads to an exception and shows the remark: No cluster sent on the, because I was not able to handle the parameter int with value '100'
Why not supply a default value of 0?

#6 Updated by Stefano Lenzi over 5 years ago

  • Status changed from Feedback to In Progress

It not supposed to send an exception in case of a valid value, can post the exception log? ( I would advise you to attach the Exception log all the time)

I believe that user should set the request properly, I don't think that a default value for Numeric data is a good option.

#7 Updated by Stefano Lenzi over 5 years ago

  • Status changed from In Progress to Feedback
  • Priority changed from Low to Urgent

Han Alink wrote:

I'm confused now; even a valid value now leads to an exception and shows the remark: No cluster sent on the, because I was not able to handle the parameter int with value '100'

I should have fixed the point above

Why not supply a default value of 0?

Please refer to my previous comment

#8 Updated by Han Alink over 5 years ago

Problem solved

#9 Updated by Stefano Lenzi over 5 years ago

  • Status changed from Feedback to Closed

Created #146 for improving the ZigBee Tester UI/UX

Also available in: Atom PDF