Skip to content

Commit

Permalink
Merge #2346 into 1.1.0-M4
Browse files Browse the repository at this point in the history
  • Loading branch information
violetagg committed Jul 1, 2022
2 parents 91b1f14 + b970a3e commit 2451021
Showing 1 changed file with 8 additions and 1 deletion.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2021 VMware, Inc. or its affiliates, All Rights Reserved.
* Copyright (c) 2019-2022 VMware, Inc. or its affiliates, All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -23,6 +23,7 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
Expand Down Expand Up @@ -746,6 +747,12 @@ public Context delete(Object key) {
.delete(key);
}

@Override
public void forEach(BiConsumer<Object, Object> action) {
action.accept(KEY_ON_DISCARD, this);
actualContext.delete(KEY_ON_DISCARD).forEach(action);
}

@Override
public int size() {
Context context = actualContext;
Expand Down

0 comments on commit 2451021

Please sign in to comment.