Skip to content
Permalink
Browse files

Merge pull request #2183 from jglick/SezpozModule-unique-ID-JENKINS-3…

…3772

[JENKINS-33772] ID was not sufficiently unique for SezpozModule
  • Loading branch information...
jglick committed Mar 29, 2016
2 parents 62d0e0c + 1a28593 commit 52bb33242532c612c907bd4c2b3e52fa66baa471
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 52bb332

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