2

Hi all I´m struggling migrating from Jersey 2.25 to 2.26 since, it has a break change in a internal class of the library AbstractContainerRequestValueFactory

They claim in the issue sections that since the package is internal it should not be used. But they dont offer a solution or workaround.

Any idea how can I replace the use of that class for something else to continue using the provide implementation as I´ve been doing so far?

class MyOwnFactory extends AbstractContainerRequestValueFactory[Future[Object]] {
  override def provide: Future[Object] = getContainerRequest.getProperty(Constants.individual).asInstanceOf[Future[Object]]
}
Paul Samsotha
  • 197,959
  • 33
  • 457
  • 689
paul
  • 11,696
  • 19
  • 81
  • 134

1 Answers1

1

The equivalent would be to use a Supplier and inject the ContainerRequest, as the Supplier replaces the HK2 Factory and all AbstractContainerRequestValueFactory is is an HK2 Factory that injects the Provider<ContainerRequest>. Just look at the source

See also:

Paul Samsotha
  • 197,959
  • 33
  • 457
  • 689