n-jay commented on code in PR #55:
URL: https://github.com/apache/synapse/pull/55#discussion_r863518439


##########
modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/AddressEndpointFactory.java:
##########
@@ -115,7 +119,16 @@ public EndpointDefinition 
createEndpointDefinition(OMElement elem) {
         }
 
         if (address != null) {
-            endpointDefinition.setAddress(address.getAttributeValue().trim());
+            String extractedAddress = address.getAttributeValue().trim();
+            if (extractedAddress.contains(SYSTEM_VARIABLE_PREFIX)) {
+                String extractedEnvVariableKey = 
extractedAddress.substring(extractedAddress.lastIndexOf(":") + 1);
+                String extractedEnvVariableValue = 
System.getenv(extractedEnvVariableKey);
+                log.info ("Environment variable " + extractedEnvVariableKey + 
" replaced with " +

Review Comment:
   Removed repeated lines and updated to log.debug in the new unified method 
declaration.
   Commit: 
https://github.com/apache/synapse/pull/55/commits/7b330d3503475ce5e7b3c51007f42c39d3f4806b



-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@synapse.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@synapse.apache.org
For additional commands, e-mail: dev-h...@synapse.apache.org

Reply via email to