Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding duplicate element by childList.add #510

Conversation

suresh-gangumalla
Copy link
Contributor

Adding an element that is already exists in childList through childList.add(Element) and childList.addAt(Element, childlist.length) Leads to throwing an error

It seems the #314 fix introduced this issue. This PR should resolve #311 and #509

`
With this fix the following scenarios are verified

 // Adding existing Element to childList through add()
childList.add(Element)

// Adding existing element to childList through addAt()
childList.addAt(Element, childList.length)

// Set existing element at end of chidList
childList.setAt(Element, childList.length)

// Set new Element at end of childList
childList.setAt(newElement, childList.length)
    // This statement should throw Error as new element can't be replaced at non existing index

// Set new Element at existing index location
childList.setAt(newElement, 0)`

Adding an element that is already exists in childList through
childList.add(Element) and childList.addAt(Element, childlist.length)
Leads to throwing an error

Signed-off-by: suresh-gangumalla <[email protected]>
Copy link
Contributor

@wouterlucas wouterlucas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@uguraslan uguraslan merged commit 8d80ad8 into rdkcentral:dev Oct 10, 2023
@uguraslan uguraslan mentioned this pull request Oct 11, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
3 participants