You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ce...@apache.org on 2017/11/08 14:59:08 UTC

svn commit: r1814587 - in /poi/trunk/src: java/org/apache/poi/ss/formula/ java/org/apache/poi/ss/formula/functions/ java/org/apache/poi/ss/usermodel/ java/org/apache/poi/ss/util/ scratchpad/src/org/apache/poi/hdgf/chunks/ scratchpad/src/org/apache/poi/...

Author: centic
Date: Wed Nov  8 14:59:08 2017
New Revision: 1814587

URL: http://svn.apache.org/viewvc?rev=1814587&view=rev
Log:
Some JavaDoc adjustments, typos, IntelliJ warnings

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

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationConditionalFormatRule.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationConditionalFormatRule.java?rev=1814587&r1=1814586&r2=1814587&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationConditionalFormatRule.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationConditionalFormatRule.java Wed Nov  8 14:59:08 2017
@@ -84,7 +84,7 @@ public class EvaluationConditionalFormat
     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;
     
     /**

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Mode.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Mode.java?rev=1814587&r1=1814586&r2=1814587&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Mode.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Mode.java Wed Nov  8 14:59:08 2017
@@ -42,7 +42,7 @@ public final class Mode implements Funct
 	 * 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) {

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java?rev=1814587&r1=1814586&r2=1814587&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java Wed Nov  8 14:59:08 2017
@@ -137,7 +137,7 @@ public class DataFormatter implements Ob
      * 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.

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java?rev=1814587&r1=1814586&r2=1814587&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java Wed Nov  8 14:59:08 2017
@@ -268,7 +268,7 @@ public interface Sheet extends Iterable<
      */
     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);

Modified: poi/trunk/src/java/org/apache/poi/ss/util/NumberComparer.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/util/NumberComparer.java?rev=1814587&r1=1814586&r2=1814587&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/util/NumberComparer.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/util/NumberComparer.java Wed Nov  8 14:59:08 2017
@@ -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
 	 */

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java?rev=1814587&r1=1814586&r2=1814587&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java Wed Nov  8 14:59:08 2017
@@ -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

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java?rev=1814587&r1=1814586&r2=1814587&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java Wed Nov  8 14:59:08 2017
@@ -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) {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org