EmbedData: Fixed error for duplicate class definitions when using Embed metadata even though there were no actual duplicates
Made the generation of the EmbedData's uniqueName (which is assigned to the the hashCodeSourceName) more consistent. The inconsistent hashCodeSourceName was causing the DuplicateClassDefinitionProblem to be reported intermittently.
The result of hashCode() was different between calling EmbedData's createTranscoder() method and calling its getQName() method. If the EmbedData was used as a key for the embedCompilationUnits in CompilerProject before getQName() was called, the hashCode() calculated for put() and the hashCode() calculated for get() would be different. The EmbedData wouldn't be found because of the HashMap's internal bucketing doesn't associate the EmbedData with its new hash, even though equals() would now return true. Then, put() would be called again, and the map would end up with two of the same key, so two separate compilation units for the exact same EmbedData.
Now, in both createTranscoder() and getQName(), the hashCodeSourceName is set to the same value by calling the same private getUniqueName(). The hashCode() is consistent, and there are no longer duplicate compilation units created for the same EmbedData.
Related commits: c97ab3ef32a49784e4cb07ca2630880c633f8c28, 970df1e7e6a92f4d498772c2dcd43b72f7833b26, and b4deb222208eb93003a574a34697781351ebcfab
2 files changed