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 2015/03/22 22:45:03 UTC

svn commit: r1668480 - in /poi/trunk/src: examples/src/org/apache/poi/hpsf/examples/ scratchpad/src/org/apache/poi/hdf/event/ scratchpad/src/org/apache/poi/hdf/model/util/ scratchpad/src/org/apache/poi/hwpf/converter/ scratchpad/src/org/apache/poi/hwpf...

Author: centic
Date: Sun Mar 22 21:45:03 2015
New Revision: 1668480

URL: http://svn.apache.org/r1668480
Log:
Eclipse warnings, Generics, unused members in some exapmles and scratchpad classes.

Modified:
    poi/trunk/src/examples/src/org/apache/poi/hpsf/examples/ReadCustomPropertySets.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hdf/event/EventBridge.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/util/BTreeSet.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/extractor/Word6Extractor.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/extractor/WordExtractor.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPFormattedDiskPage.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterProperties.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/HWPFList.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ParagraphProperties.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableCellDescriptor.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableProperties.java

Modified: poi/trunk/src/examples/src/org/apache/poi/hpsf/examples/ReadCustomPropertySets.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/examples/src/org/apache/poi/hpsf/examples/ReadCustomPropertySets.java?rev=1668480&r1=1668479&r2=1668480&view=diff
==============================================================================
--- poi/trunk/src/examples/src/org/apache/poi/hpsf/examples/ReadCustomPropertySets.java (original)
+++ poi/trunk/src/examples/src/org/apache/poi/hpsf/examples/ReadCustomPropertySets.java Sun Mar 22 21:45:03 2015
@@ -93,12 +93,12 @@ public class ReadCustomPropertySets
             out("   No. of sections: " + sectionCount);
 
             /* Print the list of sections: */
-            List sections = ps.getSections();
+            List<Section> sections = ps.getSections();
             int nr = 0;
