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.
|
* SOLR-8801: /bin/solr create script always returns exit code 0 when a collection/core already exists.
|
||||||
(Khalid Alharbi, Marius Grama via Steve Rowe)
|
(Khalid Alharbi, Marius Grama via Steve Rowe)
|
||||||
|
|
||||||
|
* SOLR-9134: Fix RestManager.addManagedResource return value. (Christine Poerschke)
|
||||||
|
|
||||||
Optimizations
|
Optimizations
|
||||||
----------------------
|
----------------------
|
||||||
* SOLR-8722: Don't force a full ZkStateReader refresh on every Overseer operation.
|
* 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.
|
* Restlet router. Returns the corresponding instance.
|
||||||
*/
|
*/
|
||||||
public synchronized ManagedResource addManagedResource(String resourceId, Class<? extends ManagedResource> clazz) {
|
public synchronized ManagedResource addManagedResource(String resourceId, Class<? extends ManagedResource> clazz) {
|
||||||
ManagedResource res = null;
|
final ManagedResource res;
|
||||||
ManagedResourceRegistration existingReg = registry.registered.get(resourceId);
|
final ManagedResourceRegistration existingReg = registry.registered.get(resourceId);
|
||||||
if (existingReg == null) {
|
if (existingReg == null) {
|
||||||
registry.registerManagedResource(resourceId, clazz, null);
|
registry.registerManagedResource(resourceId, clazz, null);
|
||||||
addRegisteredResource(registry.registered.get(resourceId));
|
res = addRegisteredResource(registry.registered.get(resourceId));
|
||||||
} else {
|
} else {
|
||||||
res = getManagedResource(resourceId);
|
res = getManagedResource(resourceId);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue