summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-03-21 17:12:50 -0700
committerGitHub <noreply@github.com>2018-03-21 17:12:50 -0700
commitfaeaa9efd8284155ca278ba90770e766277716a1 (patch)
tree7134d12f2ef4477fd4905040357bf71d3584ac52
parent50958e958a41f23fb75e9b3c3c9f4c0b519ae295 (diff)
parent488e3409910a0e9ec8dcfa67f756e66b10a28cc2 (diff)
downloadchef-faeaa9efd8284155ca278ba90770e766277716a1.tar.gz
Merge pull request #7025 from chef/lcg/remove-dead-code
remove dead code from property declaration
-rw-r--r--lib/chef/property.rb25
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/chef/property.rb b/lib/chef/property.rb
index be54c8bfa1..942fff0ee9 100644
--- a/lib/chef/property.rb
+++ b/lib/chef/property.rb
@@ -336,31 +336,6 @@ class Chef
else
# We are getting the default value.
- # If the user does something like this:
- #
- # ```
- # class MyResource < Chef::Resource
- # property :content
- # action :create do
- # file '/x.txt' do
- # content content
- # end
- # end
- # end
- # ```
- #
- # It won't do what they expect. This checks whether you try to *read*
- # `content` while we are compiling the resource.
- if !nil_set &&
- resource.respond_to?(:resource_initializing) &&
- resource.resource_initializing &&
- resource.respond_to?(:enclosing_provider) &&
- resource.enclosing_provider &&
- resource.enclosing_provider.new_resource &&
- resource.enclosing_provider.new_resource.respond_to?(name)
- Chef::Log.warn("#{Chef::Log.caller_location}: property #{name} is declared in both #{resource} and #{resource.enclosing_provider}. Use new_resource.#{name} instead. At #{Chef::Log.caller_location}")
- end
-
if has_default?
# If we were able to cache the stored_default, grab it.
if defined?(@stored_default)