@@ -649,21 +649,21 @@ static public void testSystemArrayCopy22() throws Throwable {
649649 try {
650650 initArraysForASETest (); // ifArray3[ARRAY_SIZE/2] is NULL
651651 testIFVT (ifArray3 , nullRestrictedVtArrayDst );
652- } catch (java .lang .ArrayStoreException ase1 ) {
652+ } catch (java .lang .ArrayStoreException | java . lang . NullPointerException ex1 ) {
653653 try {
654654 checkResultsPartial (ifArray3 , nullRestrictedVtArrayDst , ARRAY_SIZE /2 );
655655 checkNullRestrictedVTArrayAfterException (ARRAY_SIZE /2 );
656656
657657 initArraysForASETest ();
658658 testIFVT (ifArray3 , nullRestrictedVtArrayDst );
659- } catch (java .lang .ArrayStoreException ase2 ) {
659+ } catch (java .lang .ArrayStoreException | java . lang . NullPointerException ex2 ) {
660660 checkResultsPartial (ifArray3 , nullRestrictedVtArrayDst , ARRAY_SIZE /2 );
661661 // pass
662662 return ;
663663 }
664664 }
665665
666- Assert .fail ("Expect an ArrayStoreException. No exception or wrong kind of exception thrown" );
666+ Assert .fail ("Expect an ArrayStoreException or NullPointerException . No exception or wrong kind of exception thrown" );
667667 }
668668
669669 @ Test (priority =1 )
@@ -672,22 +672,22 @@ static public void testSystemArrayCopy23() throws Throwable {
672672 try {
673673 initArraysForASETest (); // ifArray3[ARRAY_SIZE/2] is NULL
674674 testIFIF (ifArray3 , nullRestrictedVtArrayDst );
675- } catch (java .lang .ArrayStoreException ase1 ) {
675+ } catch (java .lang .ArrayStoreException | java . lang . NullPointerException ex1 ) {
676676 try {
677677 checkResultsPartial (ifArray3 , nullRestrictedVtArrayDst , ARRAY_SIZE /2 );
678678 checkNullRestrictedVTArrayAfterException (ARRAY_SIZE /2 );
679679
680680 initArraysForASETest ();
681681 testIFIF (ifArray3 , nullRestrictedVtArrayDst );
682- } catch (java .lang .ArrayStoreException ase2 ) {
682+ } catch (java .lang .ArrayStoreException | java . lang . NullPointerException ex2 ) {
683683 checkResultsPartial (ifArray3 , nullRestrictedVtArrayDst , ARRAY_SIZE /2 );
684684 checkNullRestrictedVTArrayAfterException (ARRAY_SIZE /2 );
685685 // pass
686686 return ;
687687 }
688688 }
689689
690- Assert .fail ("Expect a ArrayStoreException. No exception or wrong kind of exception thrown" );
690+ Assert .fail ("Expect an ArrayStoreException or NullPointerException . No exception or wrong kind of exception thrown" );
691691 }
692692
693693 @ Test (priority =1 )
@@ -776,7 +776,7 @@ static public void testSystemArrayCopy28() throws Throwable {
776776 checkResults (nullRestrictedVtArraySrc , vtArrayDst );
777777 }
778778
779- @ Test (priority =1 , invocationCount =2 , expectedExceptions =ArrayStoreException .class )
779+ @ Test (priority =1 , invocationCount =2 , expectedExceptions ={ ArrayStoreException .class , NullPointerException . class } )
780780 static public void testSystemArrayCopy29 () throws Throwable {
781781 initArraysToCopyNullToNullRestrictedArray ();
782782 testVTVT (vtArraySrc , nullRestrictedVtArrayDst );
0 commit comments