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:54:56 UTC
[royale-compiler] branch release_practice updated: need to set
hashcode sooner
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 b4deb22 need to set hashcode sooner
b4deb22 is described below
commit b4deb222208eb93003a574a34697781351ebcfab
Author: Alex Harui <ah...@apache.org>
AuthorDate: Thu Jun 6 23:54:46 2019 -0700
need to set hashcode sooner
---
.../royale/compiler/internal/embedding/EmbedData.java | 14 ++++++++++++++
1 file changed, 14 insertions(+)
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 52bf30c..d7c206b 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
@@ -407,6 +407,18 @@ public class EmbedData implements IEmbedData
problems.add(new EmbedNoSourceAttributeProblem(location));
return false;
}
+ String uniqueName = source;
+ List<File> sourcePaths = ((IASProject)project).getSourcePath();
+ for (File sourcePath : sourcePaths)
+ {
+ String sourcePathString = sourcePath.getAbsolutePath();
+ if (source.startsWith(sourcePathString))
+ {
+ uniqueName = source.substring(sourcePathString.length());
+ uniqueName = uniqueName.replace("\\", "/");
+ break;
+ }
+ }
// also check that we have a mimetype set, as don't know what transcoder
// to create without it!
@@ -490,6 +502,8 @@ public class EmbedData implements IEmbedData
if (transcoder == null)
return false;
+ transcoder.hashCodeSourceName = uniqueName;
+
// there were problems with the transcoder because of attribute settings
// so don't return it, and let the user deal with the errors
if (!transcoder.analyze(location, problems))