Skip to content

Commit

Permalink
Revert "Cache jvm version"
Browse files Browse the repository at this point in the history
  • Loading branch information
jkutner committed Jan 17, 2019
1 parent 8dbdf8f commit 5dc706a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 19 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Expand Up @@ -2,7 +2,6 @@

## master

* Cache last JVM version installed
* Changed default JDK 7 to 7u201
* Changed default JDK 11 to 11.0.2
* Changed default JDK 8 to 8u201
Expand Down
10 changes: 0 additions & 10 deletions bin/java
Expand Up @@ -13,7 +13,6 @@ JDK_URL_1_6=${JDK_URL_1_6:-"https://lang-jvm.s3.amazonaws.com/jdk/openjdk1.6.0_2

install_java_with_overlay() {
local buildDir=${1}
local cacheDir=${2:-$(mktemp -d)}
if [ ! -f "${buildDir}/.jdk/bin/java" ]; then
local jdkVersion=$(detect_java_version ${buildDir})
local jdkUrl=$(_get_jdk_download_url "${jdkVersion}")
Expand All @@ -30,7 +29,6 @@ install_java_with_overlay() {
fi
install_java ${buildDir} ${jdkVersion} ${jdkUrl}
jdk_overlay ${buildDir}
_cache_version ${jdkVersion} ${cacheDir}
status_done
else
status "Using provided JDK"
Expand All @@ -40,7 +38,6 @@ install_java_with_overlay() {

install_java() {
local baseDir=$1

if [ ! -d "${baseDir}" ]; then
error_return "Invalid directory to install java."
return 1
Expand Down Expand Up @@ -287,10 +284,3 @@ _install_metrics_agent() {
mkdir -p ${ctxDir}/.profile.d
cp $curDir/opt/heroku-jvm-metrics.sh $ctxDir/.profile.d/
}

_cache_version() {
local jdkVersion="${1}"
local cacheDir="${2}"

echo "java.runtime.version=${jdkVersion}" > ${cacheDir}/system.properties
}
8 changes: 0 additions & 8 deletions test/java_test.sh
Expand Up @@ -198,11 +198,3 @@ test_fail_install_metrics_agent() {
assertContains "failed to install metrics agent!" "$(cat ${STD_OUT})"
unset HEROKU_METRICS_JAR_URL
}

test_cache_java_version() {
cacheDir="$(mktemp -d)"
capture _cache_version "1.8.0_192" ${cacheDir}
assertCapturedSuccess
assertTrue "An system.properties file should be created." "[ -f ${cacheDir}/system.properties ]"
assertContains "1.8.0_192" "$(cat ${cacheDir}/system.properties)"
}

0 comments on commit 5dc706a

Please sign in to comment.