Skip to content
Permalink
Browse files

[FIXED JENKINS-33772] ID was not sufficiently unique for SezpozModule…

…; use an ID based on the actual annotated element.
  • Loading branch information...
jglick committed Mar 28, 2016
1 parent 6219c8f commit 1a28593f0922f0a662e475f816f9a194d563c521
Showing with 2 additions and 5 deletions.
  1. +2 −5 core/src/main/java/hudson/ExtensionFinder.java
@@ -496,10 +496,7 @@ private void resolve(Class c) {
@SuppressWarnings({"unchecked", "ChainOfInstanceofChecks"})
@Override
protected void configure() {
int id=0;

for (final IndexItem<?,Object> item : index) {
id++;
boolean optional = isOptional(item.annotation());
try {
AnnotatedElement e = item.element();
@@ -524,8 +521,8 @@ protected void configure() {

resolve(extType);

// use arbitrary id to make unique key, because Guice wants that.
Key key = Key.get(extType, Names.named(String.valueOf(id)));
// make unique key, because Guice wants that.
Key key = Key.get(extType, Names.named(item.className() + "." + item.memberName()));
annotations.put(key,a);
bind(key).toProvider(new Provider() {
public Object get() {

0 comments on commit 1a28593

Please sign in to comment.
You can’t perform that action at this time.