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 2018/06/05 16:42:12 UTC
[royale-compiler] 02/03: fix null checks when testing
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit c693c78315920a16e9af4ea9855c3b2f0e540643
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Jun 5 09:21:04 2018 -0700
fix null checks when testing
---
.../org/apache/royale/compiler/internal/css/CSSManager.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/css/CSSManager.java b/compiler/src/main/java/org/apache/royale/compiler/internal/css/CSSManager.java
index 9afe294..92524d5 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/css/CSSManager.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/css/CSSManager.java
@@ -46,6 +46,7 @@ import org.apache.royale.compiler.internal.scopes.ASProjectScope;
import org.apache.royale.compiler.internal.units.EmbedCompilationUnit;
import org.apache.royale.compiler.problems.CSSUnresolvedClassReferenceProblem;
import org.apache.royale.compiler.problems.ICompilerProblem;
+import org.apache.royale.compiler.targets.ITargetSettings;
import org.apache.royale.compiler.units.ICompilationUnit;
import org.apache.royale.swc.ISWC;
import org.apache.royale.swc.ISWCFileEntry;
@@ -182,9 +183,10 @@ public class CSSManager implements ICSSManager
final ISWCManager swcManager = royaleProject.getWorkspace().getSWCManager();
final CSSDocumentCache cache = (CSSDocumentCache)swcManager.getCSSDocumentCache();
final ISWC swc = swcManager.get(swcFile);
- List<String> excludedCSSFiles = royaleProject.getTargetSettings().getExcludeDefaultsCSSFiles();
+ ITargetSettings ts = royaleProject.getTargetSettings();
+ List<String> excludedCSSFiles = (ts != null) ? ts.getExcludeDefaultsCSSFiles() : null;
String defaultsCSS = swcFile.getName() + ":" + "defaults.css";
- if (excludedCSSFiles.contains(defaultsCSS))
+ if (excludedCSSFiles != null && excludedCSSFiles.contains(defaultsCSS))
return null;
return cache.getDefaultsCSS(swc, royaleProject.getCompatibilityVersion());
}
@@ -239,10 +241,11 @@ public class CSSManager implements ICSSManager
final ImmutableList.Builder<ICSSDocument> builder = new ImmutableList.Builder<ICSSDocument>();
final ISWCManager swcManager = royaleProject.getWorkspace().getSWCManager();
final CSSDocumentCache cssCache = (CSSDocumentCache)swcManager.getCSSDocumentCache();
- List<String> excludedCSSFiles = royaleProject.getTargetSettings().getExcludeDefaultsCSSFiles();
+ ITargetSettings ts = royaleProject.getTargetSettings();
+ List<String> excludedCSSFiles = (ts != null) ? ts.getExcludeDefaultsCSSFiles() : null;
for (final IFileSpecification themeFile : royaleProject.getThemeFiles())
{
- if (excludedCSSFiles.contains(themeFile.getPath()))
+ if (excludedCSSFiles != null && excludedCSSFiles.contains(themeFile.getPath()))
continue;
try
{
--
To stop receiving notification emails like this one, please contact
aharui@apache.org.