Files
codeql/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test2/Test.java
Owen Mansel-Chan ef345a3279 Java: Inline expectation should have space after $
This was a regex-find-replace from `// \$(?! )` (using a negative lookahead) to `// $ `.
2026-03-04 12:44:54 +00:00

21 lines
597 B
Java

import java.net.URL;
import java.net.URLConnection;
class Test {
URLConnection test2() throws Exception {
return new URL("https://example.com").openConnection(); // $ hasNoTrustedResult
}
URLConnection test3() throws Exception {
return new URL("classpath:example/directory/test.class").openConnection();
}
URLConnection test4() throws Exception {
return new URL("file:///example/file").openConnection();
}
URLConnection test5() throws Exception {
return new URL("jar:file:///C:/example/test.jar!/test.xml").openConnection();
}
}