flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mschma...@apache.org
Subject git commit: [flex-falcon] [refs/heads/develop] - Removed/Fixed all warnings in falcon compiler projects (18).
Date Tue, 26 May 2015 21:53:12 GMT
Repository: flex-falcon
Updated Branches:
  refs/heads/develop 1208609d9 -> bcf9d27ff


Removed/Fixed all warnings in falcon compiler projects (18).


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

Branch: refs/heads/develop
Commit: bcf9d27ff2d941a6e8305374133ddb9e29537f72
Parents: 1208609
Author: Michael Schmalle <mschmalle@apache.org>
Authored: Tue May 26 17:52:36 2015 -0400
Committer: Michael Schmalle <mschmalle@apache.org>
Committed: Tue May 26 17:52:36 2015 -0400

----------------------------------------------------------------------
 .../codegen/js/flexjs/TestFlexJSAccessorMembers.java  |  2 --
 .../apache/flex/compiler/clients/VF2JSToolGroup.java  |  1 -
 .../internal/codegen/js/flexjs/JSFlexJSEmitter.java   |  5 +++--
 .../internal/codegen/js/goog/JSGoogPublisher.java     |  8 ++++++--
 .../codegen/mxml/flexjs/MXMLFlexJSPublisher.java      | 14 +++++++-------
 .../internal/parsing/as/FlexJSASDocDelegate.java      |  3 ++-
 .../org/apache/flex/compiler/utils/ASNodeUtils.java   |  1 -
 .../compiler/utils/VF2JSClosureCompilerWrapper.java   |  1 -
 .../internal/codegen/databinding/WatcherAnalyzer.java |  1 -
 .../internal/parsing/mxml/MXMLScopeBuilder.java       | 10 ++++------
 .../compiler/internal/tree/mxml/MXMLInstanceNode.java | 13 ++++++++++---
 11 files changed, 32 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bcf9d27f/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
index 4d31db8..d1d35a5 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSAccessorMembers.java
@@ -23,8 +23,6 @@ import org.apache.flex.compiler.driver.IBackend;
 import org.apache.flex.compiler.internal.codegen.js.goog.TestGoogAccessorMembers;
 import org.apache.flex.compiler.internal.driver.js.flexjs.FlexJSBackend;
 import org.apache.flex.compiler.tree.as.IClassNode;
