Skip to content

Commit 3672228

Browse files
authored
fix: add lazy initialization for rasp events (#134)
1 parent 85c05d5 commit 3672228

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [4.3.2] - 2025-01-03
9+
10+
- Android SDK version: 17.0.1
11+
- iOS SDK version: 6.13.0
12+
13+
### React Native
14+
15+
#### Fixed
16+
17+
- Resolved potential NullPointerException when execution state events are being sent
18+
819
## [4.3.1] - 2025-12-16
920

1021
- Android SDK version: 17.0.1

android/src/main/java/com/freeraspreactnative/FreeraspReactNativeModule.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ class FreeraspReactNativeModule(private val reactContext: ReactApplicationContex
5959
init {
6060
appReactContext = reactContext
6161
reactContext.addLifecycleEventListener(lifecycleListener)
62+
initializeEventKeys()
6263
}
6364

6465
@ReactMethod
@@ -89,6 +90,12 @@ class FreeraspReactNativeModule(private val reactContext: ReactApplicationContex
8990
}
9091
}
9192

93+
// Trigger lazy initialization of the freeRASP events
94+
private fun initializeEventKeys() {
95+
ThreatEvent.ALL_EVENTS
96+
RaspExecutionStateEvent.ALL_EVENTS
97+
}
98+
9299
/**
93100
* Method to get the random identifiers of callbacks
94101
*/

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "freerasp-react-native",
3-
"version": "4.3.1",
3+
"version": "4.3.2",
44
"description": "React Native plugin for improving app security and threat monitoring on Android and iOS mobile devices.",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",

0 commit comments

Comments
 (0)