Original was provided by Tomek Grabiec, I just made it into a proper test-case/patch.
Signed-off-by: Vegard Nossum <vegard.nos...@gmail.com> --- Makefile | 1 + regression/jvm/InterfaceInheritanceTest.java | 29 ++++++++++++++++++++++++++ regression/run-suite.sh | 1 + 3 files changed, 31 insertions(+), 0 deletions(-) create mode 100644 regression/jvm/InterfaceInheritanceTest.java diff --git a/Makefile b/Makefile index 40598d4..e602e8d 100644 --- a/Makefile +++ b/Makefile @@ -232,6 +232,7 @@ REGRESSION_TEST_SUITE_CLASSES = \ regression/jvm/GetstaticPatchingTest.class \ regression/jvm/IntegerArithmeticExceptionsTest.class \ regression/jvm/IntegerArithmeticTest.class \ + regression/jvm/InterfaceInheritanceTest.class \ regression/jvm/InvokeinterfaceTest.class \ regression/jvm/InvokestaticPatchingTest.class \ regression/jvm/LoadConstantsTest.class \ diff --git a/regression/jvm/InterfaceInheritanceTest.java b/regression/jvm/InterfaceInheritanceTest.java new file mode 100644 index 0000000..ca3483a --- /dev/null +++ b/regression/jvm/InterfaceInheritanceTest.java @@ -0,0 +1,29 @@ +package jvm; + +/** + * @author Tomasz Grabiec + * @author Vegard Nossum + */ +public class InterfaceInheritanceTest extends TestCase { + private interface A { + void x(); + }; + + private interface B extends A { + }; + + private static B getNullB() { + return null; + } + + static public void main( String [] args ) { + B b = getNullB(); + + try { + b.x(); + fail(); + } catch (NullPointerException e) { + /* This should happen */ + } + } +} diff --git a/regression/run-suite.sh b/regression/run-suite.sh index 4af54ba..64a1978 100755 --- a/regression/run-suite.sh +++ b/regression/run-suite.sh @@ -61,6 +61,7 @@ if [ -z "$CLASS_LIST" ]; then run_java jvm.GetstaticPatchingTest 0 run_java jvm.IntegerArithmeticExceptionsTest 0 run_java jvm.IntegerArithmeticTest 0 + run_java jvm.InterfaceInheritanceTest 0 run_java jvm.InvokeinterfaceTest 0 run_java jvm.InvokestaticPatchingTest 0 run_java jvm.LoadConstantsTest 0 -- 1.6.0.4 ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel