sonatype-nexus-community / nexus-repository-helm

At the Helm, Helm Yeah, v k8s
Eclipse Public License 1.0
97 stars 71 forks source link

Helm plugin logs warnings on boot #113

Closed mcculls closed 4 years ago

mcculls commented 4 years ago

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.
aornatovskyy commented 4 years ago

fixed in 1.0.2 will be included int the Nexus Repository Manager 3.21.0