tmf: Correctly use null values for empty stacks
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Sun, 19 Aug 2012 00:03:56 +0000 (20:03 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Tue, 21 Aug 2012 15:29:07 +0000 (11:29 -0400)
commite2eac108978b550524c47d7a526cf5e79f2be66f
tree3de9e432e8d6755943fdb559e87a2edeeab542e5
parent4bff6e6ed7fcde05d6793853a07643ae8992ef1f
tmf: Correctly use null values for empty stacks

When removing the last element of a stack attribute, the
popAttribute() method would leave the stack-attribute (which
represents the depth of the stack) with a state value of 0.

We expect a null value for empty stacks, and the integer
representation of a null value is -1. This would make it
impossible to re-use an attribute stack after it was completely
emptied once.

This patch fixes this by correctly assigning a null value when
emptying a stack.

Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Change-Id: If2d4edc8a0bee55f007a4dcbffefe44f513f567d
Reviewed-on: https://git.eclipse.org/r/7288
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
IP-Clean: Patrick Tasse <patrick.tasse@gmail.com>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/StateSystem.java
This page took 0.027391 seconds and 5 git commands to generate.