aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs153/pr125981/SampleTest.java
blob: 3712281ce125c6daf21224d77443bd38dc53bc26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
public class SampleTest {
    public interface ByteReadingStrategy {
        void readBytes(java.io.InputStream str);
    }

    public ByteReadingStrategy byteReadingStrategy;

    private final ByteReadingStrategy offsetBuf = new ByteReadingStrategy() {
        public void readBytes(java.io.InputStream str) {
            str.read();
        }
    };

   private class NamedByteReadingStrategy {
        public void readBytes(java.io.InputStream str) {
            str.read();
        }
    };

    public void foo(){}
}

aspect Soften {
    pointcut softenedTests() : 
        within(SampleTest+) && execution(* *(..)) && !execution(* *(..) throws Exception+);

    declare soft: Exception+: softenedTests();
}