DATAMONGO-1337 - General code quality improvements.

A round of code polish regarding the PMD and Squid rules referred to in the ticket.

Original pull request: #336.
This commit is contained in:
Christian Ivan
2015-11-26 14:49:09 +07:00
committed by Oliver Gierke
parent eeb37e9104
commit 1d1c80db7b
11 changed files with 17 additions and 17 deletions

View File

@@ -160,7 +160,7 @@ public class MongoLog4jAppender extends AppenderSkeleton {
// Copy properties into document
Map<Object, Object> props = event.getProperties();
if (null != props && props.size() > 0) {
if (null != props && !props.isEmpty()) {
BasicDBObject propsDbo = new BasicDBObject();
for (Map.Entry<Object, Object> entry : props.entrySet()) {
propsDbo.put(entry.getKey().toString(), entry.getValue().toString());

View File

@@ -39,7 +39,7 @@ public class MongoLog4jAppenderIntegrationTests {
static final String NAME = MongoLog4jAppenderIntegrationTests.class.getName();
Logger log = Logger.getLogger(NAME);
private static final Logger log = Logger.getLogger(NAME);
Mongo mongo;
DB db;
String collection;