2021-04-28 16:49:39 +02:00
|
|
|
This rule allows banning usage of certain constructors.
|
|
|
|
|
2021-04-28 18:08:03 +02:00
|
|
|
|
2021-04-28 16:49:39 +02:00
|
|
|
== Noncompliant Code Example
|
|
|
|
|
|
|
|
Given parameters:
|
|
|
|
|
|
|
|
* className: java.util.Date
|
|
|
|
* argumentTypes: java.lang.String
|
|
|
|
|
|
|
|
----
|
|
|
|
Date birthday;
|
|
|
|
birthday = new Date("Sat Sep 27 05:42:21 EDT 1986"); // Noncompliant
|
|
|
|
birthday = new Date(528176541000L); // Compliant
|
|
|
|
----
|
2021-04-28 18:08:03 +02:00
|
|
|
|