gamars/liferay-portal — comment on commit e079cbdeb7ada65033de9578119c9c15998727a2
File: portal-service/src/com/liferay/portal/kernel/search/SearchEngineUtil.java line 64
By rotty3000:

- Only place lines together that perform operations on the same object.
- All log statements should be wrapped with a if (level enabled) check unless it's an error being thrown in a catch block
- as much as possible avoid compound statements (i.e. `IndexerRegistryUtil.getIndexer(document.get("entryClassName"))`)

```java
String entryClassName = document.get("entryClassName");

Indexer indexer = IndexerRegistryUtil.getIndexer(entryClassName);

String searchEngineId = indexer.getSearchEngineId();

if (_log.isDebugEnabled()) {
_log.debug("SearchEngineId for [" + indexer.getClass() + "] is: " + searchEngineId);
}

return searchEngineId;
```

Note also that there should always be spaces between operands like + && || etc.