Sop Pattern Test

Pattern Test that ensures that System.out and System.err are not used in the code. This is to prevent the usage of System.out.println("") calls (and variations).

Note: With AspectJ it is not possible to write a compile time check that only ensures that println() calls are not allowed. It is possible for runtime checks but we have preferred to make a compile-time test for simplicity. Thus, code that manipulate System.out and System.err for other purpose that using the println() methods will need to be added to the list of items to exclude from the tests, hence the abstract allowedCode pointcut.

Example of test violation:

public class SomeClass
{
    public void someMethod()
    {
        System.out.println("xxx"); <-- test violation
        System.err.println("xxx"); <-- test violation
    }
}