mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
[FEATURE] Секретная магия
This commit is contained in:
parent
a7db7184db
commit
8a52340b1a
1 changed files with 8 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
import java.lang.management.RuntimeMXBean;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Locale;
|
||||
|
@ -110,6 +111,13 @@ public static URL[] getClassPathURL() {
|
|||
return list;
|
||||
}
|
||||
|
||||
public static X509Certificate[] getCertificates(Class<?> clazz)
|
||||
{
|
||||
Object[] signers = clazz.getSigners();
|
||||
if(signers == null) return new X509Certificate[] {};
|
||||
return Arrays.stream(signers).filter((c) -> c instanceof X509Certificate).map((c) -> (X509Certificate) c).toArray(X509Certificate[]::new);
|
||||
}
|
||||
|
||||
public static void checkStackTrace(Class<?> mainClass) {
|
||||
LogHelper.debug("Testing stacktrace");
|
||||
Exception e = new Exception("Testing stacktrace");
|
||||
|
|
Loading…
Reference in a new issue