Cleanup: use Java17 switch statements.

AndroidStudio code cleanup.
This commit is contained in:
Dennis Guse
2023-04-13 14:52:20 +02:00
parent 3a8e547e10
commit efddb31391
30 changed files with 355 additions and 640 deletions
@@ -210,16 +210,11 @@ abstract class ChartValueSeries {
}
int getTitleId(UnitSystem unitSystem) {
switch (unitSystem) {
case METRIC:
return metricTitleId;
case IMPERIAL:
return imperialTitleId;
case NAUTICAL_IMPERIAL:
return nauticalTitleId;
default:
throw new RuntimeException("Not implemented");
}
return switch (unitSystem) {
case METRIC -> metricTitleId;
case IMPERIAL -> imperialTitleId;
case NAUTICAL_IMPERIAL -> nauticalTitleId;
};
}
Paint getTitlePaint() {