Skip to content

Use static factory methods for wrapper types #13

Closed
@marschall

Description

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.

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions