fix: 修改未知进程返回 空字符串
This commit is contained in:
@@ -209,9 +209,9 @@ public class OSHIUtils {
|
|||||||
map.put("receiveQueue",connection.getReceiveQueue());
|
map.put("receiveQueue",connection.getReceiveQueue());
|
||||||
if (connection.getowningProcessId() == -1 ){
|
if (connection.getowningProcessId() == -1 ){
|
||||||
//未知进程 getowningProcessId 返回 -1 为避免获取进程name error
|
//未知进程 getowningProcessId 返回 -1 为避免获取进程name error
|
||||||
map.put("processId","unknown");
|
map.put("processId",-1);
|
||||||
map.put("processName","unknown");
|
map.put("processName","");
|
||||||
map.put("processCmd","unknown");
|
map.put("processCmd","");
|
||||||
}else {
|
}else {
|
||||||
map.put("processId",connection.getowningProcessId());
|
map.put("processId",connection.getowningProcessId());
|
||||||
map.put("processName",operatingSystem.getProcess(connection.getowningProcessId()).getName());
|
map.put("processName",operatingSystem.getProcess(connection.getowningProcessId()).getName());
|
||||||
|
|||||||
Reference in New Issue
Block a user