Good morning. yes I have a closure /getRepositories/ that retrieves a list of repositories from a pattern on its name
I have another /findCurrentVersion/ that returns the version of a feature from a pattern on its name both use a local variable *name* I was writing a closure /updateFeatures/, which takes a pattern name and version parameters, which looking for the repositories corresponds to pattern, uninstall these features, built the url of the new version, removes the oldest URL, adds new URL, and reinstall the corresponding features. so I used the two closures /getRepositories/ and /findCurrentVersion/ But /updateFeatures/ I used a local variable *name* before calling getRepositories. /getRepositories/ change the value of the variable *name*. in the remainder of the variable *name* of /updateFeatures/ lost its value. the variable *name* is not a local variable to each closure but overall the session. how to limit the scope of the variable name to the closure /getRepositories/ without it affecting the value of *name* in /updateFeatures/ A + -- View this message in context: http://karaf.922171.n3.nabble.com/2-2-2-shell-closure-variables-scope-tp4031326p4031335.html Sent from the Karaf - Dev mailing list archive at Nabble.com.
