The driver currently instantiates wrapper types (Integer, Long, …) by directly calling the constructor using new rather than by calling the static valueOf factory methods. This is discouraged and deprecated in Java 9. To quote from the Integer constructor
It is rarely appropriate to use this constructor. The static factory valueOf(int) is generally a better choice, as it is likely to yield significantly better space and time performance.
The driver currently instantiates wrapper types (Integer, Long, …) by directly calling the constructor using
newrather than by calling the staticvalueOffactory methods. This is discouraged and deprecated in Java 9. To quote from the Integer constructor