Skip to content

Commit 7f701e5

Browse files
committed
Cleanup code
1 parent cf412d4 commit 7f701e5

File tree

1 file changed

+4
-24
lines changed

1 file changed

+4
-24
lines changed

sentry-android-ndk/src/main/java/io/sentry/android/ndk/NdkScopeObserver.java

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,7 @@ public void addBreadcrumb(final @NotNull Breadcrumb crumb) {
8989
@Override
9090
public void setTag(final @NotNull String key, final @NotNull String value) {
9191
try {
92-
options
93-
.getExecutorService()
94-
.submit(
95-
() -> {
96-
nativeScope.setTag(key, value);
97-
});
92+
options.getExecutorService().submit(() -> nativeScope.setTag(key, value));
9893
} catch (Throwable e) {
9994
options.getLogger().log(SentryLevel.ERROR, e, "Scope sync setTag(%s) has an error.", key);
10095
}
@@ -103,12 +98,7 @@ public void setTag(final @NotNull String key, final @NotNull String value) {
10398
@Override
10499
public void removeTag(final @NotNull String key) {
105100
try {
106-
options
107-
.getExecutorService()
108-
.submit(
109-
() -> {
110-
nativeScope.removeTag(key);
111-
});
101+
options.getExecutorService().submit(() -> nativeScope.removeTag(key));
112102
} catch (Throwable e) {
113103
options.getLogger().log(SentryLevel.ERROR, e, "Scope sync removeTag(%s) has an error.", key);
114104
}
@@ -117,12 +107,7 @@ public void removeTag(final @NotNull String key) {
117107
@Override
118108
public void setExtra(final @NotNull String key, final @NotNull String value) {
119109
try {
120-
options
121-
.getExecutorService()
122-
.submit(
123-
() -> {
124-
nativeScope.setExtra(key, value);
125-
});
110+
options.getExecutorService().submit(() -> nativeScope.setExtra(key, value));
126111
} catch (Throwable e) {
127112
options.getLogger().log(SentryLevel.ERROR, e, "Scope sync setExtra(%s) has an error.", key);
128113
}
@@ -131,12 +116,7 @@ public void setExtra(final @NotNull String key, final @NotNull String value) {
131116
@Override
132117
public void removeExtra(final @NotNull String key) {
133118
try {
134-
options
135-
.getExecutorService()
136-
.submit(
137-
() -> {
138-
nativeScope.removeExtra(key);
139-
});
119+
options.getExecutorService().submit(() -> nativeScope.removeExtra(key));
140120
} catch (Throwable e) {
141121
options
142122
.getLogger()

0 commit comments

Comments
 (0)