Skip to content

Commit 1381fe1

Browse files
committed
Polish
1 parent 28f7cf4 commit 1381fe1

File tree

1 file changed

+2
-4
lines changed
  • spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/agent

1 file changed

+2
-4
lines changed

spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/agent/AgentTasksEnhancer.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,12 @@ private File getSpringLoadedAgent() {
8585
if (loaded != null) {
8686
CodeSource source = loaded.getProtectionDomain().getCodeSource();
8787
if (source != null) {
88-
File agent;
8988
try {
90-
agent = new File(source.getLocation().toURI());
89+
return new File(source.getLocation().toURI());
9190
}
9291
catch (URISyntaxException ex) {
93-
agent = new File(source.getLocation().getPath());
92+
return new File(source.getLocation().getPath());
9493
}
95-
return agent;
9694
}
9795
}
9896
}

0 commit comments

Comments
 (0)