[
https://issues.jboss.org/browse/FURNACE-21?page=com.atlassian.jira.plugin...
]
Ondrej Zizka edited comment on FURNACE-21 at 3/19/15 5:08 PM:
--------------------------------------------------------------
Test case:
{code}
git clone git@github.com:OndraZizka/windup.git windup-FURNACE-21
cd windup-FURNACE-21
git checkout FURNACE-21-demo # tag
mvn install -DskipTests
#exec/tests/src/test/java/org/jboss/windup/test/exec/TagsIncludeExcludeTest.java
cd exec/
# Then test TagsIncludeExcludeTest.java.
{code}
The issue is the ".addPackages(true, RuleProviderFilter.class.getPackage())"
line in getDeployment().
This testcase also demonstrates how InvocationException is not being caught by
catch(Exception ex), not sure why; and therefore (?) Furnace doesn't include it's
cause.
was (Author: ozizka):
Test case:
{code}
git clone git@github.com:OndraZizka/windup.git windup-FURNACE-21
cd windup-FURNACE-21
git co FURNACE-21-demo # tag
mvn install -DskipTests
#exec/tests/src/test/java/org/jboss/windup/test/exec/TagsIncludeExcludeTest.java
cd exec/
# Then test TagsIncludeExcludeTest.java.
{code}
The issue is the ".addPackages(true, RuleProviderFilter.class.getPackage())"
line in getDeployment().
This testcase also demonstrates how InvocationException is not being caught by
catch(Exception ex), not sure why; and therefore (?) Furnace doesn't include it's
cause.
Forge Tests: WARN if _DEFAULT_ addon contains duplicate classes which
are in dependencies, or duplicated classes in dependencies.
---------------------------------------------------------------------------------------------------------------------------------
Key: FURNACE-21
URL:
https://issues.jboss.org/browse/FURNACE-21
Project: Forge: Furnace
Issue Type: Enhancement
Components: Runtime, Test Harness
Reporter: Ondrej Zizka
Assignee: George Gastaldi
If the _DEFAULT_ addon (created by ForgeArchive getDeployment()) contains classes which
duplicate those in dependencies (which is very easy to achieve), then various negative
side effect may occur - e.g. querying for an @Annotation, or querying a Map with classes
as keys, etc etc.
Typically solving these errors is hard work.
Forge, resp. Furnace, should WARN about duplicated classes. Maybe optionally if that
would mean scanning all addons (but I assume that is being done anyway).
In other words:
1) Scan whole _DEFAULT_ addon and for each class, try loading that class by FQCN from
each dependency. If found, then WARN about it.
2) Scan all dependency addons and warn if duplicated FQCN is found.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)