mirror of https://github.com/apache/lucene.git
SOLR-9134: Fix RestManager.addManagedResource return value.
This commit is contained in:
parent
a35057fff2
commit
1b809e784a
|
@ -229,6 +229,8 @@ Bug Fixes
|
|||
* SOLR-8801: /bin/solr create script always returns exit code 0 when a collection/core already exists.
|
||||
(Khalid Alharbi, Marius Grama via Steve Rowe)
|
||||
|
||||
* SOLR-9134: Fix RestManager.addManagedResource return value. (Christine Poerschke)
|
||||
|
||||
Optimizations
|
||||
----------------------
|
||||
* SOLR-8722: Don't force a full ZkStateReader refresh on every Overseer operation.
|
||||
|
|
|
@ -647,11 +647,11 @@ public class RestManager {
|
|||
* Restlet router. Returns the corresponding instance.
|
||||
*/
|
||||
public synchronized ManagedResource addManagedResource(String resourceId, Class<? extends ManagedResource> clazz) {
|
||||
ManagedResource res = null;
|
||||
ManagedResourceRegistration existingReg = registry.registered.get(resourceId);
|
||||
final ManagedResource res;
|
||||
final ManagedResourceRegistration existingReg = registry.registered.get(resourceId);
|
||||
if (existingReg == null) {
|
||||
registry.registerManagedResource(resourceId, clazz, null);
|
||||
addRegisteredResource(registry.registered.get(resourceId));
|
||||
res = addRegisteredResource(registry.registered.get(resourceId));
|
||||
} else {
|
||||
res = getManagedResource(resourceId);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue