Fix build

This commit is contained in:
TheMode 2021-04-18 16:56:17 +02:00
parent bd9cab5805
commit e00b3a6fba
2 changed files with 3 additions and 4 deletions

View File

@ -16,7 +16,7 @@ import java.util.function.Consumer;
*
* @param <T> the acquirable object type
*/
public class Acquirable<T> {
public final class Acquirable<T> {
public static final ThreadLocal<Collection<Entity>> CURRENT_ENTITIES = ThreadLocal.withInitial(Collections::emptyList);

View File

@ -29,10 +29,9 @@ public final class Acquisition {
* @param collection the collection to acquire
* @param consumer the consumer called for each of the collection element
* @param <E> the object type
* @param <T> the acquirable object
*/
public static <E, T extends Acquirable<E>> void acquireForEach(@NotNull Collection<? super T> collection,
@NotNull Consumer<? super E> consumer) {
public static <E> void acquireForEach(@NotNull Collection<Acquirable<E>> collection,
@NotNull Consumer<? super E> consumer) {
final Thread currentThread = Thread.currentThread();
Map<BatchThread, List<E>> threadCacheMap = retrieveThreadMap(collection, currentThread, consumer);