You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2019/06/07 06:35:26 UTC

[royale-compiler] branch release_practice updated: didn't see that there was another hash added

This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch release_practice
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git


The following commit(s) were added to refs/heads/release_practice by this push:
     new 970df1e  didn't see that there was another hash added
970df1e is described below

commit 970df1e7e6a92f4d498772c2dcd43b72f7833b26
Author: Alex Harui <ah...@apache.org>
AuthorDate: Thu Jun 6 23:35:11 2019 -0700

    didn't see that there was another hash added
---
 .../org/apache/royale/compiler/internal/embedding/EmbedData.java     | 5 ++++-
 .../compiler/internal/embedding/transcoders/TranscoderBase.java      | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/embedding/EmbedData.java b/compiler/src/main/java/org/apache/royale/compiler/internal/embedding/EmbedData.java
index c5b7c55..52bf30c 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/embedding/EmbedData.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/embedding/EmbedData.java
@@ -535,7 +535,10 @@ public class EmbedData implements IEmbedData
         String filename = FilenameUtils.getName(source);
         filename = filename.replace(".", "_");
         String qname = filename + "$" + StringEncoder.stringToMD5String(uniqueName);
-
+        transcoder.hashCodeSourceName = uniqueName;
+        System.out.println("Embed UniqueName: " + uniqueName);
+        System.out.println("Embed QName: " + qname);
+        
         // add the transcoder hashCode to the end of the QName to ensure
         // two embed data's with the same source, but different attributes
         // don't clash
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/embedding/transcoders/TranscoderBase.java b/compiler/src/main/java/org/apache/royale/compiler/internal/embedding/transcoders/TranscoderBase.java
index caf7a81..60fa370 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/embedding/transcoders/TranscoderBase.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/embedding/transcoders/TranscoderBase.java
@@ -79,6 +79,7 @@ public abstract class TranscoderBase implements ITranscoder
     protected String baseClassQName;
     protected String source;
     private EmbedMIMEType mimeType;
+    public String hashCodeSourceName;
 
     /**
      * Transcode the embedded asset
@@ -354,7 +355,7 @@ public abstract class TranscoderBase implements ITranscoder
     public int hashCode()
     {
         int hashCode = 0;
-        hashCode = source.hashCode();
+        hashCode = hashCodeSourceName.hashCode();
         hashCode ^= baseClassQName.hashCode();
         hashCode ^= mimeType.toString().hashCode(); // the toString() gives us a reproducible hash code