Skip to content

Commit c2e54e6

Browse files
authored
Sync with Elasticsearch main branch (#171)
This PR introduces changes aligned with Elasticsearch main branch which a big change, JDK 21 requirement. * Update JDK to 21. * Fix failed unit test.
1 parent ad29262 commit c2e54e6

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.java-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
17.0
1+
21.0

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ description = "Elastic Integration filter"
3333
// ===========================================================================
3434

3535
java {
36-
sourceCompatibility = 17
37-
targetCompatibility = 17
36+
sourceCompatibility = 21
37+
targetCompatibility = 21
3838
}
3939
tasks.withType(JavaCompile) {
4040
options.encoding = 'UTF-8'

lib/logstash/filters/elastic_integration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class LogStash::Filters::ElasticIntegration < LogStash::Filters::Base
105105
# is not encumbered by those dependencies.
106106
def initialize(*a, &b)
107107
ensure_complete_logstash!
108-
ensure_java_major_version!(17)
108+
ensure_java_major_version!(21)
109109

110110
require_relative "elastic_integration/jar_dependencies"
111111
require_relative "elastic_integration/event_api_bridge"

spec/unit/elastic_integration_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
it 'prevents initialization and presents helpful guidancee' do
3333
expect { described_class.new({}) }.to raise_error(LogStash::EnvironmentError)
34-
.with_message(including("requires Java 17 or later", # reason +
34+
.with_message(including("requires Java 21 or later", # reason +
3535
"current JVM version `11.0.16.1`",
3636
"remove the plugin", # guidance options
3737
"run Logstash with a supported JVM."))

0 commit comments

Comments
 (0)