Skip to content

Commit

Permalink
ORM Bootstrap: adapt PreconfiguredServiceRegistryBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanne committed Feb 21, 2023
1 parent db20a5e commit ec66094
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
*/
public class PreconfiguredServiceRegistryBuilder {

private final Map configurationValues = new HashMap();
private final List<StandardServiceInitiator> initiators;
private final List<ProvidedService> providedServices = new ArrayList<ProvidedService>();
private final Map<String, Object> configurationValues = new HashMap<>();
private final List<StandardServiceInitiator<?>> initiators;
private final List<ProvidedService<?>> providedServices = new ArrayList<ProvidedService<?>>();
private final Collection<Integrator> integrators;
private final StandardServiceRegistryImpl destroyedRegistry;

Expand All @@ -76,7 +76,7 @@ public PreconfiguredServiceRegistryBuilder applySetting(String settingName, Obje
return this;
}

public PreconfiguredServiceRegistryBuilder addInitiator(StandardServiceInitiator initiator) {
public PreconfiguredServiceRegistryBuilder addInitiator(StandardServiceInitiator<?> initiator) {
initiators.add(initiator);
return this;
}
Expand All @@ -86,7 +86,7 @@ public PreconfiguredServiceRegistryBuilder addIntegrator(Integrator integrator)
return this;
}

public PreconfiguredServiceRegistryBuilder addService(ProvidedService providedService) {
public PreconfiguredServiceRegistryBuilder addService(ProvidedService<?> providedService) {
providedServices.add(providedService);
return this;
}
Expand All @@ -101,7 +101,7 @@ public StandardServiceRegistryImpl buildNewServiceRegistry() {
// already recorded as part of #applyIntegrator, #addInitiator, #addService
// applyServiceContributors( bootstrapServiceRegistry );

final Map settingsCopy = new HashMap();
final Map<String, Object> settingsCopy = new HashMap<>();
settingsCopy.putAll(configurationValues);

destroyedRegistry.resetAndReactivate(bootstrapServiceRegistry, initiators, providedServices, settingsCopy);
Expand Down Expand Up @@ -140,8 +140,8 @@ private BootstrapServiceRegistry buildEmptyBootstrapServiceRegistry() {
*
* @return
*/
private static List<StandardServiceInitiator> buildQuarkusServiceInitiatorList(RecordedState rs) {
final ArrayList<StandardServiceInitiator> serviceInitiators = new ArrayList<StandardServiceInitiator>();
private static List<StandardServiceInitiator<?>> buildQuarkusServiceInitiatorList(RecordedState rs) {
final ArrayList<StandardServiceInitiator<?>> serviceInitiators = new ArrayList<StandardServiceInitiator<?>>();

//Enforces no bytecode enhancement will happen at runtime:
serviceInitiators.add(DisabledBytecodeProviderInitiator.INSTANCE);
Expand Down

0 comments on commit ec66094

Please sign in to comment.