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 2016/07/18 09:34:59 UTC
svn commit: r1753188 - in /poi/trunk/src:
java/org/apache/poi/hssf/record/RecordFactory.java
java/org/apache/poi/hssf/record/aggregates/ConditionalFormattingTable.java
testcases/org/apache/poi/ss/format/TestCellFormatCondition.java
Author: centic
Date: Mon Jul 18 09:34:59 2016
New Revision: 1753188
URL: http://svn.apache.org/viewvc?rev=1753188&view=rev
Log:
Some warnings/improvements suggested by IntelliJ
Modified:
poi/trunk/src/java/org/apache/poi/hssf/record/RecordFactory.java
poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ConditionalFormattingTable.java
poi/trunk/src/testcases/org/apache/poi/ss/format/TestCellFormatCondition.java
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/RecordFactory.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/RecordFactory.java?rev=1753188&r1=1753187&r2=1753188&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/RecordFactory.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/RecordFactory.java Mon Jul 18 09:34:59 2016
@@ -90,12 +90,12 @@ public final class RecordFactory {
throw new RuntimeException(e);
} catch (InvocationTargetException e) {
Throwable t = e.getTargetException();
- if (t instanceof RecordFormatException) {
- throw (RecordFormatException)t;
+ if (t instanceof org.apache.poi.util.RecordFormatException) {
+ throw (org.apache.poi.util.RecordFormatException)t;
} else if (t instanceof EncryptedDocumentException) {
throw (EncryptedDocumentException)t;
} else {
- throw new RecordFormatException("Unable to construct record instance" , t);
+ throw new org.apache.poi.util.RecordFormatException("Unable to construct record instance" , t);
}
}
}
@@ -123,7 +123,7 @@ public final class RecordFactory {
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
} catch (InvocationTargetException e) {
- throw new RecordFormatException("Unable to construct record instance" , e.getTargetException());
+ throw new org.apache.poi.util.RecordFormatException("Unable to construct record instance" , e.getTargetException());
}
}
@Override
@@ -443,7 +443,7 @@ public final class RecordFactory {
try {
sid = recClass.getField("sid").getShort(null);
} catch (Exception illegalArgumentException) {
- throw new RecordFormatException(
+ throw new org.apache.poi.util.RecordFormatException(
"Unable to determine record types");
}
Integer key = Integer.valueOf(sid);
@@ -482,9 +482,9 @@ public final class RecordFactory {
*
* @return an array of Records created from the InputStream
*
- * @exception RecordFormatException on error processing the InputStream
+ * @exception org.apache.poi.util.RecordFormatException on error processing the InputStream
*/
- public static List<Record> createRecords(InputStream in) throws RecordFormatException {
+ public static List<Record> createRecords(InputStream in) throws org.apache.poi.util.RecordFormatException {
List<Record> records = new ArrayList<Record>(NUM_RECORDS);
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ConditionalFormattingTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ConditionalFormattingTable.java?rev=1753188&r1=1753187&r2=1753188&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ConditionalFormattingTable.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ConditionalFormattingTable.java Mon Jul 18 09:34:59 2016
@@ -51,8 +51,7 @@ public final class ConditionalFormatting
}
public void visitContainedRecords(RecordVisitor rv) {
- for (int i = 0; i < _cfHeaders.size(); i++) {
- CFRecordsAggregate subAgg = _cfHeaders.get(i);
+ for (CFRecordsAggregate subAgg : _cfHeaders) {
subAgg.visitContainedRecords(rv);
}
}
Modified: poi/trunk/src/testcases/org/apache/poi/ss/format/TestCellFormatCondition.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/format/TestCellFormatCondition.java?rev=1753188&r1=1753187&r2=1753188&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/format/TestCellFormatCondition.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/format/TestCellFormatCondition.java Mon Jul 18 09:34:59 2016
@@ -17,7 +17,6 @@
package org.apache.poi.ss.format;
import junit.framework.TestCase;
-import org.apache.poi.ss.format.CellFormatCondition;
public class TestCellFormatCondition extends TestCase {
public void testSVConditions() {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org