Author: onealj
Date: Tue Oct 17 07:43:41 2017
New Revision: 1812363
URL: http://svn.apache.org/viewvc?rev=1812363&view=rev
Log:
IntelliJ: simplify boolean logic
Modified:
poi/trunk/src/java/org/apache/poi/ss/util/AreaReference.java
poi/trunk/src/java/org/apache/poi/ss/util/SheetUtil.java
Modified: poi/trunk/src/java/org/apache/poi/ss/util/AreaReference.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/util/AreaReference.java?rev=1812363&r1=1812362&r2=1812363&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/util/AreaReference.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/util/AreaReference.java Tue Oct 17
07:43:41 2017
@@ -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);
Modified: poi/trunk/src/java/org/apache/poi/ss/util/SheetUtil.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/util/SheetUtil.java?rev=1812363&r1=1812362&r2=1812363&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/util/SheetUtil.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/util/SheetUtil.java Tue Oct 17
07:43:41 2017
@@ -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);
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]