Use String#isEmpty()
This commit is contained in:
parent
8be681964c
commit
ebccd5d225
|
@ -104,7 +104,7 @@ class CachedResponseSuitabilityChecker {
|
|||
while (it.hasNext()) {
|
||||
final HeaderElement elt = it.next();
|
||||
if (HeaderConstants.CACHE_CONTROL_MAX_STALE.equals(elt.getName())) {
|
||||
if ((elt.getValue() == null || "".equals(elt.getValue().trim())) && maxStale == -1) {
|
||||
if ((elt.getValue() == null || elt.getValue().trim().isEmpty()) && maxStale == -1) {
|
||||
maxStale = Long.MAX_VALUE;
|
||||
} else {
|
||||
try {
|
||||
|
|
|
@ -138,7 +138,7 @@ class ResponseProtocolCompliance {
|
|||
}
|
||||
}
|
||||
final String newHeaderValue = buf.toString();
|
||||
if (!"".equals(newHeaderValue)) {
|
||||
if (!newHeaderValue.isEmpty()) {
|
||||
newHeaders.add(new BasicHeader(HttpHeaders.CONTENT_ENCODING, newHeaderValue));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue