mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
15 lines
389 B
Java
15 lines
389 B
Java
import java.net.HttpURLConnection;
|
|
import javax.net.ssl.HttpsURLConnection;
|
|
import java.io.*;
|
|
|
|
class UseSSLTest {
|
|
public void m1(HttpURLConnection connection) throws java.io.IOException {
|
|
InputStream input;
|
|
if (connection instanceof HttpsURLConnection) {
|
|
input = connection.getInputStream(); // OK
|
|
} else {
|
|
input = connection.getInputStream(); // BAD
|
|
}
|
|
}
|
|
}
|