Skip to content

Commit d9eb53b

Browse files
committed
Remove unnecessary source.
1 parent 0a8e365 commit d9eb53b

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

lib/logstash/outputs/elasticsearch/http_client.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ module LogStash; module Outputs; class ElasticSearch;
2222
# made sense. We picked one on the lowish side to not use too much heap.
2323
TARGET_BULK_BYTES = 20 * 1024 * 1024 # 20MiB
2424

25-
# a replacement for invalid bytes in JSON string of the event
26-
REPLACEMENT_CHARACTER = "\uFFFD".freeze
2725

2826
class HttpClient
2927
attr_reader :client, :options, :logger, :pool, :action_count, :recv_count
@@ -503,13 +501,5 @@ def update_action_builder(args, source)
503501
[args, source]
504502
end
505503

506-
private
507-
# Replaces invalid byte sequences of given JSON string with replacements character
508-
def replace_invalid_bytes!(json_string)
509-
has_invalid_bytes = false
510-
json_string.scrub! { |_| has_invalid_bytes = true; REPLACEMENT_CHARACTER }
511-
logger.debug("The event invalid bytes got replaced by replacement character") if has_invalid_bytes
512-
end
513-
514504
end
515505
end end end

0 commit comments

Comments
 (0)