THUMarkLau opened a new pull request, #9698:
URL: https://github.com/apache/iotdb/pull/9698

   See [IOTDB-5819](https://issues.apache.org/jira/browse/IOTDB-5819).
   
   In general, the files in /sys/class/net are considered to represent a 
network card, as shown in the figure below. 
   
![image](https://user-images.githubusercontent.com/37140360/234213454-a1a6af9f-b2e4-43fc-8b50-421be9fa91e1.png)
   
   However, in some environments, the /sys/class/net folder may also include 
non-network card files.
   <img width="810" alt="7ce6a129ea259417455cdda3f662c91" 
src="https://user-images.githubusercontent.com/37140360/234213515-057e5e7a-9358-4b4b-8d45-8d51372d4adf.png";>
   
    NetMetrics uses a Map from the name of a network card to the status of a 
network card, and NPE occurs when the file name of a non-network card is used 
to get the status of a network card. To fix this bug, we use a `getOrDefault` 
method instead of `get` method to avoid NPE.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to