Skip to content

Commit ec82638

Browse files
martinkretzschmarGoogle Java Core Libraries
authored andcommitted
Revert commit 032e2f9 “Workaround bad J2KT/Kotlin smartcast interaction”
Workaround is no longer required. PiperOrigin-RevId: 729083405
1 parent c4965e4 commit ec82638

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

android/guava-tests/test/com/google/common/collect/ObjectArraysTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,7 @@ public void testToArrayImpl2() {
152152
private void doTestToArrayImpl2(List<Integer> list, Integer[] array1, boolean expectModify) {
153153
Integer[] starting = Arrays.copyOf(array1, array1.length);
154154
Integer[] array2 = Arrays.copyOf(array1, array1.length);
155-
// TODO b/283448200 - Remove temporary variable when Kotlin smartcast issue is resolved.
156-
Integer[] array1Tmp = array1;
157-
Object[] reference = list.toArray(array1Tmp);
155+
Object[] reference = list.toArray(array1);
158156

159157
Object[] target = ObjectArrays.toArrayImpl(list, array2);
160158

guava-tests/test/com/google/common/collect/ObjectArraysTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,7 @@ public void testToArrayImpl2() {
152152
private void doTestToArrayImpl2(List<Integer> list, Integer[] array1, boolean expectModify) {
153153
Integer[] starting = Arrays.copyOf(array1, array1.length);
154154
Integer[] array2 = Arrays.copyOf(array1, array1.length);
155-
// TODO b/283448200 - Remove temporary variable when Kotlin smartcast issue is resolved.
156-
Integer[] array1Tmp = array1;
157-
Object[] reference = list.toArray(array1Tmp);
155+
Object[] reference = list.toArray(array1);
158156

159157
Object[] target = ObjectArrays.toArrayImpl(list, array2);
160158

0 commit comments

Comments
 (0)