...
Code Block | ||
---|---|---|
| ||
private void getConnection() { // ... conn = DriverManager.getConnection(url, username, password); // Do what is is required here itself; do not return the connection } public void DoDatabaseOperationWrapper() { // Perform any checks or validate input getConnection(); } |
Exceptions
SEC05-EX1: It is permissible to use APIs that do not use the immediate caller's class loader instance. For example, the three-argument java.lang.Class.forName()
method requires an explicit argument that specifies the class loader instance to use. Do not use the immediate caller's class loader as the third argument if instances must be returned to untrusted code.
...