@@ -287,7 +287,7 @@ static public void testNonVTClzGetValue() throws Throwable {
287287 @ Test
288288 static public void testGetValuesOfArray () throws Throwable {
289289 if (isFlatteningEnabled ) {
290- int layout = myUnsafe .arrayLayout (vtPointAry . getClass () );
290+ int layout = myUnsafe .arrayLayout (vtPointAry );
291291 ValueTypePoint2D p = myUnsafe .getFlatValue (vtPointAry , vtPointAryOffset0 , layout , ValueTypePoint2D .class );
292292 assertEquals (p .x .i , vtPointAry [0 ].x .i );
293293 assertEquals (p .y .i , vtPointAry [0 ].y .i );
@@ -304,7 +304,7 @@ static public void testGetValueOfZeroSizeVTArrayDoesNotCauseError() throws Throw
304304 2 ,
305305 new ZeroSizeValueType ());
306306 long zsvtAryOffset0 = myUnsafe .arrayBaseOffset (zsvtAry .getClass ());
307- int layout = myUnsafe .arrayLayout (zsvtAry . getClass () );
307+ int layout = myUnsafe .arrayLayout (zsvtAry );
308308 assertNotNull (myUnsafe .getFlatValue (zsvtAry , zsvtAryOffset0 , layout , ZeroSizeValueType .class ));
309309 }
310310 }
@@ -427,7 +427,7 @@ static public void testPutValueWithNonVTObj() throws Throwable {
427427 static public void testPutValuesOfArray () throws Throwable {
428428 if (isFlatteningEnabled ) {
429429 ValueTypePoint2D p = new ValueTypePoint2D (new ValueTypeInt (34857 ), new ValueTypeInt (784382 ));
430- int layout = myUnsafe .arrayLayout (vtPointAry . getClass () );
430+ int layout = myUnsafe .arrayLayout (vtPointAry );
431431 myUnsafe .putFlatValue (vtPointAry , vtPointAryOffset0 , layout , ValueTypePoint2D .class , p );
432432 assertEquals (vtPointAry [0 ].x .i , p .x .i );
433433 assertEquals (vtPointAry [0 ].y .i , p .y .i );
@@ -446,7 +446,7 @@ static public void testPutValueWithZeroSizeVTArrayDoesNotCauseError() throws Thr
446446 2 ,
447447 new ZeroSizeValueType ());
448448 long zsvtAryOffset0 = myUnsafe .arrayBaseOffset (zsvtAry .getClass ());
449- int layout = myUnsafe .arrayLayout (zsvtAry . getClass () );
449+ int layout = myUnsafe .arrayLayout (zsvtAry );
450450 myUnsafe .putFlatValue (zsvtAry , zsvtAryOffset0 , layout , ZeroSizeValueType .class , new ZeroSizeValueType ());
451451 }
452452 }
@@ -640,7 +640,7 @@ static public void testCompareAndSetArray0Success(CompareAndDoSomethingFunction
640640 if (isFlatteningEnabled ) {
641641 int original = vtIntAry [0 ].i ;
642642 ValueTypeInt newVti = new ValueTypeInt (456 );
643- int layout = myUnsafe .arrayLayout (vtIntAry . getClass () );
643+ int layout = myUnsafe .arrayLayout (vtIntAry );
644644 boolean success = compareAndSwapValue .execute (vtIntAry , vtIntAryOffset0 , layout , ValueTypeInt .class , vtIntAry [0 ], newVti );
645645 assertEquals (newVti .i , 456 );
646646 assertTrue (success );
@@ -653,7 +653,7 @@ static public void testCompareAndSetArray1Success(CompareAndDoSomethingFunction
653653 if (isFlatteningEnabled ) {
654654 int original = vtIntAry [1 ].i ;
655655 ValueTypeInt newVti = new ValueTypeInt (456 );
656- int layout = myUnsafe .arrayLayout (vtIntAry . getClass () );
656+ int layout = myUnsafe .arrayLayout (vtIntAry );
657657 boolean success = compareAndSwapValue .execute (vtIntAry , vtIntAryOffset1 , layout , ValueTypeInt .class , vtIntAry [1 ], newVti );
658658 assertEquals (newVti .i , 456 );
659659 assertTrue (success );
@@ -666,7 +666,7 @@ static public void testCompareAndSetArray0Failure(CompareAndDoSomethingFunction
666666 if (isFlatteningEnabled ) {
667667 int original = vtIntAry [0 ].i ;
668668 ValueTypeInt newVti = new ValueTypeInt (328 );
669- int layout = myUnsafe .arrayLayout (vtIntAry . getClass () );
669+ int layout = myUnsafe .arrayLayout (vtIntAry );
670670 boolean success = compareAndSwapValue .execute (vtIntAry , vtIntAryOffset0 , layout , ValueTypeInt .class , new ValueTypeInt (original + 1 ), newVti );
671671 assertEquals (newVti .i , 328 );
672672 assertFalse (success );
@@ -679,7 +679,7 @@ static public void testCompareAndSetArray1Failure(CompareAndDoSomethingFunction
679679 if (isFlatteningEnabled ) {
680680 int original = vtIntAry [1 ].i ;
681681 ValueTypeInt newVti = new ValueTypeInt (328 );
682- int layout = myUnsafe .arrayLayout (vtIntAry . getClass () );
682+ int layout = myUnsafe .arrayLayout (vtIntAry );
683683 boolean success = compareAndSwapValue .execute (vtIntAry , vtIntAryOffset1 , layout , ValueTypeInt .class , new ValueTypeInt (original + 1 ), newVti );
684684 assertEquals (newVti .i , 328 );
685685 assertFalse (success );
@@ -779,7 +779,7 @@ static public void testGetAndSetPointY() throws Throwable {
779779 @ Test
780780 static public void testGetAndSetArray0 () throws Throwable {
781781 if (isFlatteningEnabled ) {
782- int layout = myUnsafe .arrayLayout (vtIntAry . getClass () );
782+ int layout = myUnsafe .arrayLayout (vtIntAry );
783783 int original = vtIntAry [0 ].i ;
784784 ValueTypeInt newVti = new ValueTypeInt (456 );
785785 Object result = myUnsafe .getAndSetFlatValue (vtIntAry , vtIntAryOffset0 , layout , ValueTypeInt .class , newVti );
@@ -792,7 +792,7 @@ static public void testGetAndSetArray0() throws Throwable {
792792 @ Test
793793 static public void testGetAndSetArray1 () throws Throwable {
794794 if (isFlatteningEnabled ) {
795- int layout = myUnsafe .arrayLayout (vtIntAry . getClass () );
795+ int layout = myUnsafe .arrayLayout (vtIntAry );
796796 int original = vtIntAry [1 ].i ;
797797 ValueTypeInt newVti = new ValueTypeInt (456 );
798798 Object result = myUnsafe .getAndSetFlatValue (vtIntAry , vtIntAryOffset1 , layout , ValueTypeInt .class , newVti );
0 commit comments