create message only when doing debug

This commit is contained in:
Maxim.Mossienko
2016-04-14 10:02:06 +02:00
parent 2c0442201c
commit da879c0e5c
@@ -93,8 +93,11 @@ public class MemoryIndexStorage<Key, Value> implements IndexStorage<Key, Value>
void clearCaches() {
if (myMap.size() == 0) return;
String message = "Dropping caches for " + (myIndexId != null ? myIndexId:this) + ", number of items:" + myMap.size();
if (DebugAssertions.DEBUG) FileBasedIndexImpl.LOG.info(message);
if (DebugAssertions.DEBUG) {
String message = "Dropping caches for " + (myIndexId != null ? myIndexId:this) + ", number of items:" + myMap.size();
FileBasedIndexImpl.LOG.info(message);
}
for(ChangeTrackingValueContainer<Value> v:myMap.values()) {
v.dropMergedData();