[SHIRO-817] Update CommonsInterpolator doc to reflect actual behavior#302
Merged
bdemers merged 2 commits intoapache:mainfrom May 27, 2021
weltonrodrigo:patch-1
Merged
[SHIRO-817] Update CommonsInterpolator doc to reflect actual behavior#302bdemers merged 2 commits intoapache:mainfrom weltonrodrigo:patch-1
CommonsInterpolator doc to reflect actual behavior#302bdemers merged 2 commits intoapache:mainfrom
weltonrodrigo:patch-1
Conversation
The stated behavior is not the observed. This is a complement to: apache/shiro-site#82 The relevant section of the commons-configuration class is: > After an instance has been created *it does not contain any Lookup objects*. The current set of lookup objects can be modified using the registerLookup() and deregisterLookup() methods. *Default lookup objects (that are invoked for variables without a prefix)* can be added or removed with the addDefaultLookup() and removeDefaultLookup() methods respectively. (When a ConfigurationInterpolator instance is created by a configuration object, a default lookup object is added pointing to the configuration itself, so that variables are resolved using the configuration's properties.) So, the correct behavior is that you can use `${const:java.awt.event.KeyEvent.VK_ENTER}` but not `${env:EDITOR}`. The current code accepts `${EDITOR}`. If a system property with this name is found not null, it is used, if not, an environment variable is search and if not, the whole substitution `${EDITOR}` is returned.
bmarwell
reviewed
May 18, 2021
config/ogdl/src/main/java/org/apache/shiro/config/ogdl/CommonsInterpolator.java
Outdated
Show resolved
Hide resolved
…Interpolator.java Co-authored-by: Benjamin Marwell <bmarwell@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The stated behavior is not the observed.
This is a complement to: apache/shiro-site#82
The relevant section of the commons-configuration class is:
So, the correct behavior is that you can use
${const:java.awt.event.KeyEvent.VK_ENTER}but not${env:EDITOR}. The current code accepts${EDITOR}. If a system property with this name is found not null, it is used, if not, an environment variable is search and if not, the whole substitution${EDITOR}is returned.