aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/actions/Artifact.java
diff options
context:
space:
mode:
authorGravatar tomlu <tomlu@google.com>2018-01-19 10:25:19 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2018-01-19 10:27:24 -0800
commite7552c53a5dd65ae496562fc29adecd89e9db5fb (patch)
treef33fb86896b10777b5652812d161454a2cefbe6c /src/main/java/com/google/devtools/build/lib/actions/Artifact.java
parent26866939e115798cf91d7a02de5417ad81314384 (diff)
Fix usages of PathFragment segments that will become inefficient.
An upcoming replacement to PathFragment will not have efficient segment semantics, causing code to become unnecessarily inefficient. RELNOTES: None PiperOrigin-RevId: 182553098
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions/Artifact.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/Artifact.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/Artifact.java b/src/main/java/com/google/devtools/build/lib/actions/Artifact.java
index 72d26371ab..eb9165a55c 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/Artifact.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/Artifact.java
@@ -200,7 +200,7 @@ public class Artifact
throw new IllegalArgumentException(execPath + ": illegal execPath for " + path
+ " (root: " + root + ")");
}
- if (execPath.segmentCount() == 0) {
+ if (execPath.isEmpty()) {
throw new IllegalArgumentException(
"it is illegal to create an artifact with an empty execPath");
}