Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2842,7 +2842,7 @@ private static Boolean checkInternet(String url) {

private static void printMemoryUse() {
System.gc();
System.runFinalization();
runFinalization();
long max = Runtime.getRuntime().maxMemory();
long total = Runtime.getRuntime().totalMemory();
long free = Runtime.getRuntime().freeMemory();
Expand All @@ -2855,6 +2855,15 @@ private static void printMemoryUse() {
System.out.println("\n#################################################\n");
}

/**
* Finalization is deprecated for removal in Java, as of now there is no actual
* removal date planned. The method exists to narrowly suppress warnings.
*/
@SuppressWarnings("removal")
private static void runFinalization() {
System.runFinalization();
}


private static void printThreadsInfo() {
System.out.println("\n########### Thread usage reported by JVM ########");
Expand Down
Loading