]> source.dussan.org Git - poi.git/commitdiff
IntelliJ: simplify boolean logic
authorJaven O'Neal <onealj@apache.org>
Tue, 17 Oct 2017 07:43:41 +0000 (07:43 +0000)
committerJaven O'Neal <onealj@apache.org>
Tue, 17 Oct 2017 07:43:41 +0000 (07:43 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1812363 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/ss/util/AreaReference.java
src/java/org/apache/poi/ss/util/SheetUtil.java

index 309ed51e516210e28aed5864881cf4c76fdc223b..7cf3b73c4142386bfd8b30bdf3d09f0ec59a4926 100644 (file)
@@ -196,11 +196,10 @@ public class AreaReference {
         // These are represented as something like
         //   C$1:C$65535 or D$1:F$0
         // i.e. absolute from 1st row to 0th one
-        if(topLeft.getRow() == 0 && topLeft.isRowAbsolute() &&
-            botRight.getRow() == version.getLastRowIndex() && botRight.isRowAbsolute()) {
-            return true;
-        }
-        return false;
+        return (topLeft.getRow() == 0
+                && topLeft.isRowAbsolute()
+                && botRight.getRow() == version.getLastRowIndex()
+                && botRight.isRowAbsolute());
     }
     public boolean isWholeColumnReference() {
         return isWholeColumnReference(_version, _firstCell, _lastCell);
index 2087a9dc7e9fbfb1e7dbfa4f9abb82be91a7d525..ae4ef10576674e48c03d3bfff0627e0dea282424 100644 (file)
@@ -318,11 +318,7 @@ public class SheetUtil {
         copyAttributes(font, str, 0, "1w".length());
 
         TextLayout layout = new TextLayout(str.getIterator(), fontRenderContext);
-        if(layout.getBounds().getWidth() > 0) {
-            return true;
-        }
-
-        return false;
+        return (layout.getBounds().getWidth() > 0);
     }
 
     /**