@@ -227,13 +227,7 @@ if [ $exitcode -eq 0 ]; then
227227
228228 # read the Java version we want to find
229229 JVMVersion=$( plist_get_java ' :JVMVersion' | xargs)
230- if [[ ${JVMVersion} == * " ;" * ]]; then
231- minMaxArray=(${JVMVersion// ;/ } )
232- JVMVersion=${minMaxArray[0]// +}
233- JVMMaxVersion=${minMaxArray[1]// +}
234- fi
235- stub_logger " [JavaRequirement] JVM minimum version: ${JVMVersion} "
236- stub_logger " [JavaRequirement] JVM maximum version: ${JVMMaxVersion} "
230+ # post processing of the version string follows below...
237231
238232
239233# read 'Info.plist' file in Oracle style
@@ -283,10 +277,24 @@ else
283277 IFS=$' \t\n '
284278 MainArgs=($( xargs -n1 <<< $( plist_get ' :JVMArguments' | tr -d ' \n' | sed -E ' s/Array \{ *(.*) *\}/\1/g' | sed ' s/ */ /g' ) ))
285279 unset IFS
286- # post processing of the array follows below...
280+ # post processing of the array follows further below...
281+
282+ # read the Java version we want to find
283+ JVMVersion=$( plist_get ' :JVMVersion' | xargs)
284+ # post processing of the version string follows below...
287285fi
288286
289287
288+
289+ # JVMVersion: post processing and optional splitting
290+ if [[ ${JVMVersion} == * " ;" * ]]; then
291+ minMaxArray=(${JVMVersion// ;/ } )
292+ JVMVersion=${minMaxArray[0]// +}
293+ JVMMaxVersion=${minMaxArray[1]// +}
294+ fi
295+ stub_logger " [JavaRequirement] JVM minimum version: ${JVMVersion} "
296+ stub_logger " [JavaRequirement] JVM maximum version: ${JVMMaxVersion} "
297+
290298# MainArgs: replace occurences of $APP_ROOT with its content
291299MainArgsArr=()
292300for i in " ${MainArgs[@]} "
0 commit comments