mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-17 01:31:01 +00:00
Fixed several compiler warnings
This commit is contained in:
1 parent
97782122ef
commit
be867b1ed1
3 files changed
+14
-2
No files matched your search
+6
-1
@@ -53,7 +53,7 @@ public class MongoSensorFixStoreImpl implements MongoSensorFixStore {
|
||||
DomainObjectFactory domainObjectFactory, TypeBasedServiceFinderFactory serviceFinderFactory) {
|
||||
mongoOF = (MongoObjectFactoryImpl) mongoObjectFactory;
|
||||
if (serviceFinderFactory != null) {
|
||||
fixServiceFinder = (TypeBasedServiceFinder) serviceFinderFactory.createServiceFinder(FixMongoHandler.class);
|
||||
fixServiceFinder = createFixServiceFinder(serviceFinderFactory);
|
||||
deviceServiceFinder = serviceFinderFactory.createServiceFinder(DeviceIdentifierMongoHandler.class);
|
||||
} else {
|
||||
fixServiceFinder = null;
|
||||
@@ -63,6 +63,11 @@ public class MongoSensorFixStoreImpl implements MongoSensorFixStore {
|
||||
metadataCollection = mongoOF.getGPSFixMetadataCollection();
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
private TypeBasedServiceFinder<FixMongoHandler<?>> createFixServiceFinder(TypeBasedServiceFinderFactory serviceFinderFactory) {
|
||||
return (TypeBasedServiceFinder) serviceFinderFactory.createServiceFinder(FixMongoHandler.class);
|
||||
}
|
||||
|
||||
public <T extends Timed> T loadGPSFix(DBObject object) throws TransformationException, NoCorrespondingServiceRegisteredException {
|
||||
String type = (String) object.get(FieldNames.GPSFIX_TYPE.name());
|
||||
DBObject fixObject = (DBObject) object.get(FieldNames.GPSFIX.name());
|
||||
|
||||
+6
-1
@@ -88,7 +88,7 @@ public class Activator implements BundleActivator {
|
||||
new MasterDataImportClassLoaderServiceImpl(), null));
|
||||
registrations.add(context.registerService(SensorFixMapper.class, new BravoDataFixMapper(), null));
|
||||
|
||||
sensorFixMapperTracker = (ServiceTracker) ServiceTrackerFactory.createAndOpen(context, SensorFixMapper.class);
|
||||
sensorFixMapperTracker = createSensorFixMapperServiceTracker(context);
|
||||
racingEventServiceTracker = ServiceTrackerFactory.createAndOpen(context, RacingEventService.class);
|
||||
|
||||
RegattaLogFixTrackerRegattaListener regattaLogSensorDataTrackerTrackedRegattaListener = new RegattaLogFixTrackerRegattaListener(
|
||||
@@ -101,6 +101,11 @@ public class Activator implements BundleActivator {
|
||||
logger.log(Level.INFO, "Started "+context.getBundle().getSymbolicName());
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
private ServiceTracker<SensorFixMapper<?, ?, ?>, SensorFixMapper<?, ?, ?>> createSensorFixMapperServiceTracker(BundleContext context) {
|
||||
return (ServiceTracker) ServiceTrackerFactory.createAndOpen(context, SensorFixMapper.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
Activator.context = null;
|
||||
|
||||
+2
@@ -260,6 +260,7 @@ public class RaceLogFixTracker implements TrackingDataLoader {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void visit(RegattaLogDeviceCompetitorMappingEvent event) {
|
||||
DynamicGPSFixTrack<Competitor, GPSFixMoving> track = trackedRace.getTrack(event.getMappedTo());
|
||||
@@ -272,6 +273,7 @@ public class RaceLogFixTracker implements TrackingDataLoader {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@Override
|
||||
public void visit(RegattaLogDeviceMarkMappingEvent event) {
|
||||
DynamicGPSFixTrack<Mark, GPSFix> track = trackedRace.getOrCreateTrack(event.getMappedTo());
|
||||
|
||||
Reference in new issue
Block a user