Combining filters like this:
<pattern name="concrete-class">
<exclude filter="interface"/>
<exclude filter="abstract-class"/>
</pattern>
as described in guide does not work.
The test case is attached (add Macker libraries in
order to run it).
The tests case has 3 types - Class1, Interface1,
AbstractClass1.
Each of the classes use java.io.IOException.
macker.xml declares a rule to deny access to java.io.**
classes.
Without filters Macker correctly reports rule violation
for all 3 types.
When using a filter <exclude filter="interface"/>
Macker correctly excludes interface and reports
violations only for 2 classes.
However, when using 2 filters in a row:
<pattern name="concrete">
<include class="net.palamarchuk.**"/>
<exclude filter="interface"/>
<exclude filter="abstract-class"/>
</pattern>
Macker does not report violation for the abstract class
but reports for the interface!
I use version 0.4.2.
I remember some time ago combining filters caused
Macker to go nuts and deny acces to all classes
including java.lang.Object :-) This simple test case
shows somewhat less impressive simptoms.
Andriy Palamarchuk
Test case