Java vendor parsing failed on StringIndexOutOfBoundsException with AdoptOpenJDK 1.8

Description

We noticed that XAP Enterprise 14.0.1 won’t start with AdoptOpenJDK 1.8, we get the following error:

$ $XAP_HOME/bin/gs-agent.bat gsa.global.lus=0 gsa.lus=1 gsa.global.gsm=0 gsa.gsm=1 gsa.gsc=2
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967)
at com.gigaspaces.internal.utils.OutputJVMOptions.getJvmVendor(OutputJVMOptions.java:62)
at com.gigaspaces.internal.utils.OutputJVMOptions.getJvmOptions(OutputJVMOptions.java:41)
at com.gigaspaces.internal.utils.OutputJVMOptions.main(OutputJVMOptions.java:30)

The `java.vendor` system property doesn’t contain spaces, as you can see in the attached file (java.vendor = AdoptOpenJdk).

XAP version: gigaspaces-xap-enterprise-14.0.1-ga-b20100
JDK version: OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_202-b08)

Workaround

None

Acceptance Test

Verified manually

Assignee

Niv Ingberg

Reporter

Yuval Dori

Labels

None

Priority

Critical

SalesForce Case ID

12292

Fix versions

Commitment Version/s

None

Due date

None

Product

None

Edition

Open Source

Platform

All
Configure