Skip to content

Commit

Permalink
Minor, removed commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
andsel committed Nov 12, 2024
1 parent ea4d8d4 commit 28605e4
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions logstash-core/lib/logstash/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -523,33 +523,11 @@ def validate(value)
@validator_class.validate(value)
end
end



java_import org.logstash.settings.StringSetting

# class String < Setting
# def initialize(name, default = nil, strict = true, possible_strings = [])
# @possible_strings = possible_strings
# super(name, ::String, default, strict)
# end
#
# def validate(value)
# super(value)
# unless @possible_strings.empty? || @possible_strings.include?(value)
# raise ArgumentError.new("Invalid value \"#{name}: #{value}\". Options are: #{@possible_strings.inspect}")
# end
# end
# end

java_import org.logstash.settings.NullableString

# class NullableString < String
# def validate(value)
# return if value.nil?
# super(value)
# end
# end

class Password < Coercible
def initialize(name, default = nil, strict = true)
super(name, LogStash::Util::Password, default, strict)
Expand Down

0 comments on commit 28605e4

Please sign in to comment.