SOLR-5281: IndexSchema log message was printing '[null]' instead of '[<core name>]'

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1526972 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Steven Rowe 2013-09-27 16:15:11 +00:00
parent b00def795a
commit 60479b32b0
2 changed files with 5 additions and 1 deletions

View File

@ -81,6 +81,9 @@ Bug Fixes
----------------------
* SOLR-4590: Collections API should return a nice error when not in SolrCloud mode.
(Anshum Gupta, Mark Miller)
* SOLR-5281: IndexSchema log message was printing '[null]' instead of
'[<core name>]' (Jun Ohtani via Steve Rowe)
Security
----------------------

View File

@ -107,6 +107,7 @@ public class IndexSchema {
private static final String AT = "@";
private static final String DESTINATION_DYNAMIC_BASE = "destDynamicBase";
private static final String MAX_CHARS = "maxChars";
private static final String SOLR_CORE_NAME = "solr.core.name";
private static final String SOURCE_DYNAMIC_BASE = "sourceDynamicBase";
private static final String SOURCE_EXPLICIT_FIELDS = "sourceExplicitFields";
private static final String TEXT_FUNCTION = "text()";
@ -436,7 +437,7 @@ public class IndexSchema {
// Another case where the initialization from the test harness is different than the "real world"
sb.append("[");
if (loader.getCoreProperties() != null) {
sb.append(loader.getCoreProperties().getProperty(NAME));
sb.append(loader.getCoreProperties().getProperty(SOLR_CORE_NAME));
} else {
sb.append("null");
}