@@ -178,8 +178,10 @@ public Map<String, String> getConfig(Startable startable) {
178
178
if (config != null && !config .isEmpty ()) {
179
179
map .putAll (config );
180
180
}
181
- for (Map .Entry <String , Function <Startable , String >> entry : applicationConfigProvider .entrySet ()) {
182
- map .put (entry .getKey (), () -> entry .getValue ().apply (startable ));
181
+ if (applicationConfigProvider != null ) {
182
+ for (Map .Entry <String , Function <Startable , String >> entry : applicationConfigProvider .entrySet ()) {
183
+ map .put (entry .getKey (), () -> entry .getValue ().apply (startable ));
184
+ }
183
185
}
184
186
return map ;
185
187
}
@@ -263,6 +265,7 @@ public OwnedServiceBuilder<T> serviceConfig(Object serviceConfig) {
263
265
return this ;
264
266
}
265
267
268
+ @ SuppressWarnings ("unchecked" )
266
269
public <S extends Startable > OwnedServiceBuilder <S > startable (Supplier <S > startableSupplier ) {
267
270
this .startableSupplier = startableSupplier ;
268
271
return (OwnedServiceBuilder <S >) this ;
@@ -273,11 +276,13 @@ public OwnedServiceBuilder<T> postStartHook(Consumer<T> postStartAction) {
273
276
return this ;
274
277
}
275
278
279
+ @ SuppressWarnings ({ "unchecked" , "rawtypes" })
276
280
public OwnedServiceBuilder <T > configProvider (Map <String , Function <T , String >> applicationConfigProvider ) {
277
281
this .applicationConfigProvider = (Map <String , Function <Startable , String >>) (Map ) applicationConfigProvider ;
278
282
return this ;
279
283
}
280
284
285
+ @ SuppressWarnings ("unchecked" )
281
286
public DevServicesResultBuildItem build () {
282
287
return new DevServicesResultBuildItem (name , description , serviceName , serviceConfig , config ,
283
288
(Supplier <Startable >) startableSupplier ,
0 commit comments