From 5f18f7d925e9c0caedb48bd4d65845dfbd691ee8 Mon Sep 17 00:00:00 2001 From: Axel Uhl Date: Mon, 14 Apr 2025 14:46:27 +0200 Subject: [PATCH] help Eclipse 2025-03 to still compile our code with Java 8; there seem to be some issues with inferring generic type arguments in Eclipse 2025-03, as compared to 2024-09. Minor changes regarding explicit mention of type parameters seem to help avoid these errors. --- .../domain/persistence/impl/DomainObjectFactoryImpl.java | 4 ++-- .../evaluation/WindEstimationEvaluatorImpl.java | 2 +- .../evaluation/WindEstimatorEvaluationRunner.java | 2 +- .../ParallelGroupedNumberPairAverageAggregationProcessor.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/DomainObjectFactoryImpl.java b/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/DomainObjectFactoryImpl.java index e7b856635b8..f7ee5cb0065 100644 --- a/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/DomainObjectFactoryImpl.java +++ b/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/impl/DomainObjectFactoryImpl.java @@ -1398,7 +1398,7 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory { final RankingMetricConstructor rankingMetricConstructor = loadRankingMetricConstructor(dbRegatta); String registrationLinkSecret = (String) dbRegatta.get(FieldNames.REGATTA_REGISTRATION_LINK_SECRET.name()); if (createMigratableRegatta) { - result = new MigratableRegattaImpl(getRaceLogStore(), getRegattaLogStore(), name, boatClass, + result = new MigratableRegattaImpl(getRaceLogStore(), getRegattaLogStore(), name, boatClass, canBoatsOfCompetitorsChangePerRace, competitorRegistrationType, startDate, endDate, series, /* persistent */true, loadScoringScheme(dbRegatta), id, courseAreas, buoyZoneRadiusInHullLengths == null ? Regatta.DEFAULT_BUOY_ZONE_RADIUS_IN_HULL_LENGTHS @@ -1408,7 +1408,7 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory { autoRestartTrackingUponCompetitorSetChange == null ? false : autoRestartTrackingUponCompetitorSetChange, rankingMetricConstructor, new MongoObjectFactoryImpl(database), registrationLinkSecret); } else { - result = new RegattaImpl(getRaceLogStore(), getRegattaLogStore(), name, boatClass, + result = new RegattaImpl(getRaceLogStore(), getRegattaLogStore(), name, boatClass, canBoatsOfCompetitorsChangePerRace, competitorRegistrationType, startDate, endDate, series, /* persistent */true, loadScoringScheme(dbRegatta), id, courseAreas, buoyZoneRadiusInHullLengths == null ? Regatta.DEFAULT_BUOY_ZONE_RADIUS_IN_HULL_LENGTHS diff --git a/java/com.sap.sailing.windestimation.lab/src/com/sap/sailing/windestimation/evaluation/WindEstimationEvaluatorImpl.java b/java/com.sap.sailing.windestimation.lab/src/com/sap/sailing/windestimation/evaluation/WindEstimationEvaluatorImpl.java index cfa617d552b..c4d3ab3c80c 100644 --- a/java/com.sap.sailing.windestimation.lab/src/com/sap/sailing/windestimation/evaluation/WindEstimationEvaluatorImpl.java +++ b/java/com.sap.sailing.windestimation.lab/src/com/sap/sailing/windestimation/evaluation/WindEstimationEvaluatorImpl.java @@ -100,7 +100,7 @@ public class WindEstimationEvaluatorImpl implements WindEstimationEvaluator competitorTrack.getElements().size()) .sum() >= minManeuversPerRace); if (randomClipping) { - RaceWithRandomClippingPreprocessingPipelineImpl clippingPipeline = new RaceWithRandomClippingPreprocessingPipelineImpl<>( + RaceWithRandomClippingPreprocessingPipelineImpl clippingPipeline = new RaceWithRandomClippingPreprocessingPipelineImpl( new DummyRacePreprocessingPipelineImpl<>(), fixedNumberOfManeuvers == null ? 1 : fixedNumberOfManeuvers, fixedNumberOfManeuvers == null ? Integer.MAX_VALUE : fixedNumberOfManeuvers, evaluationPerCompetitorTrack); preprocessingStream = preprocessingStream diff --git a/java/com.sap.sailing.windestimation.lab/src/com/sap/sailing/windestimation/evaluation/WindEstimatorEvaluationRunner.java b/java/com.sap.sailing.windestimation.lab/src/com/sap/sailing/windestimation/evaluation/WindEstimatorEvaluationRunner.java index 88310ac8445..e994df7c089 100644 --- a/java/com.sap.sailing.windestimation.lab/src/com/sap/sailing/windestimation/evaluation/WindEstimatorEvaluationRunner.java +++ b/java/com.sap.sailing.windestimation.lab/src/com/sap/sailing/windestimation/evaluation/WindEstimatorEvaluationRunner.java @@ -29,7 +29,7 @@ public class WindEstimatorEvaluationRunner { private static final EvaluatableWindEstimationImplementation WIND_ESTIMATION_IMPLEMENTATION = EvaluatableWindEstimationImplementation.MST_HMM; public static void main(String[] args) throws Exception { - WindEstimationEvaluator evaluator = new WindEstimationEvaluatorImpl<>( + WindEstimationEvaluator evaluator = new WindEstimationEvaluatorImpl( MAX_TWD_DEVIATION_DEG, MAX_TWS_DEVIATION_PERCENT, MIN_CORRECT_ESTIMATIONS_RATIO_FOR_CORRECT_RACE, EVALUATE_PER_COMPETITOR_TRACK, FIXED_NUMBER_OF_MANEUVERS == null ? 1 : FIXED_NUMBER_OF_MANEUVERS, RANDOM_CLIPPING_OF_COMPETITOR_TRACKS, FIXED_NUMBER_OF_MANEUVERS); diff --git a/java/com.sap.sse.datamining/src/com/sap/sse/datamining/impl/components/aggregators/ParallelGroupedNumberPairAverageAggregationProcessor.java b/java/com.sap.sse.datamining/src/com/sap/sse/datamining/impl/components/aggregators/ParallelGroupedNumberPairAverageAggregationProcessor.java index b3a484735ed..b7f87abcf4a 100644 --- a/java/com.sap.sse.datamining/src/com/sap/sse/datamining/impl/components/aggregators/ParallelGroupedNumberPairAverageAggregationProcessor.java +++ b/java/com.sap.sse.datamining/src/com/sap/sse/datamining/impl/components/aggregators/ParallelGroupedNumberPairAverageAggregationProcessor.java @@ -94,7 +94,7 @@ public class ParallelGroupedNumberPairAverageAggregationProcessor break; } GroupKey key = sumAggregationEntry.getKey(); - result.put(key, new PairWithStatsImpl(new Pair<>(sumAggregationEntry.getValue().getA() != null ? sumAggregationEntry.getValue().getA().doubleValue() / elementAmountPerKey.get(key).get() : null, sumAggregationEntry.getValue().getB() != null ? sumAggregationEntry.getValue().getB().doubleValue() / elementAmountPerKey.get(key).get() : null) , + result.put(key, new PairWithStatsImpl(new Pair(sumAggregationEntry.getValue().getA() != null ? sumAggregationEntry.getValue().getA().doubleValue() / elementAmountPerKey.get(key).get() : null, sumAggregationEntry.getValue().getB() != null ? sumAggregationEntry.getValue().getB().doubleValue() / elementAmountPerKey.get(key).get() : null) , minPerKey.get(key), maxPerKey.get(key), /* median */ null, /* standardDeviation */ null,