Commit 114239b
authored
fix(jni): ensure that the
* refactor(sentry_native_java): streamline options retrieval in addBreadcrumb and setUser methods
This commit refactors the SentryNativeJava class to improve the retrieval of native options in the addBreadcrumb and setUser methods. The changes ensure that the ScopesAdapter instance is obtained once and used consistently, enhancing code clarity and reducing redundancy. Additionally, null checks are maintained to prevent potential runtime errors.
* Update CHANGELOGScopesAdapter instance is released after use (#3411)1 parent cba2765 commit 114239b
File tree
2 files changed
+8
-5
lines changed- packages/flutter/lib/src/native/java
2 files changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
195 | 197 | | |
196 | 198 | | |
197 | 199 | | |
| |||
214 | 216 | | |
215 | 217 | | |
216 | 218 | | |
217 | | - | |
218 | | - | |
| 219 | + | |
219 | 220 | | |
220 | | - | |
| 221 | + | |
| 222 | + | |
221 | 223 | | |
222 | 224 | | |
223 | 225 | | |
| |||
0 commit comments