mirror of https://github.com/apache/lucene.git
test logging: key by hashCode
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1484795 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
697133b10f
commit
2e716bad60
|
@ -81,15 +81,7 @@ public class SolrLogLayout extends Layout {
|
|||
Map<String,Object> coreProps;
|
||||
}
|
||||
|
||||
Map<SolrCore,CoreInfo> coreInfoMap = new WeakHashMap<SolrCore,CoreInfo>(); // TODO:
|
||||
// use
|
||||
// something
|
||||
// that
|
||||
// survives
|
||||
// across
|
||||
// a
|
||||
// core
|
||||
// reload?
|
||||
Map<Integer,CoreInfo> coreInfoMap = new WeakHashMap<Integer,CoreInfo>();
|
||||
|
||||
public Map<String,String> classAliases = new HashMap<String,String>();
|
||||
|
||||
|
@ -145,11 +137,11 @@ public class SolrLogLayout extends Layout {
|
|||
CoreInfo info = null;
|
||||
|
||||
if (core != null) {
|
||||
info = coreInfoMap.get(core);
|
||||
info = coreInfoMap.get(core.hashCode());
|
||||
if (info == null) {
|
||||
info = new CoreInfo();
|
||||
info.shortId = "C" + Integer.toString(CoreInfo.maxCoreNum++);
|
||||
coreInfoMap.put(core, info);
|
||||
coreInfoMap.put(core.hashCode(), info);
|
||||
|
||||
if (sb.length() == 0) sb.append("ASYNC ");
|
||||
sb.append(" NEW_CORE " + info.shortId);
|
||||
|
|
Loading…
Reference in New Issue