33 lines
695 B
Plaintext
33 lines
695 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
|
|
|
|
[source,java]
|
|
----
|
|
ClassLoader loader = this.getClass().getClassLoader(); // Noncompliant
|
|
ClassLoader loader = new MyClassLoader(); // Noncompliant
|
|
----
|
|
|
|
|
|
== See
|
|
|
|
* https://cwe.mitre.org/data/definitions/578[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[]
|