mirror of
https://github.com/apache/poi.git
synced 2025-02-08 02:58:18 +00:00
rewrite ternary expression as simple Math.min call (yes, the ternary expression as written is equivalent to min, not max, despite the variable being called max. I'll leave that fix up to the original author).
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1716044 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7122ad4549
commit
6c7a9314db
@ -141,8 +141,9 @@ public class XSSFTable extends POIXMLDocumentPart {
|
||||
commonTokens = tokens;
|
||||
|
||||
} else {
|
||||
int maxLenght = commonTokens.length>tokens.length? tokens.length:commonTokens.length;
|
||||
for (int i =0; i<maxLenght;i++) {
|
||||
final int maxLength = Math.min(commonTokens.length, tokens.length);
|
||||
|
||||
for (int i =0; i<maxLength; i++) {
|
||||
if (!commonTokens[i].equals(tokens[i])) {
|
||||
List<String> subCommonTokens = Arrays.asList(commonTokens).subList(0, i);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user