Skip to content

Commit

Permalink
Remove ManagementFactory usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
igr committed Apr 27, 2023
1 parent 343ad9c commit 71b6d4c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ repositories {

group = 'org.jodd'
//version = '6.1.1-SNAPSHOT'
version = '6.2.0'
version = '6.2.1'

rootProject.description = 'Jodd Util'

Expand Down
8 changes: 0 additions & 8 deletions src/main/java/jodd/util/SystemInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
package jodd.util;

import java.io.File;
import java.lang.management.ManagementFactory;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
Expand Down Expand Up @@ -488,13 +487,6 @@ public final long getUsedMemory(){
return runtime.totalMemory() - runtime.freeMemory();
}

/**
* Returns PID of current Java process.
*/
public final long getCurrentPID() {
return Long.parseLong(ManagementFactory.getRuntimeMXBean().getName().split("@")[0]);
}

/**
* Returns number of CPUs.
*/
Expand Down

0 comments on commit 71b6d4c

Please sign in to comment.