diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFRichTextString.java b/src/java/org/apache/poi/hssf/usermodel/HSSFRichTextString.java index 76572de74..7898317e8 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFRichTextString.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFRichTextString.java @@ -22,6 +22,7 @@ import java.util.Iterator; import org.apache.poi.hssf.model.InternalWorkbook; import org.apache.poi.hssf.record.LabelSSTRecord; import org.apache.poi.hssf.record.common.UnicodeString; +import org.apache.poi.hssf.record.common.UnicodeString.FormatRun; import org.apache.poi.ss.usermodel.Font; import org.apache.poi.ss.usermodel.RichTextString; /** @@ -147,10 +148,10 @@ public final class HSSFRichTextString implements Comparable, //Need to clear the current formatting between the startIndex and endIndex _string = cloneStringIfRequired(); - Iterator formatting = _string.formatIterator(); + Iterator formatting = _string.formatIterator(); if (formatting != null) { while (formatting.hasNext()) { - UnicodeString.FormatRun r = (UnicodeString.FormatRun)formatting.next(); + UnicodeString.FormatRun r = formatting.next(); if ((r.getCharacterPos() >= startIndex) && (r.getCharacterPos() < endIndex)) formatting.remove(); } diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java index 44070b1b5..46aa35256 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java @@ -18,7 +18,6 @@ package org.apache.poi.xssf.usermodel; import java.util.Iterator; -import java.util.Map; import java.util.TreeMap; import org.apache.poi.ss.SpreadsheetVersion;