You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jo...@apache.org on 2014/03/23 14:09:41 UTC

[07/17] git commit: [flex-falcon] [refs/heads/maven] - don't emit relativeTo unless non-null

don't emit relativeTo unless non-null


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/12f338c0
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/12f338c0
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/12f338c0

Branch: refs/heads/maven
Commit: 12f338c0499b8d8fca2374e28d6e27ddcc7fbea3
Parents: d2119c6
Author: Alex Harui <ah...@apache.org>
Authored: Fri Mar 21 08:18:05 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Mar 21 08:18:05 2014 -0700

----------------------------------------------------------------------
 .../codegen/mxml/flexjs/MXMLFlexJSEmitter.java       | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/12f338c0/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
index f868b33..cd66409 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
@@ -1226,12 +1226,15 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
         pos.value = ASEmitterTokens.SINGLE_QUOTE.getToken() + positionPropertyValue + ASEmitterTokens.SINGLE_QUOTE.getToken();
         addItems.propertySpecifiers.add(pos);
         
-        MXMLDescriptorSpecifier rel = new MXMLDescriptorSpecifier();
-        rel.isProperty = true;
-        rel.name = "relativeTo";
-        rel.parent = addItems;
-        rel.value = ASEmitterTokens.SINGLE_QUOTE.getToken() + relativeToPropertyValue + ASEmitterTokens.SINGLE_QUOTE.getToken();
-        addItems.propertySpecifiers.add(rel);
+        if (relativeToPropertyValue != null)
+        {
+            MXMLDescriptorSpecifier rel = new MXMLDescriptorSpecifier();
+            rel.isProperty = true;
+            rel.name = "relativeTo";
+            rel.parent = addItems;
+            rel.value = ASEmitterTokens.SINGLE_QUOTE.getToken() + relativeToPropertyValue + ASEmitterTokens.SINGLE_QUOTE.getToken();
+            addItems.propertySpecifiers.add(rel);
+        }
         
         inStatesOverride = false;
     }