mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
Allow LogStash::Event to be instantiated with a Java Event
Allows inputs such as dead_letter_queue to create Ruby events that include both data and metadata from deserialised Java events Fixes #10749
This commit is contained in:
parent
072d33690c
commit
fe4b6ee308
1 changed files with 2 additions and 0 deletions
|
@ -71,6 +71,8 @@ public final class JrubyEventExtLibrary {
|
|||
this.event = new Event(
|
||||
ConvertedMap.newFromRubyHash(context, (RubyHash) data)
|
||||
);
|
||||
} else if (data != null && data.getJavaClass().equals(Event.class)) {
|
||||
this.event = data.toJava(Event.class);
|
||||
} else {
|
||||
initializeFallback(context, data);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue