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

8310330: HttpClient: debugging interestOps/readyOps could cause exceptions and smaller cleanup #14546

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
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
@@ -320,22 +320,6 @@ private StringBuilder decorate(StringBuilder sb, String msg) {
return sb;
}

private StringBuilder getFormat(StringBuilder sb, String format, Object[] params) {
if (format == null || params == null || params.length == 0) {
return decorate(sb, format);
} else if (format.contains("{0}") || format.contains("{1}")) {
return decorate(sb, format);
} else if (format.contains("%s") || format.contains("%d")) {
try {
return decorate(sb, String.format(format, params));
} catch (Throwable t) {
return decorate(sb, format);
}
} else {
return decorate(sb, format);
}
}

// Only called when params[] is not empty.
// Simplified detection of String.format: if the format
// string contains at least one % and if that percent