From: Nick Burch Date: Fri, 2 May 2014 09:15:23 +0000 (+0000) Subject: Generics warnings fixes X-Git-Tag: REL_3_11_BETA1~150 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=aef0863d265c95ed161ce1bb6fe6f789bdfe143c;p=poi.git Generics warnings fixes git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1591838 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java b/src/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java index 85bfb7a662..03f9787571 100644 --- a/src/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java +++ b/src/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java @@ -24,19 +24,16 @@ import org.apache.poi.hssf.model.RecordStream; import org.apache.poi.hssf.record.CFHeaderRecord; import org.apache.poi.hssf.record.CFRuleRecord; import org.apache.poi.hssf.record.Record; +import org.apache.poi.ss.formula.FormulaShifter; import org.apache.poi.ss.formula.ptg.AreaErrPtg; import org.apache.poi.ss.formula.ptg.AreaPtg; -import org.apache.poi.ss.formula.FormulaShifter; import org.apache.poi.ss.formula.ptg.Ptg; import org.apache.poi.ss.util.CellRangeAddress; /** * CFRecordsAggregate - aggregates Conditional Formatting records CFHeaderRecord * and number of up to three CFRuleRecord records together to simplify - * access to them. - * - * @author Dmitriy Kumshayev - * + * access to them. */ public final class CFRecordsAggregate extends RecordAggregate { /** Excel allows up to 3 conditional formating rules */ @@ -45,7 +42,7 @@ public final class CFRecordsAggregate extends RecordAggregate { private final CFHeaderRecord header; /** List of CFRuleRecord objects */ - private final List rules; + private final List rules; private CFRecordsAggregate(CFHeaderRecord pHeader, CFRuleRecord[] pRules) { if(pHeader == null) { @@ -62,7 +59,7 @@ public final class CFRecordsAggregate extends RecordAggregate { throw new RuntimeException("Mismatch number of rules"); } header = pHeader; - rules = new ArrayList(3); + rules = new ArrayList(3); for (int i = 0; i < pRules.length; i++) { rules.add(pRules[i]); } @@ -124,7 +121,7 @@ public final class CFRecordsAggregate extends RecordAggregate { } public CFRuleRecord getRule(int idx) { checkRuleIndex(idx); - return (CFRuleRecord) rules.get(idx); + return rules.get(idx); } public void setRule(int idx, CFRuleRecord r) { if (r == null) { @@ -162,7 +159,7 @@ public final class CFRecordsAggregate extends RecordAggregate { } for(int i=0; i temp = new ArrayList(); for (int i = 0; i < cellRanges.length; i++) { CellRangeAddress craOld = cellRanges[i]; CellRangeAddress craNew = shiftRange(shifter, craOld, currentExternSheetIx); @@ -208,7 +205,7 @@ public final class CFRecordsAggregate extends RecordAggregate { } for(int i=0; i