From a05a5b3f1ca53a96292d56e56deb8a76483fda23 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 21 Jan 2016 17:48:18 +0000 Subject: [PATCH] Fix problem reported by Checkstyle --- .../springframework/boot/gradle/FullyExecutableJarTests.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/FullyExecutableJarTests.java b/spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/FullyExecutableJarTests.java index 8bb9a0c93b2..86704f2012c 100644 --- a/spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/FullyExecutableJarTests.java +++ b/spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/FullyExecutableJarTests.java @@ -166,11 +166,12 @@ public class FullyExecutableJarTests { private List readLines(File file) throws IOException { BufferedReader reader = new BufferedReader(new FileReader(file)); - String line; List lines = new ArrayList(); try { - while ((line = reader.readLine()) != null && lines.size() < 50) { + String line = reader.readLine(); + while (line != null && lines.size() < 50) { lines.add(line); + line = reader.readLine(); } } finally {