== Why is this an issue?

This rule allows banning usage of certain constructors.


=== Noncompliant code example

Given parameters:

* className: java.util.Date
* argumentTypes: java.lang.String

[source,java]
----
Date birthday;
birthday = new Date("Sat Sep 27 05:42:21 EDT 1986");  // Noncompliant
birthday = new Date(528176541000L); // Compliant
----


ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

=== Message

Remove this forbidden initialization


=== Parameters

.className
****

Name of the class whose constructor is forbidden. This parameter is mandatory, if absent the rule is disabled.
****
.argumentTypes
****

Comma-delimited list of argument types, E.G. java.lang.String, int[], int
****
.allOverloads
****

Boolean. Set to true to flag all overloads regardless of parameter type (default: false)
****


'''
== Comments And Links
(visible only on this page)

=== deprecates: S1212

=== relates to: S2253

endif::env-github,rspecator-view[]
