mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-22 21:55:39 +00:00
Bug 5085: Removed code duplications
This commit is contained in:
+2
-4
@@ -173,8 +173,7 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory {
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
// TODO copy of com.sap.sailing.domain.persistence.impl.DomainObjectFactoryImpl
|
||||
private DeviceIdentifier loadDeviceId(
|
||||
public static DeviceIdentifier loadDeviceId(
|
||||
TypeBasedServiceFinder<DeviceIdentifierMongoHandler> deviceIdentifierServiceFinder, Document deviceId)
|
||||
throws TransformationException, NoCorrespondingServiceRegisteredException {
|
||||
String deviceType = (String) deviceId.get(FieldNames.DEVICE_TYPE.name());
|
||||
@@ -190,8 +189,7 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO copy of com.sap.sailing.domain.persistence.impl.DomainObjectFactoryImpl
|
||||
public Position loadPosition(Document object) {
|
||||
public static Position loadPosition(Document object) {
|
||||
Number latNumber = (Number) object.get(FieldNames.LAT_DEG.name());
|
||||
Double lat = latNumber == null ? null : latNumber.doubleValue();
|
||||
Number lngNumber = (Number) object.get(FieldNames.LNG_DEG.name());
|
||||
|
||||
+1
-2
@@ -267,8 +267,7 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
|
||||
return waypointTemplateObject;
|
||||
}
|
||||
|
||||
// TODO copy of com.sap.sailing.domain.persistence.impl.MongoObjectFactoryImpl
|
||||
private String getPassingInstructions(PassingInstruction passingInstructions) {
|
||||
public static String getPassingInstructions(PassingInstruction passingInstructions) {
|
||||
final String passing;
|
||||
if (passingInstructions != null) {
|
||||
passing = passingInstructions.name();
|
||||
|
||||
Reference in New Issue
Block a user