Signed-off-by: Vegard Nossum <[email protected]>
---
...bjectCreationAndManipulationExceptionsTest.java | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/regression/jvm/ObjectCreationAndManipulationExceptionsTest.java
b/regression/jvm/ObjectCreationAndManipulationExceptionsTest.java
index b3125b3..cb6ec41 100644
--- a/regression/jvm/ObjectCreationAndManipulationExceptionsTest.java
+++ b/regression/jvm/ObjectCreationAndManipulationExceptionsTest.java
@@ -29,11 +29,17 @@ package jvm;
* @author Tomasz Grabiec
*/
public class ObjectCreationAndManipulationExceptionsTest extends TestCase {
- public int field;
+ private static class X {
+ public int field;
+ }
+
+ private static X getNullX() {
+ return null;
+ }
public static void testGetfieldThrowsNullPointerException() {
boolean caught = false;
- ObjectCreationAndManipulationExceptionsTest test = null;
+ X test = getNullX();
try {
takeInt(test.field);
@@ -46,7 +52,7 @@ public class ObjectCreationAndManipulationExceptionsTest
extends TestCase {
public static void testPutfieldThrowsNullPointerException() {
boolean caught = false;
- ObjectCreationAndManipulationExceptionsTest test = null;
+ X test = getNullX();
try {
test.field = 1;
--
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/jatovm-devel