You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by GitBox <gi...@apache.org> on 2021/05/18 01:10:03 UTC

[GitHub] [shiro] weltonrodrigo opened a new pull request #302: [SHIRO-817] Update `CommonsInterpolator` doc to reflect actual behavior

weltonrodrigo opened a new pull request #302:
URL: https://github.com/apache/shiro/pull/302


   The stated behavior is not the observed.
   
   This is a complement to: https://github.com/apache/shiro-site/pull/82
   
   The relevant section of the [commons-configuration class](https://commons.apache.org/proper/commons-configuration/apidocs/org/apache/commons/configuration2/interpol/ConfigurationInterpolator.html) 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.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shiro] bdemers merged pull request #302: [SHIRO-817] Update `CommonsInterpolator` doc to reflect actual behavior

Posted by GitBox <gi...@apache.org>.
bdemers merged pull request #302:
URL: https://github.com/apache/shiro/pull/302


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shiro] weltonrodrigo commented on a change in pull request #302: [SHIRO-817] Update `CommonsInterpolator` doc to reflect actual behavior

Posted by GitBox <gi...@apache.org>.
weltonrodrigo commented on a change in pull request #302:
URL: https://github.com/apache/shiro/pull/302#discussion_r634342946



##########
File path: config/ogdl/src/main/java/org/apache/shiro/config/ogdl/CommonsInterpolator.java
##########
@@ -35,12 +35,12 @@
  *     </tr>
  *     <tr>
  *         <td>sys</td>
- *         <td>${sys:os.name}</td>
+ *         <td>${os.name}</td>
  *         <td>mac os x</td>
  *     </tr>
  *     <tr>
  *         <td>env</td>
- *         <td>${env:EDITOR}</td>
+ *         <td>${EDITOR}</td>

Review comment:
       perfect.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shiro] bmarwell commented on a change in pull request #302: [SHIRO-817] Update `CommonsInterpolator` doc to reflect actual behavior

Posted by GitBox <gi...@apache.org>.
bmarwell commented on a change in pull request #302:
URL: https://github.com/apache/shiro/pull/302#discussion_r634070866



##########
File path: config/ogdl/src/main/java/org/apache/shiro/config/ogdl/CommonsInterpolator.java
##########
@@ -35,12 +35,12 @@
  *     </tr>
  *     <tr>
  *         <td>sys</td>
- *         <td>${sys:os.name}</td>
+ *         <td>${os.name}</td>
  *         <td>mac os x</td>
  *     </tr>
  *     <tr>
  *         <td>env</td>
- *         <td>${env:EDITOR}</td>
+ *         <td>${EDITOR}</td>

Review comment:
       What do you think about
   ```suggestion
    *         <td>${EDITOR} (resolved from environment variables)</td>
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org