Bug #116295 Example relies on deprecated method
Submitted: 4 Oct 5:32 Modified: 4 Oct 5:51
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:Connector / J Documentation Severity:S3 (Non-critical)
Version:9.0.0 OS:Any
Assigned to: CPU Architecture:Any

[4 Oct 5:32] Daniël van Eeden
Description:
https://dev.mysql.com/doc/connector-j/en/connector-j-usagenotes-connect-drivermanager.html... has this:

```
Class.forName("com.mysql.cj.jdbc.Driver").newInstance();
```

However `newInstance()` has been deprecated for a while (see also https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html#newInstance-- )

How to repeat:
See description

Suggested fix:
Replace with:

```
Class.forName("com.mysql.cj.jdbc.Driver").getDeclaredConstructor().newInstance();
```
[4 Oct 5:51] MySQL Verification Team
Hello Daniël,

Thank you for the report and feedback.

regards,
Umesh