Recipes should use the helper method addBrowseUnsupportedRoute(builder) which was added back in 3.1.0 (sonatype/nexus-internal#976) rather than attempt to inject the handler directly and manually add the route.
This came up before with the Go format (sonatype/nexus-internal#4354) and it was noted that most of the plugins under https://github.com/sonatype-nexus-community/ needed a similar fix. Unfortunately the incorrect approach of injecting the handler directly continues to be copy-pasted around :/
This is the warning that appears at the moment:
2020-01-27 12:55:10,305-0800 WARN [FelixStartLevel] *SYSTEM com.google.inject.spi.InjectionPoint -
Method: public void org.sonatype.repository.helm.internal.HelmRecipeSupport.setBrowseUnsupportedHandler(org.sonatype.nexus.repository.view.handlers.BrowseUnsupportedHandler)
is not annotated with @Inject but is overriding a method that is annotated with @javax.inject.Inject.
Because it is not annotated with @Inject, the method will not be injected. To fix this, annotate the method with @Inject.
2020-01-27 12:55:10,308-0800 WARN [FelixStartLevel] *SYSTEM com.google.inject.spi.InjectionPoint -
Method: public void org.sonatype.repository.helm.internal.HelmRecipeSupport.setBrowseUnsupportedHandler(org.sonatype.nexus.repository.view.handlers.BrowseUnsupportedHandler)
is not annotated with @Inject but is overriding a method that is annotated with @javax.inject.Inject.
Because it is not annotated with @Inject, the method will not be injected. To fix this, annotate the method with @Inject.
2020-01-27 12:55:10,340-0800 WARN [FelixStartLevel] *SYSTEM com.google.inject.spi.InjectionPoint -
Method: public void org.sonatype.repository.helm.internal.HelmRecipeSupport.setBrowseUnsupportedHandler(org.sonatype.nexus.repository.view.handlers.BrowseUnsupportedHandler)
is not annotated with @Inject but is overriding a method that is annotated with @javax.inject.Inject.
Because it is not annotated with @Inject, the method will not be injected. To fix this, annotate the method with @Inject.
2020-01-27 12:55:10,347-0800 WARN [FelixStartLevel] *SYSTEM com.google.inject.spi.InjectionPoint -
Method: public void org.sonatype.repository.helm.internal.HelmRecipeSupport.setBrowseUnsupportedHandler(org.sonatype.nexus.repository.view.handlers.BrowseUnsupportedHandler)
is not annotated with @Inject but is overriding a method that is annotated with @javax.inject.Inject.
Because it is not annotated with @Inject, the method will not be injected. To fix this, annotate the method with @Inject.
Recipes should use the helper method
addBrowseUnsupportedRoute(builder)
which was added back in 3.1.0 (sonatype/nexus-internal#976) rather than attempt to inject the handler directly and manually add the route.This came up before with the Go format (sonatype/nexus-internal#4354) and it was noted that most of the plugins under https://github.com/sonatype-nexus-community/ needed a similar fix. Unfortunately the incorrect approach of injecting the handler directly continues to be copy-pasted around :/
This is the warning that appears at the moment: