Skip to content

Commit f50e57b

Browse files
Apply spotless and revert controller logic change
1 parent b2c1466 commit f50e57b

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

sentry-samples/sentry-samples-spring/build.gradle.kts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ java {
2828

2929
repositories { mavenCentral() }
3030

31-
dependencyManagement { imports {
32-
mavenBom(BOM_COORDINATES)
33-
mavenBom(libs.kotlin.bom.get().toString())
34-
mavenBom(libs.jackson.bom.get().toString())
35-
} }
31+
dependencyManagement {
32+
imports {
33+
mavenBom(BOM_COORDINATES)
34+
mavenBom(libs.kotlin.bom.get().toString())
35+
mavenBom(libs.jackson.bom.get().toString())
36+
}
37+
}
3638

3739
dependencies {
3840
implementation(Config.Libs.springWeb)

sentry-samples/sentry-samples-spring/src/main/java/io/sentry/samples/spring/web/PersonController.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ Person person(@PathVariable("id") Long id) {
2727
Sentry.logger().error("error Sentry logging");
2828
Sentry.logger().info("hello %s %s", "there", "world!");
2929
LOGGER.info("Loading person with id={}", id);
30-
throw new IllegalArgumentException("Something went wrong [id=" + id + "]");
30+
if (id > 10L) {
31+
throw new IllegalArgumentException("Something went wrong [id=" + id + "]");
32+
} else {
33+
return personService.find(id);
34+
}
3135
}
3236

3337
@PostMapping

0 commit comments

Comments
 (0)