close
+ *
+ * - arcTo
+ * - moveTo/li>
+ *
- lineTo/li>
+ *
- cubicBezTo/li>
+ *
- quadBezTo/li>
+ *
- close/li>
+ *
*/
public interface PathCommand {
/**
diff --git a/src/java/org/apache/poi/sl/usermodel/TextParagraph.java b/src/java/org/apache/poi/sl/usermodel/TextParagraph.java
index 0f6a25b9cc..354b357b94 100644
--- a/src/java/org/apache/poi/sl/usermodel/TextParagraph.java
+++ b/src/java/org/apache/poi/sl/usermodel/TextParagraph.java
@@ -146,8 +146,8 @@ public interface TextParagraph<
* The amount of vertical white space before the paragraph
* This may be specified in two different ways, percentage spacing and font point spacing:
*
- * If spaceBefore >= 0, then space is a percentage of normal line height.
- * If spaceBefore < 0, the absolute value in points
+ * If spaceBefore >= 0, then space is a percentage of normal line height.
+ * If spaceBefore < 0, the absolute value in points
*
*
* @return the vertical white space before the paragraph, or null if unset
@@ -158,8 +158,8 @@ public interface TextParagraph<
* Set the amount of vertical white space that will be present before the paragraph.
* This space is specified in either percentage or points:
*
- * If spaceBefore >= 0, then space is a percentage of normal line height.
- * If spaceBefore < 0, the absolute value of linespacing is the spacing in points
+ * If spaceBefore >= 0, then space is a percentage of normal line height.
+ * If spaceBefore < 0, the absolute value of linespacing is the spacing in points
*
* Examples:
*
@@ -179,8 +179,8 @@ public interface TextParagraph<
* The amount of vertical white space after the paragraph
* This may be specified in two different ways, percentage spacing and font point spacing:
*
- * If spaceBefore >= 0, then space is a percentage of normal line height.
- * If spaceBefore < 0, the absolute value of linespacing is the spacing in points
+ * If spaceBefore >= 0, then space is a percentage of normal line height.
+ * If spaceBefore < 0, the absolute value of linespacing is the spacing in points
*
*
* @return the vertical white space after the paragraph or null, if unset
@@ -191,8 +191,8 @@ public interface TextParagraph<
* Set the amount of vertical white space that will be present after the paragraph.
* This space is specified in either percentage or points:
*
- * If spaceAfter >= 0, then space is a percentage of normal line height.
- * If spaceAfter < 0, the absolute value of linespacing is the spacing in points
+ * If spaceAfter >= 0, then space is a percentage of normal line height.
+ * If spaceAfter < 0, the absolute value of linespacing is the spacing in points
*
* Examples:
*
@@ -283,8 +283,8 @@ public interface TextParagraph<
* This element specifies the vertical line spacing that is to be used within a paragraph.
* This may be specified in two different ways, percentage spacing and font point spacing:
*
- * If linespacing >= 0, then linespacing is a percentage of normal line height
- * If linespacing < 0, the absolute value of linespacing is the spacing in points
+ * If linespacing >= 0, then linespacing is a percentage of normal line height
+ * If linespacing < 0, the absolute value of linespacing is the spacing in points
*
* Examples:
*
diff --git a/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java b/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java
index d8b83412c9..594dfb4541 100644
--- a/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java
+++ b/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java
@@ -823,7 +823,7 @@ public final class WorkbookEvaluator {
*
* Returns a single value e.g. a cell formula result or boolean value for conditional formatting.
*
- * @param formula
+ * @param formula The formula to evaluate
* @param target cell context for the operation
* @param region containing the cell
* @return value
@@ -840,8 +840,8 @@ public final class WorkbookEvaluator {
* offset position relative to the top left of the range.
*
* Returns a ValueEval that may be one or more values, such as the allowed values for a data validation constraint.
- *
- * @param formula
+ *
+ * @param formula The formula to evaluate
* @param target cell context for the operation
* @param region containing the cell
* @return ValueEval for one or more values
diff --git a/src/java/org/apache/poi/ss/formula/eval/OperandResolver.java b/src/java/org/apache/poi/ss/formula/eval/OperandResolver.java
index 26de08c534..1c6e604a13 100644
--- a/src/java/org/apache/poi/ss/formula/eval/OperandResolver.java
+++ b/src/java/org/apache/poi/ss/formula/eval/OperandResolver.java
@@ -35,10 +35,10 @@ public final class OperandResolver {
private static final String Digits = "(\\p{Digit}+)";
private static final String Exp = "[eE][+-]?"+Digits;
private static final String fpRegex =
- ("[\\x00-\\x20]*" +
- "[+-]?(" +
- "((("+Digits+"(\\.)?("+Digits+"?)("+Exp+")?)|"+
- "(\\.("+Digits+")("+Exp+")?))))"+
+ ("[\\x00-\\x20]*" +
+ "[+-]?(" +
+ "("+Digits+"(\\.)?("+Digits+"?)("+Exp+")?)|"+
+ "(\\."+Digits+"("+Exp+")?))"+
"[\\x00-\\x20]*");
@@ -54,7 +54,7 @@ public final class OperandResolver {
* @param srcCellCol used when arg is a single row AreaRef
* @return a NumberEval, StringEval, BoolEval or BlankEval.
* Never null
or ErrorEval.
- * @throws EvaluationException(#VALUE!) if srcCellRow or srcCellCol do not properly index into
+ * @throws EvaluationException if srcCellRow or srcCellCol do not properly index into
* an AreaEval. If the actual value retrieved is an ErrorEval, a corresponding
* EvaluationException is thrown.
*/
@@ -243,7 +243,7 @@ public final class OperandResolver {
* @param ev must be a {@link NumberEval}, {@link StringEval}, {@link BoolEval} or
* {@link BlankEval}
* @return actual, parsed or interpreted double value (respectively).
- * @throws EvaluationException(#VALUE!) only if a StringEval is supplied and cannot be parsed
+ * @throws EvaluationException if a StringEval is supplied and cannot be parsed
* as a double (See parseDouble() for allowable formats).
* @throws RuntimeException if the supplied parameter is not {@link NumberEval},
* {@link StringEval}, {@link BoolEval} or {@link BlankEval}
@@ -329,10 +329,6 @@ public final class OperandResolver {
return Boolean.valueOf(((BoolEval) ve).getBooleanValue());
}
- if (ve == BlankEval.instance) {
- return null;
- }
-
if (ve instanceof StringEval) {
if (stringsAreBlanks) {
return null;
diff --git a/src/java/org/apache/poi/ss/formula/eval/RelationalOperationEval.java b/src/java/org/apache/poi/ss/formula/eval/RelationalOperationEval.java
index a64c7994e1..0b0cc87c8f 100644
--- a/src/java/org/apache/poi/ss/formula/eval/RelationalOperationEval.java
+++ b/src/java/org/apache/poi/ss/formula/eval/RelationalOperationEval.java
@@ -42,18 +42,18 @@ public abstract class RelationalOperationEval extends Fixed2ArgFunction implemen
* for the relational operators Evals.
*
*
- * Bool.TRUE > any number.
- * Bool > any string. ALWAYS
- * Bool.TRUE > Bool.FALSE
+ * Bool.TRUE > any number.
+ * Bool > any string. ALWAYS
+ * Bool.TRUE > Bool.FALSE
* Bool.FALSE == Blank
*
* Strings are never converted to numbers or booleans
- * String > any number. ALWAYS
- * Non-empty String > Blank
+ * String > any number. ALWAYS
+ * Non-empty String > Blank
* Empty String == Blank
* String are sorted dictionary wise
*
- * Blank > Negative numbers
+ * Blank > Negative numbers
* Blank == 0
* Blank < Positive numbers
*
diff --git a/src/java/org/apache/poi/ss/usermodel/Font.java b/src/java/org/apache/poi/ss/usermodel/Font.java
index 66c54ba89c..3ccd394c15 100644
--- a/src/java/org/apache/poi/ss/usermodel/Font.java
+++ b/src/java/org/apache/poi/ss/usermodel/Font.java
@@ -265,7 +265,7 @@ public interface Font {
void setCharSet(int charset);
/**
- * get the index within the XSSFWorkbook (sequence within the collection of Font objects)
+ * Get the index within the XSSFWorkbook (sequence within the collection of Font objects)
*
* @return unique index number of the underlying record this Font represents (probably you don't care
* unless you're comparing which one is which)
diff --git a/src/java/org/apache/poi/ss/usermodel/helpers/BaseRowColShifter.java b/src/java/org/apache/poi/ss/usermodel/helpers/BaseRowColShifter.java
index f0bf7ab21e..a044932cb8 100644
--- a/src/java/org/apache/poi/ss/usermodel/helpers/BaseRowColShifter.java
+++ b/src/java/org/apache/poi/ss/usermodel/helpers/BaseRowColShifter.java
@@ -60,7 +60,7 @@ public abstract class BaseRowColShifter {
/**
* Update conditional formatting
- * @param formulaShifter
+ * @param formulaShifter The {@link FormulaShifter} to use
*/
public abstract void updateConditionalFormatting(FormulaShifter formulaShifter);
diff --git a/src/testcases/org/apache/poi/hssf/record/TestTextObjectBaseRecord.java b/src/testcases/org/apache/poi/hssf/record/TestTextObjectBaseRecord.java
index b14fd762cc..f149636bd0 100644
--- a/src/testcases/org/apache/poi/hssf/record/TestTextObjectBaseRecord.java
+++ b/src/testcases/org/apache/poi/hssf/record/TestTextObjectBaseRecord.java
@@ -51,24 +51,21 @@ public final class TestTextObjectBaseRecord extends TestCase {
"02 00 00 00 00 00 00 00 "
);
-
public void testLoad() {
RecordInputStream in = TestcaseRecordInputStream.create(data);
TextObjectRecord record = new TextObjectRecord(in);
assertEquals(TextObjectRecord.HORIZONTAL_TEXT_ALIGNMENT_CENTERED, record.getHorizontalTextAlignment());
assertEquals(TextObjectRecord.VERTICAL_TEXT_ALIGNMENT_JUSTIFY, record.getVerticalTextAlignment());
- assertEquals(true, record.isTextLocked());
+ assertTrue(record.isTextLocked());
assertEquals(TextObjectRecord.TEXT_ORIENTATION_ROT_RIGHT, record.getTextOrientation());
assertEquals(49, record.getRecordSize() );
}
- public void testStore()
- {
+ public void testStore() {
TextObjectRecord record = new TextObjectRecord();
-
HSSFRichTextString str = new HSSFRichTextString("AB");
str.applyFont(0, 2, (short)0x0018);
str.applyFont(2, 2, (short)0x0320);
diff --git a/src/testcases/org/apache/poi/ss/formula/eval/TestOperandResolver.java b/src/testcases/org/apache/poi/ss/formula/eval/TestOperandResolver.java
index 4e24f84e70..72fb29ca63 100644
--- a/src/testcases/org/apache/poi/ss/formula/eval/TestOperandResolver.java
+++ b/src/testcases/org/apache/poi/ss/formula/eval/TestOperandResolver.java
@@ -28,31 +28,23 @@ import junit.framework.TestCase;
public final class TestOperandResolver extends TestCase {
public void testParseDouble_bug48472() {
-
- String value = "-";
-
- Double resolvedValue = null;
+ final Double resolvedValue;
try {
- resolvedValue = OperandResolver.parseDouble(value);
+ resolvedValue = OperandResolver.parseDouble("-");
} catch (StringIndexOutOfBoundsException e) {
throw new AssertionFailedError("Identified bug 48472");
}
-
- assertEquals(null, resolvedValue);
-
+
+ assertNull(resolvedValue);
}
public void testParseDouble_bug49723() {
-
String value = ".1";
- Double resolvedValue = null;
-
- resolvedValue = OperandResolver.parseDouble(value);
+ Double resolvedValue = OperandResolver.parseDouble(value);
assertNotNull("Identified bug 49723", resolvedValue);
-
}
/**
@@ -61,14 +53,13 @@ public final class TestOperandResolver extends TestCase {
*
*/
public void testParseDoubleValidStrings() {
-
- String[] values = new String[]{".19", "0.19", "1.9", "1E4", "-.19", "-0.19", "8.5","-1E4", ".5E6","+1.5","+1E5", " +1E5 "};
-
+ String[] values = new String[]{".19", "0.19", "1.9", "1E4", "-.19", "-0.19",
+ "8.5","-1E4", ".5E6","+1.5","+1E5", " +1E5 ", " 123 ", "1E4", "-123" };
+
for (String value : values) {
- assertTrue(OperandResolver.parseDouble(value) != null);
+ assertNotNull(OperandResolver.parseDouble(value));
assertEquals(OperandResolver.parseDouble(value), Double.parseDouble(value));
}
-
}
/**
@@ -77,13 +68,10 @@ public final class TestOperandResolver extends TestCase {
*
*/
public void testParseDoubleInvalidStrings() {
-
String[] values = new String[]{"-", "ABC", "-X", "1E5a", "Infinity", "NaN", ".5F", "1,000"};
for (String value : values) {
- assertEquals(null, OperandResolver.parseDouble(value));
+ assertNull(OperandResolver.parseDouble(value));
}
-
}
-
}