Polishing
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user