Simplify redundant 'if' statements.
This commit is contained in:
parent
f0520dad20
commit
ab61090572
@ -225,15 +225,10 @@ public final class LocalTimeProtocol {
|
||||
private void initFields() {
|
||||
continent_ = org.jboss.netty.example.localtime.LocalTimeProtocol.Continent.AFRICA;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInitialized() {
|
||||
if (!hasContinent) {
|
||||
return false;
|
||||
}
|
||||
if (!hasCity) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return hasContinent && hasCity;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1000,10 +995,7 @@ public final class LocalTimeProtocol {
|
||||
if (!hasMinute) {
|
||||
return false;
|
||||
}
|
||||
if (!hasSecond) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return hasSecond;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -288,11 +288,7 @@ public class DefaultCookie implements Cookie {
|
||||
} else if (that.getDomain() == null) {
|
||||
return false;
|
||||
}
|
||||
if (!getDomain().equalsIgnoreCase(that.getDomain())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return getDomain().equalsIgnoreCase(that.getDomain());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user