aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGoogle Java Core Libraries <java-team-github-bot@google.com>2021-10-29 07:59:37 -0700
committerGoogle Java Core Libraries <java-libraries-firehose+copybara@google.com>2021-10-29 08:00:16 -0700
commit15c76191f79a2a26a9f914541a5c9ac4965dd0c7 (patch)
tree628298bfaaa1654c695e556efe6e162cd7797508
parent8abfb9cdd873457a0696df08c38cb7f04d7208f9 (diff)
downloadauto-15c76191f79a2a26a9f914541a5c9ac4965dd0c7.tar.gz
Use Java 11's Optional.isEmpty() method in docs: `!optional.isPresent()` -> `optional.isEmpty()`
RELNOTES=n/a PiperOrigin-RevId: 406359326
-rw-r--r--value/userguide/builders-howto.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/value/userguide/builders-howto.md b/value/userguide/builders-howto.md
index aebdbfd3..e38e3188 100644
--- a/value/userguide/builders-howto.md
+++ b/value/userguide/builders-howto.md
@@ -280,7 +280,7 @@ public abstract class Animal {
abstract Animal autoBuild(); // not public
public final Animal build() {
- if (!name().isPresent()) {
+ if (name().isEmpty()) {
setName(numberOfLegs() + "-legged creature");
}
return autoBuild();