From 69d4bf883cd7402d13497a40422d20096b2b9aa9 Mon Sep 17 00:00:00 2001 From: ggregory Date: Sat, 16 Jan 2016 14:37:38 -0800 Subject: [PATCH] Simplify, less clutter. --- src/main/java/org/apache/commons/lang3/BooleanUtils.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/BooleanUtils.java b/src/main/java/org/apache/commons/lang3/BooleanUtils.java index ba5dea00c..2c46d5bd3 100644 --- a/src/main/java/org/apache/commons/lang3/BooleanUtils.java +++ b/src/main/java/org/apache/commons/lang3/BooleanUtils.java @@ -1098,11 +1098,7 @@ public class BooleanUtils { if (x == y) { return 0; } - if (x) { - return 1; - } else { - return -1; - } + return x ? 1 : -1; } }