lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cpoersc...@apache.org
Subject lucene-solr:branch_6_0: SOLR-9134: Fix RestManager.addManagedResource return value.
Date Mon, 23 May 2016 18:14:31 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6_0 3cc008253 -> 8217549a4


SOLR-9134: Fix RestManager.addManagedResource return value.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/8217549a
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/8217549a
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/8217549a

Branch: refs/heads/branch_6_0
Commit: 8217549a4385dcfc439cd024183c079b96e59f90
Parents: 3cc0082
Author: Christine Poerschke <cpoerschke@apache.org>
Authored: Mon May 23 16:22:20 2016 +0100
Committer: Christine Poerschke <cpoerschke@apache.org>
Committed: Mon May 23 19:03:03 2016 +0100

----------------------------------------------------------------------
 solr/CHANGES.txt                                         | 2 ++
 solr/core/src/java/org/apache/solr/rest/RestManager.java | 6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8217549a/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 803b55b..687ca51 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -84,6 +84,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)
+
 Other Changes
 ----------------------
 * SOLR-7516: Improve javadocs for JavaBinCodec, ObjectResolver and enforce the single-usage
policy.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8217549a/solr/core/src/java/org/apache/solr/rest/RestManager.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/rest/RestManager.java b/solr/core/src/java/org/apache/solr/rest/RestManager.java
index 1c095cb..7e3f4d4 100644
--- a/solr/core/src/java/org/apache/solr/rest/RestManager.java
+++ b/solr/core/src/java/org/apache/solr/rest/RestManager.java
@@ -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);
     }


Mime
View raw message