From e13ad3becfa6ff08770369b2dcaddf820bdaf5bf Mon Sep 17 00:00:00 2001 From: Ahmed Mahmoud Date: Mon, 24 Jun 2024 12:27:45 +0300 Subject: [PATCH 1/3] fix(android): change parameters used in inner class to final --- .../com/instabug/reactlibrary/RNInstabugReactnativeModule.java | 2 +- .../instabug/reactlibrary/RNInstabugSessionReplayModule.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java index 0cd0a3940..c056f1583 100644 --- a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java +++ b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java @@ -161,7 +161,7 @@ public void run() { } @ReactMethod - public void setCodePushVersion(@Nullable String version) { + public void setCodePushVersion(@Nullable final String version) { MainThreadHandler.runOnMainThread(new Runnable() { @Override public void run() { diff --git a/android/src/main/java/com/instabug/reactlibrary/RNInstabugSessionReplayModule.java b/android/src/main/java/com/instabug/reactlibrary/RNInstabugSessionReplayModule.java index 1c3967502..5024c6180 100644 --- a/android/src/main/java/com/instabug/reactlibrary/RNInstabugSessionReplayModule.java +++ b/android/src/main/java/com/instabug/reactlibrary/RNInstabugSessionReplayModule.java @@ -83,7 +83,7 @@ public void run() { } @ReactMethod - public void getSessionReplayLink(Promise promise) { + public void getSessionReplayLink(final Promise promise) { MainThreadHandler.runOnMainThread(new Runnable() { @Override public void run() { From 298719b24387fcbae1aef7623c2860655519563b Mon Sep 17 00:00:00 2001 From: Ahmed Mahmoud Date: Mon, 24 Jun 2024 12:52:38 +0300 Subject: [PATCH 2/3] chore: update changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec409f873..c45ff4f51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [Unreleased](https://github.com/Instabug/Instabug-React-Native/compare/v13.1.1...dev) + +### Fixed + +- Change parameters used inside inner classes to `final` in Android code to maintain compatibility with Java 7 and earlier ([#1239](https://github.com/Instabug/Instabug-React-Native/pull/1239)). + ## [13.1.1](https://github.com/Instabug/Instabug-React-Native/compare/v13.0.4...dev) (JUN 6, 2024) ### Fixed From 9daf9cecbc8fad62b87180bded86a7de44d4221a Mon Sep 17 00:00:00 2001 From: Ahmed Mahmoud Date: Thu, 27 Jun 2024 16:36:36 +0300 Subject: [PATCH 3/3] chore(android): add final to crash reporting parameters --- .../instabug/reactlibrary/RNInstabugCrashReportingModule.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/com/instabug/reactlibrary/RNInstabugCrashReportingModule.java b/android/src/main/java/com/instabug/reactlibrary/RNInstabugCrashReportingModule.java index 080e6cf07..f7c076253 100644 --- a/android/src/main/java/com/instabug/reactlibrary/RNInstabugCrashReportingModule.java +++ b/android/src/main/java/com/instabug/reactlibrary/RNInstabugCrashReportingModule.java @@ -90,9 +90,9 @@ public void run() { * @param level different severity levels for errors */ @ReactMethod - public void sendHandledJSCrash(final String exceptionObject, @Nullable ReadableMap userAttributes, @Nullable String fingerprint, @Nullable String level) { + public void sendHandledJSCrash(final String exceptionObject, @Nullable final ReadableMap userAttributes, @Nullable final String fingerprint, @Nullable final String level) { try { - JSONObject jsonObject = new JSONObject(exceptionObject); + final JSONObject jsonObject = new JSONObject(exceptionObject); MainThreadHandler.runOnMainThread(new Runnable() { @Override public void run() {