File tree Expand file tree Collapse file tree
lib/java_buildpack/util/play
spec/java_buildpack/util/play Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ def java_opts
4848 fail "Invalid Java option contains more than one option: '#{ option } '"
4949 end
5050
51- java_opts . map { |java_opt | "-J#{ java_opt } " }
51+ java_opts . map { |option | option == '$CALCULATED_MEMORY' ? '${CALCULATED_MEMORY//-/-J-}' : "-J#{ option } " }
5252 end
5353
5454 # (see JavaBuildpack::Util::Play::Base#lib_dir)
Original file line number Diff line number Diff line change 5959 end
6060 end
6161
62+ context do
63+ let ( :java_opts ) { super ( ) << '$CALCULATED_MEMORY' }
64+
65+ it 'does wraps the output of CALCULATED_MEMORY correctly' do
66+ expect ( play_app . release ) . to include ( '${CALCULATED_MEMORY//-/-J-}' )
67+ end
68+ end
69+
6270 context do
6371 let ( :java_opts ) do
6472 super ( ) << '-Dappdynamics.agent.nodeName=$(expr "$VCAP_APPLICATION" : \'.' \
You can’t perform that action at this time.
0 commit comments