rspec/rules/S2657/java/rule.adoc

33 lines
700 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
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.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
2022-02-04 17:28:24 +01:00
[source,java]
2021-04-28 16:49:39 +02:00
----
ClassLoader loader = this.getClass().getClassLoader(); // Noncompliant
ClassLoader loader = new MyClassLoader(); // Noncompliant
----
2021-04-28 16:49:39 +02:00
== See
2021-10-28 10:07:16 +02:00
* https://cwe.mitre.org/data/definitions/578.html[MITRE, CWE-578] - EJB Bad Practices: Use of Class Loader
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
endif::env-github,rspecator-view[]