rspec/rules/S2657/java/rule.adoc
2021-04-28 18:08:03 +02:00

23 lines
524 B
Plaintext

According to the EJB specification, EJB's:
____
...must not attempt to create a class loader; obtain the current class loader; set the context class loader...
____
This rule raises an issue each time an EJB obtains a class loader.
== Noncompliant Code Example
----
ClassLoader loader = this.getClass().getClassLoader(); // Noncompliant
ClassLoader loader = new MyClassLoader(); // Noncompliant
----
== See
* http://cwe.mitre.org/data/definitions/578.html[MITRE, CWE-578] - EJB Bad Practices: Use of Class Loader