Description
spring-boot-starter-test
eventually depends on non-standard org.json
implementation com.vaadin.external.google:android-json
which clashes with the commonly used org.json:json
.
The symptom is exception
java.lang.NoSuchMethodError: org.json.JSONObject.stringToValue(Ljava/lang/String;)Ljava/lang/Object;
when XML.toJSONObject(String) is called inside a test. Production code works fine since does not depend on spring-boot-starter-test
.
It is not possible to accept this and use com.vaadin.external.google:android-json
implementation in a project because it has different interface and moreover lacks XML convertion functionality. Also, Spring Boot is not an Android framework to have such dependency. Thus, I consider this an bug to be fixed.
The bug is reproducible with the latest versions 1.5.2 to 1.5.4.