Signed-off-by: Vegard Nossum <[email protected]>
---
regression/jvm/ArrayExceptionsTest.java | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/regression/jvm/ArrayExceptionsTest.java
b/regression/jvm/ArrayExceptionsTest.java
index 022a8a0..3123b21 100644
--- a/regression/jvm/ArrayExceptionsTest.java
+++ b/regression/jvm/ArrayExceptionsTest.java
@@ -29,9 +29,13 @@ package jvm;
* @author Tomasz Grabiec
*/
public class ArrayExceptionsTest extends TestCase {
- public static void testArrayLoadThrowsNullPointerException() {
+ private static Object[] getNullObjectArray() {
+ return null;
+ }
+
+ public static void testArrayLoadThrowsNullPointerException() {
boolean caught = false;
- Object[] array = null;
+ Object[] array = getNullObjectArray();
try {
takeObject(array[0]);
@@ -62,7 +66,7 @@ public class ArrayExceptionsTest extends TestCase {
public static void testArrayStoreThrowsNullPointerException() {
boolean caught = false;
- Object[] array = null;
+ Object[] array = getNullObjectArray();
try {
array[0] = null;
@@ -107,7 +111,7 @@ public class ArrayExceptionsTest extends TestCase {
public static void testArraylengthThrowsNullPointerException() {
boolean caught = false;
- Object[] array = null;
+ Object[] array = getNullObjectArray();
try {
takeInt(array.length);
--
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