JAVA_HOME incorrect in debug mode

I have a travis build using

language: java
jdk: openjdk12

Everything is working fine during normal builds, but when I debug the build, the JAVA_HOME environment variable is set to an older JDK version.

Normal build:
echo $JAVA_HOME
/home/[secure]/openjdk12

Debug build:
echo $JAVA_HOME
/usr/lib/jvm/java-8-oracle

I could find this related issue (already closed)

Could you copy/paste a link to your latest build where this is working in normal/non-debug mode?