I was normally using the DynamicComponents extension when suddenly I start to get the error "Expected a unique ID, got 'id_here'". So I had a look at the extension documentation and discovered that it was the Create function that was throwing this error, cause the code if (!COMPONENTS.containsKey(id)) {
was triggering the else conditional which was throwing the error. Then I searched for the containsKey() java function and discovered that it just verifies if the hash map contains the given key.
So if my code wasn't giving the same key, why was it happening? Then I tried to change my last ID variable from number to text just because I was out of ideas, but somehow it worked. Can someone please explain me it seems that different numbers are considered the same for the containsKey() function, but different letters don't?
Here are some prints for further understanding
Getting error using number variable at the end of the id. Ps: at the end of the for each looping, I changed the value of cnt variable to 5.
Working normally using text variable at the end of the id.