Skip to content

Commit

Permalink
[#157] Add javadoc comments about thread-safety to findAllDevs and me…
Browse files Browse the repository at this point in the history
…thods that call it.
  • Loading branch information
kaitoy committed Mar 12, 2018
1 parent b4295df commit 3846607
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pcap4j-core/src/main/java/org/pcap4j/core/Pcaps.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*_##########################################################################
_##
_## Copyright (C) 2011-2015 Pcap4J.org
_## Copyright (C) 2011-2018 Pcap4J.org
_##
_##########################################################################
*/
Expand Down Expand Up @@ -39,6 +39,8 @@ public final class Pcaps {
private Pcaps() { throw new AssertionError(); }

/**
* Gets all devices.
* This method is not thread-safe.
*
* @return a list of PcapNetworkInterfaces.
* @throws PcapNativeException if an error occurs in the pcap native library.
Expand Down Expand Up @@ -81,6 +83,8 @@ List<PcapNetworkInterface> findAllDevs() throws PcapNativeException {
}

/**
* Gets a device by IP address.
* This method is not thread-safe.
*
* @param addr addr
* @return a PcapNetworkInterface.
Expand Down Expand Up @@ -108,6 +112,8 @@ public static PcapNetworkInterface getDevByAddress(
}

/**
* Gets a device by name.
* This method is not thread-safe.
*
* @param name name
* @return a PcapNetworkInterface.
Expand Down

0 comments on commit 3846607

Please sign in to comment.