Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid warning on analytics #42071

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ public void close() throws IOException {
})) {
return scanner.nextLine();
} catch (Exception e) {
getLogger().warn("Failed to collect user input for analytics", e);
getLogger().debug("Failed to collect user input for analytics", e);
return "";
}
});
Expand Down
2 changes: 1 addition & 1 deletion devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ public void close() throws IOException {
})) {
return scanner.nextLine();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about checking if the scanner.hasNextLine() before trying to read the line? It would allow to provide a warn explaining that no prompt was read

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scanner.hasNextLine() seems to block waiting for user input.

} catch (Exception e) {
getLog().warn("Failed to collect user input for analytics", e);
getLog().debug("Failed to collect user input for analytics", e);
return "";
}
});
Expand Down
Loading