Skip to content

Commit 5b83323

Browse files
brunoborgesCopilot
andauthored
Update src/site/markdown/cookbook/pr-visualization.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 25b54ce commit 5b83323

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/site/markdown/cookbook/pr-visualization.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,13 @@ public class PRVisualization {
198198
}
199199

200200
private static String promptForRepo() throws IOException {
201-
try (var reader = new BufferedReader(new InputStreamReader(System.in))) {
202-
System.out.print("Enter GitHub repo (owner/repo): ");
203-
return reader.readLine().trim();
201+
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
202+
System.out.print("Enter GitHub repo (owner/repo): ");
203+
String line = reader.readLine();
204+
if (line == null) {
205+
throw new EOFException("End of input while reading repository name");
204206
}
207+
return line.trim();
205208
}
206209
}
207210
```

0 commit comments

Comments
 (0)