Skip to content

Commit

Permalink
Add java 8 support in compile and test (#304)
Browse files Browse the repository at this point in the history
* add java 8 support in compile and test

Signed-off-by: Zhongnan Su <szhongna@amazon.com>
  • Loading branch information
zhongnansu committed Mar 10, 2022
1 parent 265e2a7 commit e753b07
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
strategy:
matrix:
java:
- 8
- 11
- 14
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import org.opensearch.common.settings.Settings
import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX
import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.PLUGIN_NAME
import java.io.IOException
import java.nio.file.Path
import java.nio.file.Paths

/**
* settings specific to reports scheduler Plugin.
Expand Down Expand Up @@ -93,9 +93,9 @@ internal object PluginSettings {

init {
var settings: Settings? = null
val configDirName = BootstrapInfo.getSystemProperties()?.get("es.path.conf")?.toString()
val configDirName = BootstrapInfo.getSystemProperties()?.get("opensearch.path.conf")?.toString()
if (configDirName != null) {
val defaultSettingYmlFile = Path.of(configDirName, PLUGIN_NAME, "reports-scheduler.yml")
val defaultSettingYmlFile = Paths.get(configDirName, PLUGIN_NAME, "reports-scheduler.yml")
try {
settings = Settings.builder().loadFromPath(defaultSettingYmlFile).build()
} catch (exception: IOException) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import java.io.IOException
import java.io.InputStreamReader
import java.nio.charset.StandardCharsets
import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.Paths
import java.security.cert.X509Certificate
import javax.management.MBeanServerInvocationHandler
import javax.management.ObjectName
Expand Down Expand Up @@ -265,7 +265,7 @@ abstract class PluginRestTestCase : OpenSearchRestTestCase() {
false
)
proxy.getExecutionData(false)?.let {
val path = Path.of("$jacocoBuildPath/integTest.exec")
val path = Paths.get("$jacocoBuildPath/integTest.exec")
Files.write(path, it)
}
}
Expand Down

0 comments on commit e753b07

Please sign in to comment.