rspec/rules/S4011/java/rule.adoc

17 lines
315 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
This rule allows banning usage of certain constructors.
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
----