Skip to content

Commit

Permalink
Fix plugin options (#3003)
Browse files Browse the repository at this point in the history
  • Loading branch information
jterapin authored Apr 1, 2024
1 parent 7b62cc4 commit d276c0b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions gems/aws-sdk-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Unreleased Changes
------------------
* Issue - Performance optimization: ensure presence and order of instance variables in `PluginOptions` (#3002).

3.191.5 (2024-03-26)
------------------
Expand Down
8 changes: 8 additions & 0 deletions gems/aws-sdk-core/lib/seahorse/client/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,15 @@ class PluginOption

def initialize(name, options = {})
@name = name
# prevent unstable object shapes by ensuring
# order and presence of instance variables
@default = nil
@default_block = nil
@required = nil
@doc_type = nil
@doc_default = nil
@docstring = nil
@rbs_type = nil
options.each_pair do |opt_name, opt_value|
self.send("#{opt_name}=", opt_value)
end
Expand Down

0 comments on commit d276c0b

Please sign in to comment.