Skip to content

Commit

Permalink
3.x: Remove unused methods 'produce' and 'dispose' from PersistenceEx…
Browse files Browse the repository at this point in the history
…tension.ReferenceCountingProducer (#9422)
  • Loading branch information
Captain1653 authored Oct 30, 2024
1 parent 6d1b5b1 commit 9d2752d
Showing 1 changed file with 1 addition and 46 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Oracle and/or its affiliates.
* Copyright (c) 2023, 2024 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -27,7 +27,6 @@
import java.net.URLClassLoader;
import java.security.CodeSource;
import java.security.ProtectionDomain;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Enumeration;
Expand Down Expand Up @@ -1569,34 +1568,6 @@ private <T> T produce(Supplier<? extends T> supplier,
return this.produce(supplier, disposer, Set.of(type), qualifiers);
}

private <T> T produce(Supplier<? extends T> supplier,
Consumer<? super T> disposer,
Class<T> type,
Annotation... qualifiers) {
return this.produce(supplier, disposer, Set.of(type), Set.copyOf(Arrays.asList(qualifiers)));
}

private <T> T produce(Supplier<? extends T> supplier,
Consumer<? super T> disposer,
TypeLiteral<T> type,
Set<Annotation> qualifiers) {
return this.produce(supplier, disposer, Set.of(type.getType()), qualifiers);
}

private <T> T produce(Supplier<? extends T> supplier,
Consumer<? super T> disposer,
TypeLiteral<T> type,
Annotation... qualifiers) {
return this.produce(supplier, disposer, Set.of(type.getType()), Set.copyOf(Arrays.asList(qualifiers)));
}

private <T> T produce(Supplier<? extends T> supplier,
Consumer<? super T> disposer,
Set<Type> types,
Annotation... qualifiers) {
return this.produce(supplier, disposer, types, Set.copyOf(Arrays.asList(qualifiers)));
}

private <T> T produce(Supplier<? extends T> supplier,
Consumer<? super T> disposer,
Set<Type> types,
Expand All @@ -1617,22 +1588,6 @@ private <T> void dispose(Class<T> type, Set<Annotation> qualifiers) {
this.dispose(Set.of(type), qualifiers);
}

private <T> void dispose(Class<T> type, Annotation... qualifiers) {
this.dispose(Set.of(type), Set.copyOf(Arrays.asList(qualifiers)));
}

private <T> void dispose(TypeLiteral<T> type, Set<Annotation> qualifiers) {
this.dispose(Set.of(type.getType()), qualifiers);
}

private <T> void dispose(TypeLiteral<T> type, Annotation... qualifiers) {
this.dispose(Set.of(type.getType()), Set.copyOf(Arrays.asList(qualifiers)));
}

private <T> void dispose(Set<Type> types, Annotation... qualifiers) {
this.dispose(types, Set.copyOf(Arrays.asList(qualifiers)));
}

private <T> void dispose(Set<Type> types, Set<Annotation> qualifiers) {
Map<ReferenceCountingProducer, Map<ProductionId, Production<?>>> tlMap = TL.get();
Map<ProductionId, Production<?>> map = tlMap.get(this);
Expand Down

0 comments on commit 9d2752d

Please sign in to comment.