1 package org.apache.maven.surefire.report;
2
3 /*
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 */
21
22 import java.io.IOException;
23
24 final class StackTraceFocusedOnClass
25 {
26 static class JRE
27 {
28 void throwException()
29 throws IOException
30 {
31 throw new IOException( "I/O error" );
32 }
33 }
34
35 static abstract class A
36 {
37 abstract void abs()
38 throws IOException;
39
40 void a()
41 {
42 try
43 {
44 abs();
45 }
46 catch ( Exception e )
47 {
48 throw new IllegalStateException( e );
49 }
50 }
51 }
52
53 static class B extends A
54 {
55 private final JRE jre = new JRE();
56
57 void b()
58 {
59 try
60 {
61 a();
62 }
63 catch ( Exception e )
64 {
65 throw new RuntimeException( e );
66 }
67 }
68
69 @Override
70 void abs()
71 throws IOException
72 {
73 jre.throwException();
74 }
75 }
76
77 static class C
78 {
79 private final B b = new B();
80
81 void c()
82 {
83 b.b();
84 }
85 }
86 }