aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/util
diff options
context:
space:
mode:
authorGravatar philwo <philwo@google.com>2018-04-25 07:07:02 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-04-25 07:08:10 -0700
commit5fdc66f8de426290f2acc6770ee08631b840135a (patch)
treef744441ddc2346e64584750f641c398bfd9fb05d /src/main/java/com/google/devtools/build/lib/util
parent155c77557524b59b831b424b33f0a0b951d99f6b (diff)
Document that getuid/getgid/getpid can throw exceptions.
RELNOTES: None. PiperOrigin-RevId: 194236052
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/util')
-rw-r--r--src/main/java/com/google/devtools/build/lib/util/ProcessUtils.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/util/ProcessUtils.java b/src/main/java/com/google/devtools/build/lib/util/ProcessUtils.java
index e4eaf8e45e..cbd69c17f1 100644
--- a/src/main/java/com/google/devtools/build/lib/util/ProcessUtils.java
+++ b/src/main/java/com/google/devtools/build/lib/util/ProcessUtils.java
@@ -28,6 +28,8 @@ public final class ProcessUtils {
/**
* @return the real group ID of the current process.
+ * @throws UnsatisfiedLinkError when JNI is not available.
+ * @throws UnsupportedOperationException on operating systems where this call is not implemented.
*/
public static int getgid() {
if (OS.getCurrent() == OS.WINDOWS) {
@@ -39,6 +41,7 @@ public final class ProcessUtils {
/**
* @return the process ID of this process.
+ * @throws UnsatisfiedLinkError when JNI is not available.
*/
public static int getpid() {
if (OS.getCurrent() == OS.WINDOWS) {
@@ -50,6 +53,8 @@ public final class ProcessUtils {
/**
* @return the real user ID of the current process.
+ * @throws UnsatisfiedLinkError when JNI is not available.
+ * @throws UnsupportedOperationException on operating systems where this call is not implemented.
*/
public static int getuid() {
if (OS.getCurrent() == OS.WINDOWS) {