FIX- FLEX-33421-Broken RequiresLicense metadata
Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/3e3c597c Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/3e3c597c Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/3e3c597c Branch: refs/heads/master Commit: 3e3c597c376dcf70f94c7acfa59e3167b7997fd1 Parents: d67e20c Author: mamsellem <maurice.amsel...@systar.com> Authored: Wed Mar 19 09:40:19 2014 +0100 Committer: mamsellem <maurice.amsel...@systar.com> Committed: Wed Mar 19 09:40:19 2014 +0100 ---------------------------------------------------------------------- .../src/java/flex2/compiler/CompilerAPI.java | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/3e3c597c/modules/compiler/src/java/flex2/compiler/CompilerAPI.java ---------------------------------------------------------------------- diff --git a/modules/compiler/src/java/flex2/compiler/CompilerAPI.java b/modules/compiler/src/java/flex2/compiler/CompilerAPI.java index 32b5a49..12fa77c 100644 --- a/modules/compiler/src/java/flex2/compiler/CompilerAPI.java +++ b/modules/compiler/src/java/flex2/compiler/CompilerAPI.java @@ -4312,7 +4312,8 @@ public final class CompilerAPI } } - // ToDo: For Apache Flex remove this section since there is no longer a license. + // Remove Adobe Flex SDK premium licence checking not needed in Apache Flex + if ((u.licensedClassReqs != null) && (u.licensedClassReqs.size() > 0)) { for (Iterator it = u.licensedClassReqs.entrySet().iterator(); it.hasNext();) @@ -4321,8 +4322,6 @@ public final class CompilerAPI String id = (String) e.getKey(); String handler = (String) e.getValue(); - if (!hasValidLicense(licenseMap, id)) - { MultiName mName = new MultiName(handler); QName qName = resolveMultiName(u.getSource().getNameForReporting(), mName, sources, sourceList, sourcePath, resources, swcContext, symbolTable); @@ -4341,13 +4340,7 @@ public final class CompilerAPI // no license, no handler, no SWF ThreadLocalToolkit.log(new UnableToResolveClass("RequiresLicense handler", handler)); } - } - else - { - // if there is a license and the license handler is unconditionally added, remove it. - configuration.getIncludes().remove(handler); - configuration.getExterns().add(handler); - } + } } @@ -4406,12 +4399,6 @@ public final class CompilerAPI } } - private static boolean hasValidLicense(Map licenseMap, String id) - { - // For Apache Flex there is no license. - return true; - } - private static void markDone(List<Source> sources, List<CompilationUnit> units) { markDone(sources, units, 0, units.size());