Polishing

This commit is contained in:
Juergen Hoeller
2021-07-09 13:26:46 +02:00
parent 4fe3ca1b82
commit 8680fdb8bc
7 changed files with 16 additions and 12 deletions

View File

@@ -50,7 +50,7 @@ class JettyClientHttpResponse implements ClientHttpResponse {
private static final Pattern SAMESITE_PATTERN = Pattern.compile("(?i).*SameSite=(Strict|Lax|None).*");
private static final ClassLoader loader = JettyClientHttpResponse.class.getClassLoader();
private static final ClassLoader classLoader = JettyClientHttpResponse.class.getClassLoader();
private static final boolean jetty10Present;
@@ -64,7 +64,7 @@ class JettyClientHttpResponse implements ClientHttpResponse {
static {
try {
Class<?> httpFieldsClass = loader.loadClass("org.eclipse.jetty.http.HttpFields");
Class<?> httpFieldsClass = classLoader.loadClass("org.eclipse.jetty.http.HttpFields");
jetty10Present = httpFieldsClass.isInterface();
}
catch (ClassNotFoundException ex) {
@@ -144,7 +144,7 @@ class JettyClientHttpResponse implements ClientHttpResponse {
static {
try {
getHeadersMethod = Response.class.getMethod("getHeaders");
Class<?> type = loader.loadClass("org.eclipse.jetty.http.HttpField");
Class<?> type = classLoader.loadClass("org.eclipse.jetty.http.HttpField");
getNameMethod = type.getMethod("getName");
getValueMethod = type.getMethod("getValue");
}

View File

@@ -187,7 +187,7 @@ class JettyHeadersAdapter implements MultiValueMap<String, String> {
private class EntryIterator implements Iterator<Entry<String, List<String>>> {
private Enumeration<String> names = headers.getFieldNames();
private final Enumeration<String> names = headers.getFieldNames();
@Override
public boolean hasNext() {
@@ -241,6 +241,7 @@ class JettyHeadersAdapter implements MultiValueMap<String, String> {
}
}
private final class HeaderNamesIterator implements Iterator<String> {
private final Iterator<String> iterator;

View File

@@ -187,7 +187,7 @@ class JettyHeadersAdapter implements MultiValueMap<String, String> {
private class EntryIterator implements Iterator<Entry<String, List<String>>> {
private Enumeration<String> names = headers.getFieldNames();
private final Enumeration<String> names = headers.getFieldNames();
@Override
public boolean hasNext() {
@@ -241,6 +241,7 @@ class JettyHeadersAdapter implements MultiValueMap<String, String> {
}
}
private final class HeaderNamesIterator implements Iterator<String> {
private final Iterator<String> iterator;