Mathias, I was thinking that instead of your proposal I just add a more desciptive error message. The message would be based on the bitmask combination
Example: Rendering Problem: Tree2 renderer has encountered a node with an illogical state. (Node is supposedly expanded but is also a leaf.) What do you think? sean On 8/25/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi Sean, > > i noticed many recent posts on the user list regarding the inavlid bit mask > problem of tree2. > I fear that on cause of this might be the small commented code part in > TreeStateBase.isNodeExpanded(). > > This additional check cannot be done in the TreeState because it has no > knowledge about the tree structure. > Now, if the tree changes between requests (and the user does not provide an > own TreeModel that reflects changes to the stucture also on the state) the > expand/collapse data in TreeState might be wrong and a node is regarde as > expanded although it now might be a leaf. > > We could: > > #1 do additional checks in the component/renderer and maybe do not throw an > exception on this issue > #2 create addtional methods in TreeModel that delegate first to the methods > in TreeState and than do some additional checking. > > > Besides the whole thread safety issue mentioned on the user list causes me > some headache. I guess I should have posted it to the dev list. > > > Mathias >

