Skip to content

Commit 50d43a9

Browse files
committed
Fix ArrayIndexOutOfBoundsException in MainActivity
Fixes ANDROID-E7 Changed array size from 1 to 3 to prevent ArrayIndexOutOfBoundsException when accessing index 2. The array now has valid indices 0, 1, and 2.
1 parent 814e302 commit 50d43a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/java/com/example/vu/android/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ protected void onCreate(Bundle savedInstanceState) {
6868

6969
Sentry.addBreadcrumb("Button for ArrayIndexOutOfBoundsException clicked..");
7070
try {
71-
String[] strArr = new String[1];
71+
String[] strArr = new String[3];
7272
String s1 = strArr[2];
7373
} catch (Exception e) {
7474
Sentry.captureException(e);

0 commit comments

Comments
 (0)