DATAMONGO-635 - Fixed some Sonar warnings.
This commit is contained in:
@@ -832,7 +832,7 @@ public class MappingMongoConverter extends AbstractMongoConverter implements App
|
|||||||
return conversionService.convert(obj, target);
|
return conversionService.convert(obj, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (null != obj && conversions.isSimpleType(obj.getClass())) {
|
if (conversions.isSimpleType(obj.getClass())) {
|
||||||
// Doesn't need conversion
|
// Doesn't need conversion
|
||||||
return getPotentiallyConvertedSimpleWrite(obj);
|
return getPotentiallyConvertedSimpleWrite(obj);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -264,7 +264,13 @@ public abstract class AbstractMongoQuery implements RepositoryQuery {
|
|||||||
private boolean isListOfGeoResult() {
|
private boolean isListOfGeoResult() {
|
||||||
|
|
||||||
TypeInformation<?> returnType = method.getReturnType();
|
TypeInformation<?> returnType = method.getReturnType();
|
||||||
return returnType.getType().equals(List.class) && GeoResult.class.equals(returnType.getComponentType());
|
|
||||||
|
if (!returnType.getType().equals(List.class)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
TypeInformation<?> componentType = returnType.getComponentType();
|
||||||
|
return componentType == null ? false : GeoResult.class.equals(componentType.getType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user