Closed
Description
While debugging the milvus-io/milvus-sdk-java#1040 issue I found out that JJava is using a random jar version for some reason.
Here is the reproduction:
%%loadFromPOM
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
</dependency>
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
String jsonString = "{\"name\":\"John\", \"age\":30}";
// This method is available in Gson 2.8.6 and later
JsonElement jsonElement = JsonParser.parseString(jsonString);
System.out.println(jsonElement);
The error:
| JsonElement jsonElement = JsonParser.parseString(jsonString);
cannot find symbol
symbol: method parseString(java.lang.String)
So, the 2.8.5 or older version is used in fact. The same code works fine if run as a normal Java SE application.