]> source.dussan.org Git - poi.git/commitdiff
Some JavaDoc adjustments, typos, IntelliJ warnings
authorDominik Stadler <centic@apache.org>
Wed, 8 Nov 2017 14:59:08 +0000 (14:59 +0000)
committerDominik Stadler <centic@apache.org>
Wed, 8 Nov 2017 14:59:08 +0000 (14:59 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1814587 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/ss/formula/EvaluationConditionalFormatRule.java
src/java/org/apache/poi/ss/formula/functions/Mode.java
src/java/org/apache/poi/ss/usermodel/DataFormatter.java
src/java/org/apache/poi/ss/usermodel/Sheet.java
src/java/org/apache/poi/ss/util/NumberComparer.java
src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java
src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java

index 52305578ba033ac5921c6a9caba7658907b0c68e..d90e00b3d66a01f1a36a304ba7d004f554b91384 100644 (file)
@@ -84,7 +84,7 @@ public class EvaluationConditionalFormatRule implements Comparable<EvaluationCon
     private final String formula2;
     private final OperatorEnum operator;
     private final ConditionType type;
-    // cached for performance, to avoid reading the XMLBean every time a conditinally formatted cell is rendered
+    // cached for performance, to avoid reading the XMLBean every time a conditionally formatted cell is rendered
     private final ExcelNumberFormat numberFormat;
     
     /**
index 8e26376a41f12284ccbb9d34d5942596ffe78648..978c9cad38ab968faffdfaec6f69686802dde63d 100644 (file)
@@ -42,7 +42,7 @@ public final class Mode implements Function {
         * Double.NaN. Else returns the value that occurs most times and if there is
         * a tie, returns the first such value.
         *
-        * @param v
+        * @param v An array of values on which the mode is computed.
         */
        public static double evaluate(double[] v) throws EvaluationException {
                if (v.length < 2) {
index 8cba3dd29325808ba7b2776175e63e83f1d2c06f..09e9b8455812ecf8bd133704bc39d0d2f7ad3444 100644 (file)
@@ -137,7 +137,7 @@ public class DataFormatter implements Observer {
      * A regex to find locale patterns like [$$-1009] and [$?-452].
      * Note that we don't currently process these into locales 
      */
-    private static final Pattern localePatternGroup = Pattern.compile("(\\[\\$[^-\\]]*-[0-9A-Z]+\\])");
+    private static final Pattern localePatternGroup = Pattern.compile("(\\[\\$[^-\\]]*-[0-9A-Z]+])");
 
     /**
      * A regex to match the colour formattings rules.
index a0d1a3de7bdfadbeae2bdc6d406dffc95a876c2b..586207ebb20bb7b6fe758b7142009b2f614f64bf 100644 (file)
@@ -268,7 +268,7 @@ public interface Sheet extends Iterable<Row> {
      */
     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<Row> {
 
     /**
      * 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<Row> {
 
     /**
      * 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<Row> {
     /**
      * 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);
index bf903ffa921198f68de11fece6e21dad3f52f27c..31be44e834d8e608b17c09ab5f5cfca7b8b752fc 100644 (file)
@@ -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
         */
index 3224efa29ea2d0b849fb589add7e59c3d2d0960a..dd345e1595fa7fbb9f9382502edb5b10347518b5 100644 (file)
@@ -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
index 94c1e8e2fecdb362b32764241872e9dc74b33078..8cdb729ac8e330293dc423d458ab46ca875be3d0 100644 (file)
@@ -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) {