-            for (Iterator i = sections.iterator(); i.hasNext();)
+            for (Iterator<Section> i = sections.iterator(); i.hasNext();)
             {
                 /* Print a single section: */
-                Section sec = (Section) i.next();
+                Section sec = i.next();
                 out("   Section " + nr++ + ":");
                 String s = hex(sec.getFormatID().getBytes());
                 s = s.substring(0, s.length() - 1);

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hdf/event/EventBridge.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdf/event/EventBridge.java?rev=1668480&r1=1668479&r2=1668480&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdf/event/EventBridge.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdf/event/EventBridge.java Sun Mar 22 21:45:03 2015
@@ -21,10 +21,10 @@ package org.apache.poi.hdf.event;
 import org.apache.poi.hdf.model.util.BTreeSet;
 import org.apache.poi.hdf.model.util.NumberFormatter;
 import org.apache.poi.hdf.model.hdftypes.*;
-
 import org.apache.poi.util.LittleEndian;
 
 import java.util.ArrayList;
+import java.util.List;
 
 @Deprecated
 public final class EventBridge implements HDFLowLevelParsingListener
@@ -71,11 +71,11 @@ public final class EventBridge implement
   BTreeSet _hdrCharacterRuns = new BTreeSet();
 
   int _sectionCounter = 1;
-  ArrayList _hdrs = new ArrayList();
+  List<HeaderFooter[]> _hdrs = new ArrayList<HeaderFooter[]>();
 
   private boolean _holdParagraph = false;
   private int _endHoldIndex = -1;
-  private ArrayList _onHold;
+  private List<PropertyNode> _onHold;
 
   public EventBridge(HDFParsingListener listener)
   {
@@ -119,7 +119,7 @@ public final class EventBridge implement
   {
     for (int x = 1; x < _sectionCounter; x++)
     {
-      HeaderFooter[] hdrArray = (HeaderFooter[])_hdrs.get(x-1);
+      HeaderFooter[] hdrArray = _hdrs.get(x-1);
       HeaderFooter hf = null;
 
       if (!hdrArray[HeaderFooter.HEADER_EVEN - 1].isEmpty())
@@ -210,7 +210,7 @@ public final class EventBridge implement
         _holdParagraph = false;
         _endHoldIndex = -1;
         flushHeldParagraph();
-        _onHold = new ArrayList();
+        _onHold = new ArrayList<PropertyNode>();
       }
     }
 
@@ -219,7 +219,7 @@ public final class EventBridge implement
 
     CharacterProperties chp = (CharacterProperties)StyleSheet.uncompressProperty(byteChpx, _currentStd.getCHP(), _stsh);
 
-    ArrayList textList = BTreeSet.findProperties(start, end, _text.root);
+    List<PropertyNode> textList = BTreeSet.findProperties(start, end, _text.root);
     String text = getTextFromNodes(textList, start, end);
 
     _listener.characterRun(chp, text, start - _fcMin, end - _fcMin);
@@ -241,7 +241,7 @@ public final class EventBridge implement
   }
   private void flushHeaderProps(int start, int end)
   {
-    ArrayList list = BTreeSet.findProperties(start, end, _hdrSections.root);
+    List<PropertyNode> list = BTreeSet.findProperties(start, end, _hdrSections.root);
     int size = list.size();
 
     for (int x = 0; x < size; x++)
@@ -253,7 +253,7 @@ public final class EventBridge implement
       //SepxNode node = new SepxNode(-1, secStart, secEnd, oldNode.getSepx());
       //bodySection(node);
 
-      ArrayList parList = BTreeSet.findProperties(secStart, secEnd, _hdrParagraphs.root);
+      List<PropertyNode> parList = BTreeSet.findProperties(secStart, secEnd, _hdrParagraphs.root);
       int parSize = parList.size();
 
       for (int y = 0; y < parSize; y++)
@@ -265,7 +265,7 @@ public final class EventBridge implement
         PapxNode parNode = new PapxNode(parStart, parEnd, oldParNode.getPapx());
         paragraph(parNode);
 
-        ArrayList charList = BTreeSet.findProperties(parStart, parEnd, _hdrCharacterRuns.root);
+        List<PropertyNode> charList = BTreeSet.findProperties(parStart, parEnd, _hdrCharacterRuns.root);
         int charSize = charList.size();
 
         for (int z = 0; z < charSize; z++)
@@ -282,7 +282,7 @@ public final class EventBridge implement
     }
 
   }
