Skip to content

Commit

Permalink
cache模块冗余代码优化
Browse files Browse the repository at this point in the history
  • Loading branch information
echohlne committed Sep 22, 2020
1 parent 5d3c140 commit 1d4ac7d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public boolean hasNext() {
*/
@Override
public CacheObj<K, V> next() {
if (false == hasNext()) {
if (!hasNext()) {
throw new NoSuchElementException();
}
final CacheObj<K, V> cachedObject = nextValue;
Expand All @@ -64,7 +64,7 @@ public void remove() {
private void nextValue() {
while (iterator.hasNext()) {
nextValue = iterator.next();
if (nextValue.isExpired() == false) {
if (!nextValue.isExpired()) {
return;
}
}
Expand Down

0 comments on commit 1d4ac7d

Please sign in to comment.