Toggle navigation
Home
org.glassfish.jersey.server.internal.inject.AbstractRequestDerivedValueSupplier to java.util.function.Function
No. of Instances - 2
No. of Commits - 1
No. of Projects - {'jersey'}
Hierarchy/Composition: -
Primitive Info: -
NameSpace: Internal -> Jdk
Mapping:
Cascading Type Change (Different)
FormDataMultiPartSupplier
to
FormDataBodyPartProvider
ListFormDataBodyPartValueSupplier
to
FormDataParamValueProvider
ListFormDataContentDispositionSupplier
to
FormDataParamValueProvider
Rename Variable
createValueSupplier
to
createValueProvider
createValueSupplier
to
createValueProvider
createValueSupplier
to
createValueProvider
createValueSupplier
to
createValueProvider
createValueSupplier
to
createValueProvider
Add or Remove Method invocation
requestProvider
to
get(parameter)
requestProvider
to
get(parameter)
Update argument list (Class Instance Creation)
WebTargetValueSupplier
to
WebTargetValueSupplier
Cascading Type Change (Similar)
Producer<AbstractRequestDerivedValueSupplier<?>>
to
Producer<Function<ContainerRequest,?>>
Update Anonymous class
{ @Override public AbstractRequestDerivedValueSupplier<?> call(){ String targetUriTemplate=parameter.getSourceName(); if (targetUriTemplate == null || targetUriTemplate.length() == 0) { Errors.warning(this,LocalizationMessages.INJECTED_WEBTARGET_URI_INVALID(targetUriTemplate)); return null; } final Class<?> rawParameterType=parameter.getRawType(); if (rawParameterType == WebTarget.class) { final BindingModel binding=BindingModel.create(Arrays.<Annotation>asList(parameter.getAnnotations())); Value<ManagedClient> client=managedClients.get(binding); if (client == null) { client=Values.lazy(new Value<ManagedClient>(){ @Override public ManagedClient get(){ final String prefix=binding.getAnnotation().annotationType().getName() + "."; final String baseUriProperty=prefix + "baseUri"; final Object bu=serverConfig.get().getProperty(baseUriProperty); final String customBaseUri=(bu != null) ? bu.toString() : binding.baseUri(); final String configClassProperty=prefix + "configClass"; final ClientConfig cfg=resolveConfig(configClassProperty,binding); final String inheritProvidersProperty=prefix + "inheritServerProviders"; if (PropertiesHelper.isProperty(serverConfig.get().getProperty(inheritProvidersProperty)) || binding.inheritProviders()) { copyProviders(serverConfig.get(),cfg); } final String propertyPrefix=prefix + "property."; Collection<String> clientProperties=serverConfig.get().getPropertyNames().stream().filter(property -> property.startsWith(propertyPrefix)).collect(Collectors.toSet()); for ( String property : clientProperties) { cfg.property(property.substring(propertyPrefix.length()),serverConfig.get().getProperty(property)); } return new ManagedClient(ClientBuilder.newClient(cfg),customBaseUri); } } ); final Value<ManagedClient> previous=managedClients.putIfAbsent(binding,client); if (previous != null) { client=previous; } } return new WebTargetValueSupplier(targetUriTemplate,client,requestProvider); } else { Errors.warning(this,LocalizationMessages.UNSUPPORTED_URI_INJECTION_TYPE(rawParameterType)); return null; } } }
to
{ @Override public Function<ContainerRequest,?> call(){ String targetUriTemplate=parameter.getSourceName(); if (targetUriTemplate == null || targetUriTemplate.length() == 0) { Errors.warning(this,LocalizationMessages.INJECTED_WEBTARGET_URI_INVALID(targetUriTemplate)); return null; } final Class<?> rawParameterType=parameter.getRawType(); if (rawParameterType == WebTarget.class) { final BindingModel binding=BindingModel.create(Arrays.<Annotation>asList(parameter.getAnnotations())); Value<ManagedClient> client=managedClients.get(binding); if (client == null) { client=Values.lazy(new Value<ManagedClient>(){ @Override public ManagedClient get(){ final String prefix=binding.getAnnotation().annotationType().getName() + "."; final String baseUriProperty=prefix + "baseUri"; final Object bu=serverConfig.get().getProperty(baseUriProperty); final String customBaseUri=(bu != null) ? bu.toString() : binding.baseUri(); final String configClassProperty=prefix + "configClass"; final ClientConfig cfg=resolveConfig(configClassProperty,binding); final String inheritProvidersProperty=prefix + "inheritServerProviders"; if (PropertiesHelper.isProperty(serverConfig.get().getProperty(inheritProvidersProperty)) || binding.inheritProviders()) { copyProviders(serverConfig.get(),cfg); } final String propertyPrefix=prefix + "property."; Collection<String> clientProperties=serverConfig.get().getPropertyNames().stream().filter(property -> property.startsWith(propertyPrefix)).collect(Collectors.toSet()); for ( String property : clientProperties) { cfg.property(property.substring(propertyPrefix.length()),serverConfig.get().getProperty(property)); } return new ManagedClient(ClientBuilder.newClient(cfg),customBaseUri); } } ); final Value<ManagedClient> previous=managedClients.putIfAbsent(binding,client); if (previous != null) { client=previous; } } return new WebTargetValueSupplier(targetUriTemplate,client); } else { Errors.warning(this,LocalizationMessages.UNSUPPORTED_URI_INJECTION_TYPE(rawParameterType)); return null; } } }