Fix Java 5 source compatibility issue / Inspector warnings

This commit is contained in:
Trustin Lee 2014-01-09 15:16:30 +09:00
parent 8198f23dbb
commit 013b57f1c1
2 changed files with 3 additions and 8 deletions

View File

@ -333,7 +333,6 @@ public class DefaultHttpHeaders extends HttpHeaders {
return all;
}
@Override
public Iterator<Map.Entry<String, String>> iterator() {
return new HeaderIterator();
}
@ -408,12 +407,10 @@ public class DefaultHttpHeaders extends HttpHeaders {
private HeaderEntry current = head;
@Override
public boolean hasNext() {
return current.after != head;
}
@Override
public Entry<String, String> next() {
current = current.after;
@ -424,7 +421,6 @@ public class DefaultHttpHeaders extends HttpHeaders {
return current;
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
@ -455,17 +451,14 @@ public class DefaultHttpHeaders extends HttpHeaders {
after.before = this;
}
@Override
public String getKey() {
return key;
}
@Override
public String getValue() {
return value;
}
@Override
public String setValue(String value) {
if (value == null) {
throw new NullPointerException("value");

View File

@ -93,7 +93,6 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
throw new UnsupportedOperationException("read only");
}
@Override
public Iterator<Entry<String, String>> iterator() {
return entries().iterator();
}
@ -710,6 +709,7 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
try {
return Integer.parseInt(value);
} catch (NumberFormatException e) {
// Not an integer header - use the default.
return defaultValue;
}
}
@ -771,6 +771,7 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
try {
return HttpHeaderDateFormat.get().parse(value);
} catch (ParseException e) {
// Not a date header - use the default.
return defaultValue;
}
}
@ -853,6 +854,7 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
try {
return Long.parseLong(contentLength);
} catch (NumberFormatException e) {
// Not a long integer header - use the default.
return defaultValue;
}
}