From 1381fe172e851efefc101ad5a625e382e15ef9dd Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 26 Aug 2014 09:40:33 -0700 Subject: [PATCH] Polish --- .../boot/gradle/agent/AgentTasksEnhancer.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/agent/AgentTasksEnhancer.java b/spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/agent/AgentTasksEnhancer.java index 89f356d1f55..0ffdca2cf1d 100644 --- a/spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/agent/AgentTasksEnhancer.java +++ b/spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/agent/AgentTasksEnhancer.java @@ -85,14 +85,12 @@ public class AgentTasksEnhancer implements Action { if (loaded != null) { CodeSource source = loaded.getProtectionDomain().getCodeSource(); if (source != null) { - File agent; try { - agent = new File(source.getLocation().toURI()); + return new File(source.getLocation().toURI()); } catch (URISyntaxException ex) { - agent = new File(source.getLocation().getPath()); + return new File(source.getLocation().getPath()); } - return agent; } } }