From 76d11ac37e6326b87282dba3e802b7cc8302f9f9 Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Wed, 8 Nov 2017 14:59:08 +0000 Subject: [PATCH] Some JavaDoc adjustments, typos, IntelliJ warnings git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1814587 13f79535-47bb-0310-9956-ffa450edef68 --- .../ss/formula/EvaluationConditionalFormatRule.java | 2 +- .../org/apache/poi/ss/formula/functions/Mode.java | 2 +- .../org/apache/poi/ss/usermodel/DataFormatter.java | 2 +- src/java/org/apache/poi/ss/usermodel/Sheet.java | 10 +++++----- src/java/org/apache/poi/ss/util/NumberComparer.java | 12 +++++------- .../src/org/apache/poi/hdgf/chunks/Chunk.java | 4 ++-- .../src/org/apache/poi/hwpf/model/SectionTable.java | 2 +- 7 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/java/org/apache/poi/ss/formula/EvaluationConditionalFormatRule.java b/src/java/org/apache/poi/ss/formula/EvaluationConditionalFormatRule.java index 52305578ba..d90e00b3d6 100644 --- a/src/java/org/apache/poi/ss/formula/EvaluationConditionalFormatRule.java +++ b/src/java/org/apache/poi/ss/formula/EvaluationConditionalFormatRule.java @@ -84,7 +84,7 @@ public class EvaluationConditionalFormatRule implements Comparable { */ public CellStyle getColumnStyle(int column); - /** + /* * Sets the CellStyle that applies to the given * (0 based) column. */ @@ -810,7 +810,7 @@ public interface Sheet extends Iterable { /** * Removes the page break at the indicated row - * @param row + * @param row The 0-based index of the row. */ void removeRowBreak(int row); @@ -848,7 +848,7 @@ public interface Sheet extends Iterable { /** * Removes a page break at the indicated column - * @param column + * @param column The 0-based index of the column. */ void removeColumnBreak(int column); @@ -1139,8 +1139,8 @@ public interface Sheet extends Iterable { /** * Get a Hyperlink in this sheet anchored at row, column * - * @param row - * @param column + * @param row The 0-based index of the row to look at. + * @param column The 0-based index of the column to look at. * @return hyperlink if there is a hyperlink anchored at row, column; otherwise returns null */ public Hyperlink getHyperlink(int row, int column); diff --git a/src/java/org/apache/poi/ss/util/NumberComparer.java b/src/java/org/apache/poi/ss/util/NumberComparer.java index bf903ffa92..31be44e834 100644 --- a/src/java/org/apache/poi/ss/util/NumberComparer.java +++ b/src/java/org/apache/poi/ss/util/NumberComparer.java @@ -131,13 +131,13 @@ public final class NumberComparer { * If both numbers are subnormal, Excel seems to use standard comparison rules */ private static int compareSubnormalNumbers(long fracA, long fracB, boolean isNegative) { - int cmp = Long.compare(fracA, fracB); - - return isNegative ? -cmp : cmp; + if(isNegative) { + return Long.compare(fracB, fracA); + } else { + return Long.compare(fracA, fracB); + } } - - /** * Usually any normal number is greater (in magnitude) than any subnormal number. * However there are some anomalous cases around the threshold where Excel produces screwy results @@ -164,8 +164,6 @@ public final class NumberComparer { return isNegative ? -1 : +1; } - - /** * for formatting double values in error messages */ diff --git a/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java b/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java index 3224efa29e..dd345e1595 100644 --- a/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java +++ b/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java @@ -42,7 +42,7 @@ public final class Chunk { protected CommandDefinition[] commandDefinitions; /** The command+value pairs we hold */ private Command[] commands; - /** The blocks (if any) we hold */ + /* The blocks (if any) we hold */ //private Block[] blocks /** The name of the chunk, as found from the commandDefinitions */ private String name; @@ -265,7 +265,7 @@ public final class Chunk { public CommandDefinition getDefinition() { return definition; } public Object getValue() { return value; } } - /** + /* * A special kind of command that is an artificat of how we * process CommandDefinitions, and so doesn't actually exist * in the chunk diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java b/src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java index 94c1e8e2fe..8cdb729ac8 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java @@ -182,7 +182,7 @@ public class SectionTable { int offset = wordDocumentStream.size(); - int len = _sections.size(); + //int len = _sections.size(); PlexOfCps plex = new PlexOfCps(SED_SIZE); for (SEPX sepx : _sections) { -- 2.39.5