Skip to content

Commit

Permalink
FIX #211 and #232. Checking $java_args[@] for memory settings, too.
Browse files Browse the repository at this point in the history
  • Loading branch information
muuki88 committed May 10, 2014
1 parent 1862f04 commit cc6c2a7
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,16 @@ get_mem_opts () {

# if we detect any of these settings in ${java_opts} we need to NOT output our settings.
# The reason is the Xms/Xmx, if they don't line up, cause errors.
if [[ "${java_opts}" == *-Xmx* ]] || [[ "${java_opts}" == *-Xms* ]] || [[ "${java_opts}" == *-XX:MaxPermSize* ]] || [[ "${java_opts}" == *-XX:ReservedCodeCacheSize* ]]; then
echo ""
if [[ "${java_opts}" == *-Xmx* ]] ||

This comment has been minimized.

Copy link
@jsuereth

jsuereth May 15, 2014

Member

Also, we should probably just unify java_opts + java_args before this method....

This comment has been minimized.

Copy link
@muuki88

muuki88 May 15, 2014

Author Contributor

Good point. My bash foo was not ready for that yet xD

[[ "${java_opts}" == *-Xms* ]] ||
[[ "${java_opts}" == *-XX:MaxPermSize* ]] ||
[[ "${java_opts}" == *-XX:ReservedCodeCacheSize* ]] ||
# check java arguments for settings, too
[[ "${java_args[@]}" == *-Xmx* ]] ||
[[ "${java_args[@]}" == *-Xms* ]] ||
[[ "${java_args[@]}" == *-XX:MaxPermSize* ]] ||
[[ "${java_args[@]}" == *-XX:ReservedCodeCacheSize* ]];
then
elif [[ !$no_java_version_check ]] && [[ java_version > "1.8" ]]; then
echo "-Xms${mem}m -Xmx${mem}m -XX:ReservedCodeCacheSize=${codecache}m"
else
Expand Down Expand Up @@ -332,6 +340,7 @@ EOM
### Main script ###
### ------------------------------- ###

declare debug=0

This comment has been minimized.

Copy link
@jsuereth

jsuereth May 15, 2014

Member

DOH! This snuck in.

This comment has been minimized.

Copy link
@muuki88

muuki88 May 15, 2014

Author Contributor

Oversaw that. I still wonder why it didnt worked in the first place.

declare -a residual_args
declare -a java_args
declare -a app_commands
Expand Down

0 comments on commit cc6c2a7

Please sign in to comment.