You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* When we replace variable expressions with their value the resulting {@link String} can change in size (shrink or
23
-
* grow). By adding a bit of extra capacity we reduce the chance that the capacity is too small and a new buffer array
24
-
* has to be allocated and array-copy has to be performed.
22
+
* When we replace variable expressions with their value the resulting {@link String} can change in size (shrink or grow). By adding a bit of extra capacity
23
+
* we reduce the chance that the capacity is too small and a new buffer array has to be allocated and array-copy has to be performed.
25
24
*/
26
25
privatestaticfinalintEXTRA_CAPACITY = 8;
27
26
@@ -124,7 +123,9 @@ private final Collection<VariableLine> collectVariables(boolean onlyExported) {
* This method is called recursively. This allows you to resolve variables that are defined by other variables.
171
170
*
172
-
* @param value the {@link String} that potentially contains variables in the syntax "${«variable«}". Those will be
173
-
* resolved by this method and replaced with their {@link #get(String) value}.
174
-
* @param src the source where the {@link String} to resolve originates from. Should have a reasonable
175
-
* {@link Object#toString() string representation} that will be used in error or log messages if a variable
176
-
* could not be resolved.
171
+
* @param value the {@link String} that potentially contains variables in the syntax "${«variable«}". Those will be resolved by this method and replaced with
172
+
* their {@link #get(String) value}.
173
+
* @param src the source where the {@link String} to resolve originates from. Should have a reasonable {@link Object#toString() string representation} that
174
+
* will be used in error or log messages if a variable could not be resolved.
177
175
* @param recursion the current recursion level. This is used to interrupt endless recursion.
178
176
* @param rootSrc the root source where the {@link String} to resolve originates from.
179
177
* @param rootValue the root value to resolve.
180
-
* @param resolvedVars this is a reference to an object of {@link EnvironmentVariablesResolved} being the lowest level
181
-
* in the {@link EnvironmentVariablesType hierarchy} of variables. In case of a self-referencing variable
182
-
* {@code x} the resolving has to continue one level higher in the {@link EnvironmentVariablesType hierarchy}
183
-
* to avoid endless recursion. The {@link EnvironmentVariablesResolved} is then used if another variable
184
-
* {@code y} must be resolved, since resolving this variable has to again start at the lowest level. For
185
-
* example: For levels {@code l1, l2} with {@code l1 < l2} and {@code x=${x} foo} and {@code y=bar} defined at
186
-
* level {@code l1} and {@code x=test ${y}} defined at level {@code l2}, {@code x} is first resolved at level
187
-
* {@code l1} and then up the {@link EnvironmentVariablesType hierarchy} at {@code l2} to avoid endless
188
-
* recursion. However, {@code y} must be resolved starting from the lowest level in the
189
-
* {@link EnvironmentVariablesType hierarchy} and therefore {@link EnvironmentVariablesResolved} is used.
178
+
* @param resolvedVars this is a reference to an object of {@link EnvironmentVariablesResolved} being the lowest level in the
179
+
* {@link EnvironmentVariablesType hierarchy} of variables. In case of a self-referencing variable {@code x} the resolving has to continue one level higher in
180
+
* the {@link EnvironmentVariablesType hierarchy} to avoid endless recursion. The {@link EnvironmentVariablesResolved} is then used if another variable
181
+
* {@code y} must be resolved, since resolving this variable has to again start at the lowest level. For example: For levels {@code l1, l2} with
182
+
* {@code l1 < l2} and {@code x=${x} foo} and {@code y=bar} defined at level {@code l1} and {@code x=test ${y}} defined at level {@code l2}, {@code x} is
183
+
* first resolved at level {@code l1} and then up the {@link EnvironmentVariablesType hierarchy} at {@code l2} to avoid endless recursion. However, {@code y}
184
+
* must be resolved starting from the lowest level in the {@link EnvironmentVariablesType hierarchy} and therefore {@link EnvironmentVariablesResolved} is
185
+
* used.
190
186
* @return the given {@link String} with the variables resolved.
0 commit comments