DATADOC-270 - Removed critical Sonar warnings from codebase.
This commit is contained in:
@@ -35,10 +35,10 @@ public class CannotGetMongoDbConnectionException extends DataAccessResourceFailu
|
||||
super(msg);
|
||||
}
|
||||
|
||||
public CannotGetMongoDbConnectionException(String msg, String database, String username, char[] password2) {
|
||||
public CannotGetMongoDbConnectionException(String msg, String database, String username, char[] password) {
|
||||
super(msg);
|
||||
this.username = username;
|
||||
this.password = password2;
|
||||
this.password = password == null ? null : password.clone();
|
||||
this.database = database;
|
||||
}
|
||||
|
||||
|
||||
@@ -866,7 +866,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
|
||||
} else {
|
||||
commandResult = executeCommand(commandObject);
|
||||
}
|
||||
commandResult.throwOnError();
|
||||
commandResult.throwOnError();
|
||||
} catch (RuntimeException ex) {
|
||||
this.potentiallyConvertRuntimeException(ex);
|
||||
}
|
||||
@@ -1277,7 +1277,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
|
||||
|
||||
if (entityClass == null) {
|
||||
throw new InvalidDataAccessApiUsageException(
|
||||
"No class parameter provided, entity collection can't be determined for " + entityClass);
|
||||
"No class parameter provided, entity collection can't be determined!");
|
||||
}
|
||||
|
||||
MongoPersistentEntity<?> entity = mappingContext.getPersistentEntity(entityClass);
|
||||
|
||||
@@ -100,9 +100,8 @@ public class QueryMapper {
|
||||
newConditions.add(getMappedObject((DBObject) iter.next(), entity));
|
||||
}
|
||||
value = newConditions;
|
||||
} else {
|
||||
// TODO: Implement other forms of conversion (like @Alias and whatnot)
|
||||
}
|
||||
|
||||
newDbo.put(newKey, value);
|
||||
}
|
||||
return newDbo;
|
||||
|
||||
@@ -200,7 +200,7 @@ public class MappingMongoConverter extends AbstractMongoConverter implements App
|
||||
spelCtx.setBeanResolver(new BeanFactoryResolver(applicationContext));
|
||||
}
|
||||
if (!(dbo instanceof BasicDBList)) {
|
||||
String[] keySet = dbo.keySet().toArray(new String[] {});
|
||||
String[] keySet = dbo.keySet().toArray(new String[dbo.keySet().size()]);
|
||||
for (String key : keySet) {
|
||||
spelCtx.setVariable(key, dbo.get(key));
|
||||
}
|
||||
|
||||
@@ -51,6 +51,6 @@ public class Circle {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("Circle [center=%s, radius=%d]", center, radius);
|
||||
return String.format("Circle [center=%s, radius=%f]", center, radius);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public class OrCriteria implements CriteriaDefinition {
|
||||
|
||||
public OrCriteria(Query[] queries) {
|
||||
super();
|
||||
this.queries = queries;
|
||||
this.queries = queries == null ? null : queries.clone();
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user