Skip to content

Commit e9ffbd1

Browse files
authored
Remove redundant import and else statement (#48352)
In #48209 PR unused import and redundant else statements were missed. This commit cleans this up
1 parent e7abb68 commit e9ffbd1

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,8 @@ class BuildPlugin implements Plugin<Project> {
827827
} else {
828828
nonInputProperties.systemProperty('runtime.java', "${-> (ext.get('runtimeJavaVersion') as JavaVersion).getMajorVersion()}")
829829
}
830+
//TODO remove once jvm.options are added to test system properties
831+
test.systemProperty ('java.locale.providers','SPI,COMPAT')
830832
}
831833

832834
test.jvmArgumentProviders.add(nonInputProperties)
@@ -861,8 +863,6 @@ class BuildPlugin implements Plugin<Project> {
861863
'tests.security.manager': 'true',
862864
'jna.nosys': 'true'
863865

864-
//TODO remove once jvm.options are added to test system properties
865-
test.systemProperty ('java.locale.providers','SPI,COMPAT')
866866

867867
// ignore changing test seed when build is passed -Dignore.tests.seed for cacheability experimentation
868868
if (System.getProperty('ignore.tests.seed') != null) {

buildSrc/src/main/groovy/org/elasticsearch/gradle/test/RestIntegTestTask.groovy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import org.elasticsearch.gradle.testclusters.RestTestRunnerTask
2424
import org.elasticsearch.gradle.tool.Boilerplate
2525
import org.elasticsearch.gradle.tool.ClasspathUtils
2626
import org.gradle.api.DefaultTask
27-
import org.gradle.api.JavaVersion
2827
import org.gradle.api.Task
2928
import org.gradle.api.file.FileCopyDetails
3029
import org.gradle.api.tasks.Copy

server/src/main/java/org/elasticsearch/common/time/DateFormatters.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1931,7 +1931,7 @@ private static LocalDate getLocalDate(TemporalAccessor accessor) {
19311931
} else {
19321932
return LocalDate.of(year, accessor.get(MONTH_OF_YEAR), 1);
19331933
}
1934-
} else
1934+
}
19351935

19361936
return LOCALDATE_EPOCH;
19371937
}
@@ -1943,7 +1943,6 @@ private static int getYear(TemporalAccessor accessor) {
19431943
if(accessor.isSupported(ChronoField.YEAR_OF_ERA)){
19441944
return accessor.get(ChronoField.YEAR_OF_ERA);
19451945
}
1946-
19471946
return 1970;
19481947
}
19491948

server/src/test/java/org/elasticsearch/common/time/DateFormattersTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ public void testWeekBasedDates() {
6565
equalTo(ZonedDateTime.of(2014,12,29, 0,0,0,0,ZoneOffset.UTC)));
6666
}
6767

68-
6968
// this is not in the duelling tests, because the epoch millis parser in joda time drops the milliseconds after the comma
7069
// but is able to parse the rest
7170
// as this feature is supported it also makes sense to make it exact

0 commit comments

Comments
 (0)