Skip to content

Commit a05a5b3

Browse files
committed
Fix problem reported by Checkstyle
1 parent 9dc858c commit a05a5b3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/FullyExecutableJarTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,12 @@ private boolean containsLine(String toMatch, File file) throws IOException {
166166

167167
private List<String> readLines(File file) throws IOException {
168168
BufferedReader reader = new BufferedReader(new FileReader(file));
169-
String line;
170169
List<String> lines = new ArrayList<String>();
171170
try {
172-
while ((line = reader.readLine()) != null && lines.size() < 50) {
171+
String line = reader.readLine();
172+
while (line != null && lines.size() < 50) {
173173
lines.add(line);
174+
line = reader.readLine();
174175
}
175176
}
176177
finally {

0 commit comments

Comments
 (0)