Skip to content

Commit e753b07

Browse files
authored
Add java 8 support in compile and test (#304)
* add java 8 support in compile and test Signed-off-by: Zhongnan Su <[email protected]>
1 parent 265e2a7 commit e753b07

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.github/workflows/reports-scheduler-test-and-build-workflow.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
strategy:
1111
matrix:
1212
java:
13+
- 8
1314
- 11
1415
- 14
1516
runs-on: ubuntu-latest

reports-scheduler/src/main/kotlin/org/opensearch/reportsscheduler/settings/PluginSettings.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import org.opensearch.common.settings.Settings
1515
import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX
1616
import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.PLUGIN_NAME
1717
import java.io.IOException
18-
import java.nio.file.Path
18+
import java.nio.file.Paths
1919

2020
/**
2121
* settings specific to reports scheduler Plugin.
@@ -93,9 +93,9 @@ internal object PluginSettings {
9393

9494
init {
9595
var settings: Settings? = null
96-
val configDirName = BootstrapInfo.getSystemProperties()?.get("es.path.conf")?.toString()
96+
val configDirName = BootstrapInfo.getSystemProperties()?.get("opensearch.path.conf")?.toString()
9797
if (configDirName != null) {
98-
val defaultSettingYmlFile = Path.of(configDirName, PLUGIN_NAME, "reports-scheduler.yml")
98+
val defaultSettingYmlFile = Paths.get(configDirName, PLUGIN_NAME, "reports-scheduler.yml")
9999
try {
100100
settings = Settings.builder().loadFromPath(defaultSettingYmlFile).build()
101101
} catch (exception: IOException) {

reports-scheduler/src/test/kotlin/org/opensearch/integTest/PluginRestTestCase.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import java.io.IOException
3939
import java.io.InputStreamReader
4040
import java.nio.charset.StandardCharsets
4141
import java.nio.file.Files
42-
import java.nio.file.Path
42+
import java.nio.file.Paths
4343
import java.security.cert.X509Certificate
4444
import javax.management.MBeanServerInvocationHandler
4545
import javax.management.ObjectName
@@ -265,7 +265,7 @@ abstract class PluginRestTestCase : OpenSearchRestTestCase() {
265265
false
266266
)
267267
proxy.getExecutionData(false)?.let {
268-
val path = Path.of("$jacocoBuildPath/integTest.exec")
268+
val path = Paths.get("$jacocoBuildPath/integTest.exec")
269269
Files.write(path, it)
270270
}
271271
}

0 commit comments

Comments
 (0)