throw new IllegalStateException("A singleton component instance has already been created for bean: " + this.getComponentName());
}
return super.createInstance();
}
@Override
<BUG>protected synchronized BasicComponentInstance constructComponentInstance(Object instance, InterceptorFactoryContext context) {
if (this.singletonComponentInstance != null) {</BUG>
throw new IllegalStateException("A singleton component instance has already been created for bean: " + this.getComponentName());
}
<BUG>this.singletonComponentInstance = new SingletonComponentInstance(this, instance, context);
return this.singletonComponentInstance;</BUG>
}

throw new IllegalStateException("A singleton component instance has already been created for bean: " + this.getComponentName());
}
return super.createInstance();
}
@Override
protected BasicComponentInstance constructComponentInstance() {
if (this.singletonComponentInstance != null) {
throw new IllegalStateException("A singleton component instance has already been created for bean: " + this.getComponentName());
}
this.singletonComponentInstance = new SingletonComponentInstance(this);
return this.singletonComponentInstance;
}
