Skip to content

Commit fc49fab

Browse files
authored
Merge 2f02001 into f0af5c3
2 parents f0af5c3 + 2f02001 commit fc49fab

File tree

6 files changed

+177
-16
lines changed

6 files changed

+177
-16
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ allprojects {
9999
dependsOn("cleanTest")
100100
}
101101
withType<JavaCompile> {
102-
options.compilerArgs.addAll(arrayOf("-Xlint:all", "-Werror", "-Xlint:-classfile", "-Xlint:-processing"))
102+
options.compilerArgs.addAll(arrayOf("-Xlint:all", "-Werror", "-Xlint:-classfile", "-Xlint:-processing", "-Xlint:-try"))
103103
}
104104
}
105105
}

sentry/api/sentry.api

Lines changed: 165 additions & 14 deletions
Large diffs are not rendered by default.

sentry/src/main/java/io/sentry/Breadcrumb.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,7 @@ public void setUnknown(@Nullable Map<String, Object> unknown) {
663663
@Override
664664
@SuppressWarnings("JavaUtilDate")
665665
public int compareTo(@NotNull Breadcrumb o) {
666+
// TODO also use nano time if equal
666667
return timestamp.compareTo(o.timestamp);
667668
}
668669

sentry/src/main/java/io/sentry/CombinedScopeView.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ public void setTag(@NotNull String key, @NotNull String value) {
237237

238238
@Override
239239
public void removeTag(@NotNull String key) {
240+
// TODO should this go to all scopes?
240241
getDefaultWriteScope().removeTag(key);
241242
}
242243

@@ -256,6 +257,7 @@ public void setExtra(@NotNull String key, @NotNull String value) {
256257

257258
@Override
258259
public void removeExtra(@NotNull String key) {
260+
// TODO should this go to all scopes?
259261
getDefaultWriteScope().removeExtra(key);
260262
}
261263

@@ -305,10 +307,12 @@ public void setContexts(@NotNull String key, @NotNull Character value) {
305307

306308
@Override
307309
public void removeContexts(@NotNull String key) {
310+
// TODO should this go to all scopes?
308311
getDefaultWriteScope().removeContexts(key);
309312
}
310313

311314
private @NotNull IScope getDefaultWriteScope() {
315+
// TODO use Scopes.getSpecificScope?
312316
if (ScopeType.CURRENT.equals(getOptions().getDefaultScopeType())) {
313317
return scope;
314318
}

sentry/src/main/java/io/sentry/ScopeType.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33
public enum ScopeType {
44
CURRENT,
55
ISOLATION,
6-
GLOBAL;
6+
GLOBAL,
7+
8+
// TODO do we need a combined as well so configureScope
9+
COMBINED;
710
}

sentry/src/main/java/io/sentry/Scopes.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ public void endSession() {
363363
}
364364

365365
private IScope getCombinedScopeView() {
366+
// TODO create in ctor?
366367
return new CombinedScopeView(getGlobalScope(), isolationScope, scope);
367368
}
368369

@@ -428,6 +429,7 @@ public void addBreadcrumb(final @NotNull Breadcrumb breadcrumb, final @Nullable
428429
}
429430

430431
private IScope getSpecificScope(final @Nullable ScopeType scopeType) {
432+
// TODO extract and reuse
431433
if (scopeType != null) {
432434
switch (scopeType) {
433435
case CURRENT:

0 commit comments

Comments
 (0)