Skip to content

Commit

Permalink
change to support java 8 in compile and runtime (#575)
Browse files Browse the repository at this point in the history
Signed-off-by: Zhongnan Su <[email protected]>
  • Loading branch information
zhongnansu authored Mar 11, 2022
1 parent b4f491a commit 5c43e9d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
strategy:
matrix:
java:
- 8
- 11
- 14

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.observability.ObservabilityPlugin.Companion.LOG_PREFIX
import org.opensearch.observability.ObservabilityPlugin.Companion.PLUGIN_NAME
import java.io.IOException
import java.nio.file.Path
import java.nio.file.Paths

/**
* settings specific to observability Plugin.
Expand Down Expand Up @@ -246,7 +246,7 @@ internal object PluginSettings {
var settings: Settings? = null
val configDirName = BootstrapInfo.getSystemProperties()?.get("opensearch.path.conf")?.toString()
if (configDirName != null) {
val defaultSettingYmlFile = Path.of(configDirName, PLUGIN_NAME, "observability.yml")
val defaultSettingYmlFile = Paths.get(configDirName, PLUGIN_NAME, "observability.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 @@ -38,7 +38,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 @@ -263,7 +263,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 5c43e9d

Please sign in to comment.