-import org.apache.flex.compiler.tree.as.IGetterNode;
-import org.apache.flex.compiler.tree.as.ISetterNode;
 import org.junit.Test;
 
 /**

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bcf9d27f/compiler.jx/src/org/apache/flex/compiler/clients/VF2JSToolGroup.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/clients/VF2JSToolGroup.java b/compiler.jx/src/org/apache/flex/compiler/clients/VF2JSToolGroup.java
index 3c72962..07cb796 100644
--- a/compiler.jx/src/org/apache/flex/compiler/clients/VF2JSToolGroup.java
+++ b/compiler.jx/src/org/apache/flex/compiler/clients/VF2JSToolGroup.java
@@ -19,7 +19,6 @@
 
 package org.apache.flex.compiler.clients;
 
-import org.apache.flex.compiler.internal.driver.mxml.vf2js.MXMLVF2JSBackend;
 import org.apache.flex.tools.AbstractFlexToolGroup;
 
 /**

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bcf9d27f/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
index d709929..ff44ab3 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
@@ -969,7 +969,8 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
     }
 
     //--------------------------------------------------------------------------
-    @Override
+    
+	@Override
     protected void emitSuperCall(IASNode node, String type)
     {
         IFunctionNode fnode = (node instanceof IFunctionNode) ? (IFunctionNode) node
@@ -1028,7 +1029,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
 		
 		            writeArguments = (anodes != null && anodes.length > 0);
 		        }
-		        else if (fnode == null && node instanceof BinaryOperatorAssignmentNode)
+		        else if (node instanceof IFunctionNode && node instanceof BinaryOperatorAssignmentNode)
 		        {
 		            BinaryOperatorAssignmentNode bnode = (BinaryOperatorAssignmentNode) node;
 		            

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bcf9d27f/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
index a37974e..bceda53 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
@@ -266,8 +266,10 @@ public class JSGoogPublisher extends JSPublisher implements IJSPublisher
     }
 
 
-    protected void dumpJar(File jarFile, File outputDir) throws IOException {
-        JarFile jar = new JarFile(jarFile);
+    protected void dumpJar(File jarFile, File outputDir) throws IOException {       
+        // TODO (mschmalle) for some reason ide thinks this has not been closed
+        @SuppressWarnings("resource")
+		JarFile jar = new JarFile(jarFile);
 
         for (Enumeration<JarEntry> jarEntries = jar.entries(); jarEntries.hasMoreElements();)
{
             JarEntry jarEntry = jarEntries.nextElement();
@@ -292,6 +294,8 @@ public class JSGoogPublisher extends JSPublisher implements IJSPublisher
                 is.close();
             }
         }
+        
+        jar.close();
     }
 
     public class JSGoogErrorManager implements ErrorManager

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bcf9d27f/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
index af11b15..5b1e436 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
@@ -26,11 +26,8 @@ import java.io.InputStreamReader;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.Comparator;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Scanner;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.FilenameUtils;
@@ -136,8 +133,9 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
     @Override
     public boolean publish(ProblemQuery problems) throws IOException
     {
-        boolean ok;
-        boolean subsetGoog = true;
+        @SuppressWarnings("unused")
+		boolean ok;
+        //boolean subsetGoog = true;
         
         final String intermediateDirPath = outputFolder.getPath();
         final File intermediateDir = new File(intermediateDirPath);
@@ -208,7 +206,8 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
         }
 
         // Dump FlexJS to the target directory.
-        String flexJsLibDirPath;
+        @SuppressWarnings("unused")
+		String flexJsLibDirPath;
         // Check if the "FlexJS/src/createjs_externals.js" is available in the classpath.
         URL resource = Thread.currentThread().getContextClassLoader().getResource("FlexJS/src/createjs_externals.js");
         if(resource != null) {
@@ -247,7 +246,8 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
                 + "/library/closure/goog";
         //final String depsSrcFilePath = intermediateDirPath
         //        + "/library/closure/goog/deps.js";
-        final String depsTgtFilePath = intermediateDirPath + "/deps.js";
+        @SuppressWarnings("unused")
+		final String depsTgtFilePath = intermediateDirPath + "/deps.js";
         final String projectIntermediateJSFilePath = intermediateDirPath
                 + File.separator + outputFileName;
         final String projectReleaseJSFilePath = releaseDirPath

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bcf9d27f/compiler.jx/src/org/apache/flex/compiler/internal/parsing/as/FlexJSASDocDelegate.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/parsing/as/FlexJSASDocDelegate.java
b/compiler.jx/src/org/apache/flex/compiler/internal/parsing/as/FlexJSASDocDelegate.java
index 58185f6..868e5d7 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/parsing/as/FlexJSASDocDelegate.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/parsing/as/FlexJSASDocDelegate.java
@@ -75,7 +75,8 @@ public final class FlexJSASDocDelegate implements IASDocDelegate
 
     private static final class ASDelegate implements IASParserASDocDelegate
     {
-        static final ASDelegate INSTANCE = new ASDelegate();
+        @SuppressWarnings("unused")
+		static final ASDelegate INSTANCE = new ASDelegate();
 
         @Override
         public void beforeVariable()

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bcf9d27f/compiler.jx/src/org/apache/flex/compiler/utils/ASNodeUtils.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/utils/ASNodeUtils.java b/compiler.jx/src/org/apache/flex/compiler/utils/ASNodeUtils.java
index eb46626..b7c524e 100644
--- a/compiler.jx/src/org/apache/flex/compiler/utils/ASNodeUtils.java
+++ b/compiler.jx/src/org/apache/flex/compiler/utils/ASNodeUtils.java
@@ -23,7 +23,6 @@ import java.util.ArrayList;
 
 import org.apache.flex.compiler.tree.ASTNodeID;
 import org.apache.flex.compiler.tree.as.IASNode;
-import org.apache.flex.compiler.tree.as.IBinaryOperatorNode;
 import org.apache.flex.compiler.tree.as.IBlockNode;
 import org.apache.flex.compiler.tree.as.IConditionalNode;
 import org.apache.flex.compiler.tree.as.IExpressionNode;

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bcf9d27f/compiler.jx/src/org/apache/flex/compiler/utils/VF2JSClosureCompilerWrapper.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/utils/VF2JSClosureCompilerWrapper.java
b/compiler.jx/src/org/apache/flex/compiler/utils/VF2JSClosureCompilerWrapper.java
index 9b188b9..9e66b9c 100644
--- a/compiler.jx/src/org/apache/flex/compiler/utils/VF2JSClosureCompilerWrapper.java
+++ b/compiler.jx/src/org/apache/flex/compiler/utils/VF2JSClosureCompilerWrapper.java
@@ -31,7 +31,6 @@ import com.google.javascript.jscomp.CommandLineRunner;
 import com.google.javascript.jscomp.CompilationLevel;
 import com.google.javascript.jscomp.Compiler;
 import com.google.javascript.jscomp.CompilerOptions;
-import com.google.javascript.jscomp.CompilerOptions.LanguageMode;
 import com.google.javascript.jscomp.DiagnosticGroups;
 import com.google.javascript.jscomp.SourceFile;
 import com.google.javascript.jscomp.SourceMap;

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bcf9d27f/compiler/src/org/apache/flex/compiler/internal/codegen/databinding/WatcherAnalyzer.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/codegen/databinding/WatcherAnalyzer.java
b/compiler/src/org/apache/flex/compiler/internal/codegen/databinding/WatcherAnalyzer.java
index 35471f2..8dcdf8e 100644
--- a/compiler/src/org/apache/flex/compiler/internal/codegen/databinding/WatcherAnalyzer.java
+++ b/compiler/src/org/apache/flex/compiler/internal/codegen/databinding/WatcherAnalyzer.java
@@ -24,7 +24,6 @@ import java.util.Collections;
 import java.util.List;
 
 import org.apache.flex.compiler.constants.IASKeywordConstants;
-import org.apache.flex.compiler.constants.IASLanguageConstants;
 import org.apache.flex.compiler.definitions.IClassDefinition;
 import org.apache.flex.compiler.definitions.IConstantDefinition;
 import org.apache.flex.compiler.definitions.IDefinition;

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bcf9d27f/compiler/src/org/apache/flex/compiler/internal/parsing/mxml/MXMLScopeBuilder.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/parsing/mxml/MXMLScopeBuilder.java
b/compiler/src/org/apache/flex/compiler/internal/parsing/mxml/MXMLScopeBuilder.java
index 1ed54dd..79e59c2 100644
--- a/compiler/src/org/apache/flex/compiler/internal/parsing/mxml/MXMLScopeBuilder.java
+++ b/compiler/src/org/apache/flex/compiler/internal/parsing/mxml/MXMLScopeBuilder.java
@@ -19,6 +19,8 @@
 
 package org.apache.flex.compiler.internal.parsing.mxml;
 
+import static org.apache.flex.compiler.mxml.IMXMLLanguageConstants.ATTRIBUTE_NAME;
+
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.Reader;
@@ -29,7 +31,6 @@ import java.util.LinkedList;
 import java.util.List;
 
 import org.apache.commons.io.IOUtils;
-
 import org.apache.flex.compiler.common.IFileSpecificationGetter;
 import org.apache.flex.compiler.common.Multiname;
 import org.apache.flex.compiler.definitions.IDefinition;
@@ -57,13 +58,12 @@ import org.apache.flex.compiler.internal.tree.mxml.MXMLNodeBase;
 import org.apache.flex.compiler.internal.units.MXMLCompilationUnit;
 import org.apache.flex.compiler.internal.workspaces.Workspace;
 import org.apache.flex.compiler.mxml.IMXMLData;
-import org.apache.flex.compiler.mxml.IMXMLTagAttributeData;
 import org.apache.flex.compiler.mxml.IMXMLLanguageConstants;
+import org.apache.flex.compiler.mxml.IMXMLNamespaceAttributeData;
+import org.apache.flex.compiler.mxml.IMXMLTagAttributeData;
 import org.apache.flex.compiler.mxml.IMXMLTagData;
 import org.apache.flex.compiler.mxml.IMXMLTextData;
 import org.apache.flex.compiler.mxml.IMXMLTextData.TextType;
-import org.apache.flex.compiler.mxml.IMXMLTypeConstants;
-import org.apache.flex.compiler.mxml.IMXMLNamespaceAttributeData;
 import org.apache.flex.compiler.mxml.IMXMLUnitData;
 import org.apache.flex.compiler.problems.ICompilerProblem;
 import org.apache.flex.compiler.problems.MXMLLibraryTagNotTheFirstChildProblem;
@@ -72,8 +72,6 @@ import org.apache.flex.compiler.problems.MXMLUnresolvedTagProblem;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
 
-import static org.apache.flex.compiler.mxml.IMXMLLanguageConstants.*;
-
 /**
  * This class analyzes the tags and attributes of an MXML file, as represented
  * in an MXMLData object, and builds an ASFileScope which is the

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bcf9d27f/compiler/src/org/apache/flex/compiler/internal/tree/mxml/MXMLInstanceNode.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/tree/mxml/MXMLInstanceNode.java
b/compiler/src/org/apache/flex/compiler/internal/tree/mxml/MXMLInstanceNode.java
index 203fdad..4d5072b 100644
--- a/compiler/src/org/apache/flex/compiler/internal/tree/mxml/MXMLInstanceNode.java
+++ b/compiler/src/org/apache/flex/compiler/internal/tree/mxml/MXMLInstanceNode.java
@@ -19,6 +19,16 @@
 
 package org.apache.flex.compiler.internal.tree.mxml;
 
+import static org.apache.flex.compiler.mxml.IMXMLLanguageConstants.ATTRIBUTE_EXCLUDE_FROM;
+import static org.apache.flex.compiler.mxml.IMXMLLanguageConstants.ATTRIBUTE_ID;
+import static org.apache.flex.compiler.mxml.IMXMLLanguageConstants.ATTRIBUTE_INCLUDE_IN;
+import static org.apache.flex.compiler.mxml.IMXMLLanguageConstants.ATTRIBUTE_ITEM_CREATION_POLICY;
+import static org.apache.flex.compiler.mxml.IMXMLLanguageConstants.ATTRIBUTE_ITEM_DESTRUCTION_POLICY;
+import static org.apache.flex.compiler.mxml.IMXMLLanguageConstants.ITEM_CREATION_POLICY_DEFERRED;
+import static org.apache.flex.compiler.mxml.IMXMLLanguageConstants.ITEM_CREATION_POLICY_IMMEDIATE;
+import static org.apache.flex.compiler.mxml.IMXMLLanguageConstants.ITEM_DESTRUCTION_POLICY_AUTO;
+import static org.apache.flex.compiler.mxml.IMXMLLanguageConstants.ITEM_DESTRUCTION_POLICY_NEVER;
+
 import org.apache.flex.compiler.common.DependencyType;
 import org.apache.flex.compiler.constants.IASLanguageConstants;
 import org.apache.flex.compiler.definitions.IClassDefinition;
@@ -30,7 +40,6 @@ import org.apache.flex.compiler.internal.scopes.ASScope;
 import org.apache.flex.compiler.internal.tree.as.NodeBase;
 import org.apache.flex.compiler.mxml.IMXMLTagAttributeData;
 import org.apache.flex.compiler.mxml.IMXMLTagData;
-import org.apache.flex.compiler.mxml.IMXMLTypeConstants;
 import org.apache.flex.compiler.problems.ICompilerProblem;
 import org.apache.flex.compiler.problems.MXMLAttributeVersionProblem;
 import org.apache.flex.compiler.problems.MXMLDuplicateIDProblem;
@@ -44,8 +53,6 @@ import org.apache.flex.compiler.tree.as.IASNode;
 import org.apache.flex.compiler.tree.mxml.IMXMLClassReferenceNode;
 import org.apache.flex.compiler.tree.mxml.IMXMLInstanceNode;
 
-import static org.apache.flex.compiler.mxml.IMXMLLanguageConstants.*;
-
 class MXMLInstanceNode extends MXMLClassReferenceNodeBase implements IMXMLInstanceNode
 {
     protected static MXMLInstanceNode createInstanceNode(MXMLTreeBuilder builder,


Mime
View raw message