| 1 | // Check that NullPointerExceptions thrown from library code are
|
|---|
| 2 | // caught. This detects a number of failures that can be caused by
|
|---|
| 3 | // libgcj being built incorrectly. In particular, we ensure that a
|
|---|
| 4 | // SEGV in native (i.e. C++) code in libgcj is handled correctly.
|
|---|
| 5 |
|
|---|
| 6 | // Regrettably, we cannot guarantee that Double.parseDouble() will
|
|---|
| 7 | // always be native code, or that it will never be inlined. It could
|
|---|
| 8 | // be argued that we should add a method to libgcj that will be
|
|---|
| 9 | // guaranteed forever to be native, but I'm reluctant to add to the
|
|---|
| 10 | // library for the sole purpose of performing this test.
|
|---|
| 11 |
|
|---|
| 12 | public class Throw_2
|
|---|
| 13 | {
|
|---|
| 14 | public static Throwable obj()
|
|---|
| 15 | {
|
|---|
| 16 | return null;
|
|---|
| 17 | }
|
|---|
| 18 |
|
|---|
| 19 | public static String str()
|
|---|
| 20 | {
|
|---|
| 21 | return null;
|
|---|
|
|---|