Ticket #64 (closed defect: invalid)

Opened 2 years ago

Last modified 2 years ago

findGroupId/findGroupName bug in field container factory

Reported by: allenb Assigned to: allenb
Priority: minor Milestone: 2.0 Beta
Component: System Version: 2.0
Keywords: Cc:
Completion:

Description

I think I have found a bug in the group id and name code in the fcf. Since findGroupId returns 0 if not found, there is no way to know that this does not mean that the id is 0.

Also:

findGroupName(findGroupId("not there")) != "not there"

I marked this as a bug in the source.

Change History

(in reply to: ↑ description ; follow-up: ↓ 2 ) 10/14/06 06:48:54 changed by cneumann

Replying to allenb:

I think I have found a bug in the group id and name code in the fcf. Since findGroupId returns 0 if not found, there is no way to know that this does not mean that the id is 0.

Unless of course 0 is defined to be invalid as a group id. I don't know if that is the case though ;)

Also:

findGroupName(findGroupId("not there")) != "not there"

I marked this as a bug in the source.

Uhm, for a group name that is not registered with the system, findGroupId will return 0 and findGroupName(0) will most likely return NULL (assuming 0 can never be a valid group id).

I see no way findGroupName could return the name of a group that was never registered, which seems to be what you are asking for here. Maybe I'm misunderstanding something here, could you explain what behaviour you would have expected ?

(in reply to: ↑ 1 ) 10/22/06 09:24:09 changed by cneumann

Replying to cneumann:

Replying to allenb:

I think I have found a bug in the group id and name code in the fcf. Since findGroupId returns 0 if not found, there is no way to know that this does not mean that the id is 0.

Unless of course 0 is defined to be invalid as a group id. I don't know if that is the case though ;)

ContainerFactoryMixin<ParentT>::registerGroup will never return a group id of 0, if I read the code correctly. I think this ticket can be closed ?

Also:

findGroupName(findGroupId("not there")) != "not there"

I marked this as a bug in the source.

Uhm, for a group name that is not registered with the system, findGroupId will return 0 and findGroupName(0) will most likely return NULL (assuming 0 can never be a valid group id).

I see no way findGroupName could return the name of a group that was never registered, which seems to be what you are asking for here. Maybe I'm misunderstanding something here, could you explain what behaviour you would have expected ?

11/06/06 11:59:55 changed by allenb

  • owner changed from unassigned to allenb.
  • status changed from new to assigned.
  • estimated_completion changed.

11/06/06 12:00:03 changed by allenb

  • status changed from assigned to closed.
  • resolution set to invalid.