-  private String getTextFromNodes(ArrayList list, int start, int end)
+  private String getTextFromNodes(List<PropertyNode> list, int start, int end)
   {
     int size = list.size();
 

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/util/BTreeSet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/util/BTreeSet.java?rev=1668480&r1=1668479&r2=1668480&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/util/BTreeSet.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/util/BTreeSet.java Sun Mar 22 21:45:03 2015
@@ -36,14 +36,14 @@ import org.apache.poi.hdf.model.hdftypes
  *
 */
 @Deprecated
-public final class BTreeSet extends AbstractSet
+public final class BTreeSet extends AbstractSet<PropertyNode>
 {
 
     /*
      * Instance Variables
     */
     public BTreeNode root;
-    private Comparator comparator = null;
+    private Comparator<PropertyNode> comparator = null;
     private int order;
     int size = 0;
 
@@ -59,7 +59,7 @@ public final class BTreeSet extends Abst
         this(6);           // Default order for a BTreeSet is 32
     }
 
-    public BTreeSet(Collection c)
+    public BTreeSet(Collection<PropertyNode> c)
     {
         this(6);           // Default order for a BTreeSet is 32
         addAll(c);
@@ -70,7 +70,7 @@ public final class BTreeSet extends Abst
         this(order, null);
     }
 
-    public BTreeSet(int order, Comparator comparator)
+    public BTreeSet(int order, Comparator<PropertyNode> comparator)
     {
         this.order = order;
         this.comparator = comparator;
@@ -81,18 +81,18 @@ public final class BTreeSet extends Abst
     /*
      * Public Methods
     */
-    public boolean add(Object x) throws IllegalArgumentException
+    public boolean add(PropertyNode x) throws IllegalArgumentException
     {
         if (x == null) throw new IllegalArgumentException();
         return root.insert(x, -1);
     }
 
-    public boolean contains(Object x)
+    public boolean contains(PropertyNode x)
     {
         return root.includes(x);
     }
 
-    public boolean remove(Object x)
+    public boolean remove(PropertyNode x)
     {
         if (x == null) return false;
         return root.delete(x, -1);
@@ -109,14 +109,14 @@ public final class BTreeSet extends Abst
         size = 0;
     }
 
-    public java.util.Iterator iterator()
+	public java.util.Iterator<PropertyNode> iterator()
     {
         return new Iterator();
     }
 
-    public static ArrayList findProperties(int start, int end, BTreeSet.BTreeNode root)
+    public static List<PropertyNode> findProperties(int start, int end, BTreeSet.BTreeNode root)
     {
-      ArrayList results = new ArrayList();
+      List<PropertyNode> results = new ArrayList<PropertyNode>();
       BTreeSet.Entry[] entries = root.entries;
 
       for(int x = 0; x < entries.length; x++)
@@ -124,7 +124,7 @@ public final class BTreeSet extends Abst
         if(entries[x] != null)
         {
           BTreeSet.BTreeNode child = entries[x].child;
-          PropertyNode xNode = (PropertyNode)entries[x].element;
+          PropertyNode xNode = entries[x].element;
           if(xNode != null)
           {
             int xStart = xNode.getStart();
@@ -135,7 +135,7 @@ public final class BTreeSet extends Abst
               {
                 if(child != null)
                 {
-                  ArrayList beforeItems = findProperties(start, end, child);
+                  List<PropertyNode> beforeItems = findProperties(start, end, child);
                   results.addAll(beforeItems);
                 }
                 results.add(xNode);
@@ -150,7 +150,7 @@ public final class BTreeSet extends Abst
             {
               if(child != null)
               {
-                ArrayList beforeItems = findProperties(start, end, child);
+                List<PropertyNode> beforeItems = findProperties(start, end, child);
                 results.addAll(beforeItems);
               }
               break;
@@ -158,7 +158,7 @@ public final class BTreeSet extends Abst
           }
           else if(child != null)
           {
-            ArrayList afterItems = findProperties(start, end, child);
+            List<PropertyNode> afterItems = findProperties(start, end, child);
             results.addAll(afterItems);
           }
         }
@@ -172,9 +172,9 @@ public final class BTreeSet extends Abst
     /*
      * Private methods
     */
-    int compare(Object x, Object y)
+    int compare(PropertyNode x, PropertyNode y)
     {
-        return (comparator == null ? ((Comparable)x).compareTo(y) : comparator.compare(x, y));
+        return (comparator == null ? x.compareTo(y) : comparator.compare(x, y));
     }
 
 
@@ -192,12 +192,12 @@ public final class BTreeSet extends Abst
      * chance of receiving a NullPointerException. The Iterator.delete method is supported.
     */
 
-    private class Iterator implements java.util.Iterator
+    private class Iterator implements java.util.Iterator<PropertyNode>
     {
         private int index = 0;
-        private Stack parentIndex = new Stack(); // Contains all parentIndicies for currentNode
-        private Object lastReturned = null;
-        private Object next;
+        private Stack<Integer> parentIndex = new Stack<Integer>(); // Contains all parentIndicies for currentNode
+        private PropertyNode lastReturned = null;
+        private PropertyNode next;
         private BTreeNode currentNode;
 
         Iterator()
@@ -211,7 +211,7 @@ public final class BTreeSet extends Abst
             return next != null;
         }
 
-        public Object next()
+        public PropertyNode next()
         {
             if (next == null) throw new NoSuchElementException();
 
@@ -241,7 +241,7 @@ public final class BTreeSet extends Abst
             return temp;
         }
 
-        private Object nextElement()
+        private PropertyNode nextElement()
         {
             if (currentNode.isLeaf())
             {
@@ -250,13 +250,13 @@ public final class BTreeSet extends Abst
                 else if (!parentIndex.empty())
                 { //All elements have been returned, return successor of lastReturned if it exists
                     currentNode = currentNode.parent;
-                    index = ((Integer)parentIndex.pop()).intValue();
+                    index = parentIndex.pop().intValue();
 
                     while (index == currentNode.nrElements)
                     {
                         if (parentIndex.empty()) break;
                         currentNode = currentNode.parent;
-                        index = ((Integer)parentIndex.pop()).intValue();
+                        index = parentIndex.pop().intValue();
                     }
 
                     if (index == currentNode.nrElements) return null; //Reached root and he has no more children
@@ -289,7 +289,7 @@ public final class BTreeSet extends Abst
     public static class Entry
     {
 
-        public Object element;
+        public PropertyNode element;
         public BTreeNode child;
     }
 
@@ -309,11 +309,11 @@ public final class BTreeSet extends Abst
             entries[0] = new Entry();
         }
 
-        boolean insert(Object x, int parentIndex)
+        boolean insert(PropertyNode x, int parentIndex)
         {
             if (isFull())
             { // If full, you must split and promote splitNode before inserting
-                Object splitNode = entries[nrElements / 2].element;
+            	PropertyNode splitNode = entries[nrElements / 2].element;
                 BTreeNode rightSibling = split();
 
                 if (isRoot())
@@ -354,7 +354,7 @@ public final class BTreeSet extends Abst
             return false;
         }
 
-        boolean includes(Object x)
+        boolean includes(PropertyNode x)
         {
             int index = childToInsertAt(x, true);
             if (index == -1) return true;
@@ -362,7 +362,7 @@ public final class BTreeSet extends Abst
             return entries[index].child.includes(x);
         }
 
-        boolean delete(Object x, int parentIndex)
+        boolean delete(PropertyNode x, int parentIndex)
         {
             int i = childToInsertAt(x, true);
             int priorParentIndex = parentIndex;
@@ -438,7 +438,7 @@ public final class BTreeSet extends Abst
          * Creates a new BTreeSet.root which contains only the splitNode and pointers
          * to it's left and right child.
         */
-        private void splitRoot(Object splitNode, BTreeNode left, BTreeNode right)
+        private void splitRoot(PropertyNode splitNode, BTreeNode left, BTreeNode right)
         {
             BTreeNode newRoot = new BTreeNode(null);
             newRoot.entries[0].element = splitNode;
@@ -450,7 +450,7 @@ public final class BTreeSet extends Abst
             BTreeSet.this.root = newRoot;
         }
 
-        private void insertSplitNode(Object splitNode, BTreeNode left, BTreeNode right, int insertAt)
+        private void insertSplitNode(PropertyNode splitNode, BTreeNode left, BTreeNode right, int insertAt)
         {
             for (int i = nrElements; i >= insertAt; i--) entries[i + 1] = entries[i];
 
@@ -462,7 +462,7 @@ public final class BTreeSet extends Abst
             nrElements++;
         }
 
-        private void insertNewElement(Object x, int insertAt)
+        private void insertNewElement(PropertyNode x, int insertAt)
         {
 
             for (int i = nrElements; i > insertAt; i--) entries[i] = entries[i - 1];
@@ -482,7 +482,7 @@ public final class BTreeSet extends Abst
          * element is contained in the calling BTreeNode than the position of the element
          * in entries[] is returned.
         */
-        private int childToInsertAt(Object x, boolean position)
+        private int childToInsertAt(PropertyNode x, boolean position)
         {
             int index = nrElements / 2;
 
@@ -509,7 +509,7 @@ public final class BTreeSet extends Abst
         }
 
 
-        private void deleteElement(Object x)
+        private void deleteElement(PropertyNode x)
         {
             int index = childToInsertAt(x, false);
             for (; index < (nrElements - 1); index++) entries[index] = entries[index + 1];
@@ -568,12 +568,12 @@ public final class BTreeSet extends Abst
             }
         }
 
-        private void switchWithSuccessor(Object x)
+        private void switchWithSuccessor(PropertyNode x)
         {
             int index = childToInsertAt(x, false);
             BTreeNode temp = entries[index + 1].child;
             while (temp.entries[0] != null && temp.entries[0].child != null) temp = temp.entries[0].child;
-            Object successor = temp.entries[0].element;
+            PropertyNode successor = temp.entries[0].element;
             temp.entries[0].element = entries[index].element;
             entries[index].element = successor;
         }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java?rev=1668480&r1=1668479&r2=1668480&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java Sun Mar 22 21:45:03 2015
@@ -1034,7 +1034,6 @@ public abstract class AbstractWordConver
         }
     }
 
-    @SuppressWarnings( "unused" )
     protected boolean processOle2( HWPFDocument wordDocument, Element block,
             Entry entry ) throws Exception
     {

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/extractor/Word6Extractor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/extractor/Word6Extractor.java?rev=1668480&r1=1668479&r2=1668480&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/extractor/Word6Extractor.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/extractor/Word6Extractor.java Sun Mar 22 21:45:03 2015
@@ -38,7 +38,6 @@ import org.apache.poi.poifs.filesystem.P
  * @author Nick Burch
  */
 public final class Word6Extractor extends POIOLE2TextExtractor {
-	private POIFSFileSystem fs;
 	private HWPFOldDocument doc;
 
 	/**
@@ -64,7 +63,6 @@ public final class Word6Extractor extend
      * @deprecated Use {@link #Word6Extractor(DirectoryNode)} instead
      */
     @Deprecated
-    @SuppressWarnings( "unused" )
     public Word6Extractor( DirectoryNode dir, POIFSFileSystem fs )
             throws IOException
     {

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/extractor/WordExtractor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/extractor/WordExtractor.java?rev=1668480&r1=1668479&r2=1668480&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/extractor/WordExtractor.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/extractor/WordExtractor.java Sun Mar 22 21:45:03 2015
@@ -68,7 +68,6 @@ public final class WordExtractor extends
      * @deprecated Use {@link #WordExtractor(DirectoryNode)} instead
      */
     @Deprecated
-    @SuppressWarnings( "unused" )
     public WordExtractor( DirectoryNode dir, POIFSFileSystem fs )
             throws IOException
     {
@@ -109,7 +108,11 @@ public final class WordExtractor extends
         // Process the first argument as a file
         FileInputStream fin = new FileInputStream( args[0] );
         WordExtractor extractor = new WordExtractor( fin );
-        System.out.println( extractor.getText() );
+        try {
+        	System.out.println( extractor.getText() );
+        } finally {
+        	extractor.close();
+        }
     }
 
     /**

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPFormattedDiskPage.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPFormattedDiskPage.java?rev=1668480&r1=1668479&r2=1668480&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPFormattedDiskPage.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPFormattedDiskPage.java Sun Mar 22 21:45:03 2015
@@ -62,7 +62,6 @@ public final class CHPFormattedDiskPage
      *             {@link #CHPFormattedDiskPage(byte[], int, CharIndexTranslator)}
      *             instead
      */
-    @SuppressWarnings( "unused" )
     public CHPFormattedDiskPage( byte[] documentStream, int offset, int fcMin,
             TextPieceTable tpt )
     {
@@ -145,7 +144,6 @@ public final class CHPFormattedDiskPage
      * @deprecated Use {@link #toByteArray(CharIndexTranslator)} instead
      */
     @Deprecated
-    @SuppressWarnings( "unused" )
     protected byte[] toByteArray(CharIndexTranslator translator, int fcMin)
     {
         return toByteArray( translator );

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterProperties.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterProperties.java?rev=1668480&r1=1668479&r2=1668480&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterProperties.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterProperties.java Sun Mar 22 21:45:03 2015
@@ -382,7 +382,7 @@ public final class CharacterProperties
             cp.setDttmPropRMark( (DateAndTime) getDttmPropRMark().clone() );
             cp.setDttmDispFldRMark( (DateAndTime) getDttmDispFldRMark().clone() );
             cp.setXstDispFldRMark( getXstDispFldRMark().clone() );
-            cp.setShd( (ShadingDescriptor) getShd().clone() );
+            cp.setShd( getShd().clone() );
             cp.setBrc( (BorderCode) getBrc().clone() );
 
             return cp;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java?rev=1668480&r1=1668479&r2=1668480&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java Sun Mar 22 21:45:03 2015
@@ -570,7 +570,7 @@ public final class CharacterRun extends
     cp._props.setDttmDispFldRMark((DateAndTime)_props.getDttmDispFldRMark().
                                   clone());
     cp._props.setXstDispFldRMark(_props.getXstDispFldRMark().clone());
-    cp._props.setShd((ShadingDescriptor)_props.getShd().clone());
+    cp._props.setShd(_props.getShd().clone());
 
     return cp;
   }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/HWPFList.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/HWPFList.java?rev=1668480&r1=1668479&r2=1668480&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/HWPFList.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/HWPFList.java Sun Mar 22 21:45:03 2015
@@ -17,10 +17,6 @@
 
 package org.apache.poi.hwpf.usermodel;
 
-import org.apache.poi.util.POILogFactory;
-
-import org.apache.poi.util.POILogger;
-
 import org.apache.poi.hwpf.model.ListTables;
 
 import org.apache.poi.util.Internal;
@@ -52,7 +48,7 @@ import org.apache.poi.hwpf.sprm.Paragrap
  */
 public final class HWPFList
 {
-    private static POILogger log = POILogFactory.getLogger( HWPFList.class );
+    //private static POILogger log = POILogFactory.getLogger( HWPFList.class );
 
     private boolean _ignoreLogicalLeftIdentation = false;
     private LFO _lfo;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ParagraphProperties.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ParagraphProperties.java?rev=1668480&r1=1668479&r2=1668480&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ParagraphProperties.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ParagraphProperties.java Sun Mar 22 21:45:03 2015
@@ -43,7 +43,7 @@ public final class ParagraphProperties e
         pp.setBrcBar( (BorderCode) getBrcBar().clone() );
         pp.setDcs( getDcs().clone() );
         pp.setLspd( (LineSpacingDescriptor) getLspd().clone() );
-        pp.setShd( (ShadingDescriptor) getShd().clone() );
+        pp.setShd( getShd().clone() );
         pp.setPhe( getPhe().clone() );
         return pp;
     }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableCellDescriptor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableCellDescriptor.java?rev=1668480&r1=1668479&r2=1668480&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableCellDescriptor.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableCellDescriptor.java Sun Mar 22 21:45:03 2015
@@ -53,7 +53,7 @@ public final class TableCellDescriptor e
     throws CloneNotSupportedException
   {
     TableCellDescriptor tc = (TableCellDescriptor)super.clone();
-    tc.setShd( (ShadingDescriptor) getShd().clone() );
+    tc.setShd( getShd().clone() );
     tc.setBrcTop((BorderCode)getBrcTop().clone());
     tc.setBrcLeft((BorderCode)getBrcLeft().clone());
     tc.setBrcBottom((BorderCode)getBrcBottom().clone());

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableProperties.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableProperties.java?rev=1668480&r1=1668479&r2=1668480&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableProperties.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableProperties.java Sun Mar 22 21:45:03 2015
@@ -71,7 +71,7 @@ public final class TableProperties exten
         tap.setRgshd( new ShadingDescriptor[getRgshd().length] );
         for ( int x = 0; x < getRgshd().length; x++ )
         {
-            tap.getRgshd()[x] = (ShadingDescriptor) getRgshd()[x].clone();
+            tap.getRgshd()[x] = getRgshd()[x].clone();
         }
 
         tap.setBrcBottom( (BorderCode) getBrcBottom().clone() );
@@ -81,7 +81,7 @@ public final class TableProperties exten
         tap.setBrcTop( (BorderCode) getBrcTop().clone() );
         tap.setBrcVertical( (BorderCode) getBrcVertical().clone() );
 
-        tap.setShdTable( (ShadingDescriptor) getShdTable().clone() );
+        tap.setShdTable( getShdTable().clone() );
 
         tap.setRgbrcInsideDefault_0( (BorderCode) getRgbrcInsideDefault_0()
                 .clone() );



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