poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r805552 [1/4] - in /poi/trunk/src: java/org/apache/poi/hpsf/extractor/ java/org/apache/poi/poifs/filesystem/ java/org/apache/poi/poifs/storage/ java/org/apache/poi/util/ ooxml/java/org/apache/poi/openxml4j/opc/ ooxml/java/org/apache/poi/ope...
Date Tue, 18 Aug 2009 19:49:31 GMT
Author: josh
Date: Tue Aug 18 19:49:28 2009
New Revision: 805552

URL: http://svn.apache.org/viewvc?rev=805552&view=rev
Log:
Fixed compiler warnings - unnecessary throws declaration

Modified:
    poi/trunk/src/java/org/apache/poi/hpsf/extractor/HPSFPropertiesExtractor.java
    poi/trunk/src/java/org/apache/poi/poifs/filesystem/DocumentOutputStream.java
    poi/trunk/src/java/org/apache/poi/poifs/storage/SmallDocumentBlock.java
    poi/trunk/src/java/org/apache/poi/util/TempFile.java
    poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java
    poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/MemoryPackagePartOutputStream.java
    poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.java
    poi/trunk/src/ooxml/java/org/apache/poi/util/PackageHelper.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLDocument.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/TestXMLPropertiesTextExtractor.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/internal/TestContentTypeManager.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/ss/TestWorkbookFactory.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestCalculationChain.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestMapInfo.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestStylesTable.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestSheetHiding.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFComment.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/TestXWPFDocument.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFHeaderFooterPolicy.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hdf/extractor/NewOleFile.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/HDGFDiagram.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/dev/HWPFLister.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/extractor/WordExtractor.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FIBLongHandler.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FIBShortHandler.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/TestPOIDocumentScratchpad.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFLZW.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/extractor/TestVisioExtractor.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/pointers/TestPointerFactory.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamBugs.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/streams/TestStreamComplex.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hpbf/TestHPBFDocument.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hpbf/extractor/TextPublisherTextExtractor.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hpbf/model/TestEscherParts.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hpbf/model/TestQuillContents.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/TestRecordCounts.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/extractor/TestCruddyExtractor.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestBackground.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestPPFont.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestPicture.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestShapes.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestSheet.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/model/TestTextRun.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestCString.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestColorSchemeAtom.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestComment2000.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestComment2000Atom.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocument.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocumentAtom.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExControl.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestExVideoContainer.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestFontCollection.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersAtom.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestHeadersFootersContainer.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestInteractiveInfo.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestNotesAtom.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestRecordTypes.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestSlideAtom.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestSlidePersistAtom.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestStyleTextPropAtom.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextBytesAtom.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextCharsAtom.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestTextHeaderAtom.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestUserEditAtom.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestCounts.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestMostRecentRecords.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestNotesText.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPictures.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRecordSetup.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSheetText.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestSlideOrdering.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hsmf/model/TestBlankFileRead.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFPictures.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/TestHWPFRangeParts.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractor.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractorBugs.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBug46610.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestHeaderStories.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRange.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeDelete.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeInsertion.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeProperties.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestRangeReplacement.java
    poi/trunk/src/testcases/org/apache/poi/TestPOIDocumentMain.java
    poi/trunk/src/testcases/org/apache/poi/ddf/TestEscherBlipWMFRecord.java
    poi/trunk/src/testcases/org/apache/poi/ddf/TestEscherBoolProperty.java
    poi/trunk/src/testcases/org/apache/poi/ddf/TestEscherChildAnchorRecord.java
    poi/trunk/src/testcases/org/apache/poi/hpsf/extractor/TestHPSFPropertiesExtractor.java
    poi/trunk/src/testcases/org/apache/poi/hssf/model/TestDrawingManager.java
    poi/trunk/src/testcases/org/apache/poi/hssf/model/TestDrawingManager2.java
    poi/trunk/src/testcases/org/apache/poi/hssf/model/TestFormulaParserIf.java
    poi/trunk/src/testcases/org/apache/poi/hssf/model/TestWorkbook.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestExtendedFormatRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/aggregates/TestFormulaRecordAggregate.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestAreaErrPtg.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestErrPtg.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestIntersectionPtg.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestPercentPtg.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestRangePtg.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestUnionPtg.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBug42464.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestEscherGraphics.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFontDetails.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorBugs.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFormulas.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFClientAnchor.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormat.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPalette.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRichTextString.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestSheetHiding.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestUnicodeWorkbook.java
    poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestDataFormat.java
    poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java

Modified: poi/trunk/src/java/org/apache/poi/hpsf/extractor/HPSFPropertiesExtractor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/extractor/HPSFPropertiesExtractor.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/extractor/HPSFPropertiesExtractor.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/extractor/HPSFPropertiesExtractor.java Tue Aug 18 19:49:28 2009
@@ -14,9 +14,9 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
+
 package org.apache.poi.hpsf.extractor;
 
-import java.io.IOException;
 import java.io.OutputStream;
 import java.util.Iterator;
 
@@ -33,7 +33,7 @@
 
 /**
  * Extracts all of the HPSF properties, both
- *  build in and custom, returning them in 
+ *  build in and custom, returning them in
  *  textual form.
  */
 public class HPSFPropertiesExtractor extends POITextExtractor {
@@ -46,14 +46,14 @@
 	public HPSFPropertiesExtractor(POIFSFileSystem fs) {
 		super(new PropertiesOnlyDocument(fs));
 	}
-	
+
 	public String getDocumentSummaryInformationText() {
 		DocumentSummaryInformation dsi = document.getDocumentSummaryInformation();
 		StringBuffer text = new StringBuffer();
 
 		// Normal properties
 		text.append( getPropertiesText(dsi) );
-		
+
 		// Now custom ones
 		CustomProperties cps = dsi.getCustomProperties();
 		if(cps != null) {
@@ -64,38 +64,38 @@
 				text.append(key + " = " + val + "\n");
 			}
 		}
-		
+
 		// All done
 		return text.toString();
 	}
 	public String getSummaryInformationText() {
 		SummaryInformation si = document.getSummaryInformation();
-		
+
 		// Just normal properties
 		return getPropertiesText(si);
 	}
-	
+
 	private static String getPropertiesText(SpecialPropertySet ps) {
 		if(ps == null) {
 			// Not defined, oh well
 			return "";
 		}
-		
+
 		StringBuffer text = new StringBuffer();
-		
+
 		PropertyIDMap idMap = ps.getPropertySetIDMap();
 		Property[] props = ps.getProperties();
 		for(int i=0; i<props.length; i++) {
-			String type = Long.toString( props[i].getID() ); 
+			String type = Long.toString( props[i].getID() );
 			Object typeObj = idMap.get(props[i].getID());
 			if(typeObj != null) {
 				type = typeObj.toString();
 			}
-			
+
 			String val = getPropertyValueText( props[i].getValue() );
 			text.append(type + " = " + val + "\n");
 		}
-		
+
 		return text.toString();
 	}
 	private static String getPropertyValueText(Object val) {
@@ -123,13 +123,13 @@
 	}
 
 	/**
-	 * Return the text of all the properties defined in
+	 * @return the text of all the properties defined in
 	 *  the document.
 	 */
 	public String getText() {
 		return getSummaryInformationText() + getDocumentSummaryInformationText();
 	}
-	
+
 	/**
 	 * Prevent recursion!
 	 */
@@ -138,15 +138,15 @@
 	}
 
 	/**
-	 * So we can get at the properties of any 
+	 * So we can get at the properties of any
 	 *  random OLE2 document.
 	 */
-	private static class PropertiesOnlyDocument extends POIDocument {
-		private PropertiesOnlyDocument(POIFSFileSystem fs) {
+	private static final class PropertiesOnlyDocument extends POIDocument {
+		public PropertiesOnlyDocument(POIFSFileSystem fs) {
 			super(fs);
 		}
 
-		public void write(OutputStream out) throws IOException {
+		public void write(OutputStream out) {
 			throw new IllegalStateException("Unable to write, only for properties!");
 		}
 	}

Modified: poi/trunk/src/java/org/apache/poi/poifs/filesystem/DocumentOutputStream.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/filesystem/DocumentOutputStream.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/filesystem/DocumentOutputStream.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/filesystem/DocumentOutputStream.java Tue Aug 18 19:49:28 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,7 +14,6 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
 
 package org.apache.poi.poifs.filesystem;
 
@@ -30,12 +28,10 @@
  * @author Marc Johnson (mjohnson at apache dot org)
  */
 
-public class DocumentOutputStream
-    extends OutputStream
-{
-    private OutputStream stream;
-    private int          limit;
-    private int          written;
+public final class DocumentOutputStream extends OutputStream {
+    private final OutputStream _stream;
+    private final int          _limit;
+    private int          _written;
 
     /**
      * Create a DocumentOutputStream
@@ -44,12 +40,10 @@
      *               read
      * @param limit the maximum number of bytes that can be written
      */
-
-    DocumentOutputStream(final OutputStream stream, final int limit)
-    {
-        this.stream  = stream;
-        this.limit   = limit;
-        this.written = 0;
+    DocumentOutputStream(OutputStream stream, int limit) {
+        _stream  = stream;
+        _limit   = limit;
+        _written = 0;
     }
 
     /**
@@ -64,12 +58,11 @@
      *                        output stream has been closed, or if the
      *                        writer tries to write too much data.
      */
-
-    public void write(final int b)
+    public void write(int b)
         throws IOException
     {
         limitCheck(1);
-        stream.write(b);
+        _stream.write(b);
     }
 
     /**
@@ -79,8 +72,7 @@
      * @param b the data.
      * @exception IOException if an I/O error occurs.
      */
-
-    public void write(final byte b[])
+    public void write(byte b[])
         throws IOException
     {
         write(b, 0, b.length);
@@ -106,12 +98,11 @@
      *                        output stream is closed or if the writer
      *                        tries to write too many bytes.
      */
-
-    public void write(final byte b[], final int off, final int len)
+    public void write(byte b[], int off, int len)
         throws IOException
     {
         limitCheck(len);
-        stream.write(b, off, len);
+        _stream.write(b, off, len);
     }
 
     /**
@@ -120,11 +111,10 @@
      *
      * @exception IOException if an I/O error occurs.
      */
-
     public void flush()
         throws IOException
     {
-        stream.flush();
+        _stream.flush();
     }
 
     /**
@@ -135,10 +125,7 @@
      *
      * @exception IOException if an I/O error occurs.
      */
-
-    public void close()
-        throws IOException
-    {
+    public void close() {
 
         // ignore this call
     }
@@ -152,27 +139,25 @@
      *
      * @exception IOException on I/O error
      */
-
-    void writeFiller(final int totalLimit, final byte fill)
+    void writeFiller(int totalLimit, byte fill)
         throws IOException
     {
-        if (totalLimit > written)
+        if (totalLimit > _written)
         {
-            byte[] filler = new byte[ totalLimit - written ];
+            byte[] filler = new byte[ totalLimit - _written ];
 
             Arrays.fill(filler, fill);
-            stream.write(filler);
+            _stream.write(filler);
         }
     }
 
-    private void limitCheck(final int toBeWritten)
+    private void limitCheck(int toBeWritten)
         throws IOException
     {
-        if ((written + toBeWritten) > limit)
+        if ((_written + toBeWritten) > _limit)
         {
             throw new IOException("tried to write too much data");
         }
-        written += toBeWritten;
+        _written += toBeWritten;
     }
-}   // end public class DocumentOutputStream
-
+}

Modified: poi/trunk/src/java/org/apache/poi/poifs/storage/SmallDocumentBlock.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/storage/SmallDocumentBlock.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/storage/SmallDocumentBlock.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/storage/SmallDocumentBlock.java Tue Aug 18 19:49:28 2009
@@ -64,9 +64,8 @@
      * @return an array of SmallDocumentBlock instances, filled from
      *         the array
      */
-
-    public static SmallDocumentBlock [] convert(final byte [] array,
-                                                final int size)
+    public static SmallDocumentBlock [] convert(byte [] array,
+                                                int size)
     {
         SmallDocumentBlock[] rval   =
             new SmallDocumentBlock[ (size + _block_size - 1) / _block_size ];
@@ -103,8 +102,7 @@
      *
      * @return number of big blocks the list encompasses
      */
-
-    public static int fill(final List blocks)
+    public static int fill(List blocks)
     {
         int count           = blocks.size();
         int big_block_count = (count + _blocks_per_big_block - 1)
@@ -130,9 +128,8 @@
      * @exception ArrayIndexOutOfBoundsException if, somehow, the store
      *            contains less data than size indicates
      */
-
-    public static SmallDocumentBlock [] convert(final BlockWritable [] store,
-                                                final int size)
+    public static SmallDocumentBlock [] convert(BlockWritable [] store,
+                                                int size)
         throws IOException, ArrayIndexOutOfBoundsException
     {
         ByteArrayOutputStream stream = new ByteArrayOutputStream();
@@ -159,10 +156,7 @@
      *               data
      *
      * @return a List of SmallDocumentBlock's extracted from the input
-     *
-     * @exception IOException
      */
-
     public static List extract(ListManagedBlock [] blocks)
         throws IOException
     {
@@ -193,7 +187,6 @@
      *
      * @return total size
      */
-
     public static int calcSize(int size)
     {
         return size * _block_size;
@@ -207,13 +200,11 @@
         return block;
     }
 
-    private static int convertToBlockCount(final int size)
+    private static int convertToBlockCount(int size)
     {
         return (size + _block_size - 1) / _block_size;
     }
 
-    /* ********** START implementation of BlockWritable ********** */
-
     /**
      * Write the storage to an OutputStream
      *
@@ -223,16 +214,12 @@
      * @exception IOException on problems writing to the specified
      *            stream
      */
-
-    public void writeBlocks(final OutputStream stream)
+    public void writeBlocks(OutputStream stream)
         throws IOException
     {
         stream.write(_data);
     }
 
-    /* **********  END  implementation of BlockWritable ********** */
-    /* ********** START implementation of ListManagedBlock ********** */
-
     /**
      * Get the data from the block
      *
@@ -240,13 +227,7 @@
      *
      * @exception IOException if there is no data
      */
-
-    public byte [] getData()
-        throws IOException
-    {
+    public byte [] getData() {
         return _data;
     }
-
-    /* **********  END  implementation of ListManagedBlock ********** */
-}   // end public class SmallDocumentBlock
-
+}

Modified: poi/trunk/src/java/org/apache/poi/util/TempFile.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/util/TempFile.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/util/TempFile.java (original)
+++ poi/trunk/src/java/org/apache/poi/util/TempFile.java Tue Aug 18 19:49:28 2009
@@ -14,10 +14,10 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
+
 package org.apache.poi.util;
 
 import java.io.File;
-import java.io.IOException;
 import java.util.Random;
 
 /**
@@ -25,20 +25,18 @@
  *
  * @author Glen Stampoultzis
  */
-public class TempFile
-{
-    static File dir;
-    static Random rnd = new Random();
+public final class TempFile {
+    private static File dir;
+    private static final Random rnd = new Random();
 
     /**
      * Creates a temporary file.  Files are collected into one directory and by default are
      * deleted on exit from the VM.  Files can be kept by defining the system property
      * <code>poi.keep.tmp.files</code>.
      * <p>
-     * Dont forget to close all files or it might not be possible to delete them.
+     * Don't forget to close all files or it might not be possible to delete them.
      */
-    public static File createTempFile(String prefix, String suffix) throws IOException
-    {
+    public static File createTempFile(String prefix, String suffix) {
         if (dir == null)
         {
             dir = new File(System.getProperty("java.io.tmpdir"), "poifiles");
@@ -52,7 +50,4 @@
             newFile.deleteOnExit();
         return newFile;
     }
-
-
-
 }

Modified: poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java Tue Aug 18 19:49:28 2009
@@ -94,7 +94,7 @@
 	 * @throws InvalidFormatException
 	 *             If the content type part parsing encounters an error.
 	 */
-	ZipPackage(String path, PackageAccess access) throws InvalidFormatException {
+	ZipPackage(String path, PackageAccess access) {
 		super(access);
 
 		ZipFile zipFile = ZipHelper.openZipFile(path);

Modified: poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/MemoryPackagePartOutputStream.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/MemoryPackagePartOutputStream.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/MemoryPackagePartOutputStream.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/MemoryPackagePartOutputStream.java Tue Aug 18 19:49:28 2009
@@ -25,22 +25,21 @@
  * Build an output stream for MemoryPackagePart.
  *
  * @author Julien Chable
- * @version 1.0
  */
 public final class MemoryPackagePartOutputStream extends OutputStream {
 
-	private MemoryPackagePart part;
+	private MemoryPackagePart _part;
 
-	private ByteArrayOutputStream buff;
+	private ByteArrayOutputStream _buff;
 
 	public MemoryPackagePartOutputStream(MemoryPackagePart part) {
-		this.part = part;
-		buff = new ByteArrayOutputStream();
+		this._part = part;
+		_buff = new ByteArrayOutputStream();
 	}
 
 	@Override
-	public void write(int b) throws IOException {
-		buff.write(b);
+	public void write(int b) {
+		_buff.write(b);
 	}
 
 	/**
@@ -59,38 +58,38 @@
 	 */
 	@Override
 	public void flush() throws IOException {
-		buff.flush();
-		if (part.data != null) {
-			byte[] newArray = new byte[part.data.length + buff.size()];
+		_buff.flush();
+		if (_part.data != null) {
+			byte[] newArray = new byte[_part.data.length + _buff.size()];
 			// copy the previous contents of part.data in newArray
-			System.arraycopy(part.data, 0, newArray, 0, part.data.length);
+			System.arraycopy(_part.data, 0, newArray, 0, _part.data.length);
 
 			// append the newly added data
-			byte[] buffArr = buff.toByteArray();
-			System.arraycopy(buffArr, 0, newArray, part.data.length,
+			byte[] buffArr = _buff.toByteArray();
+			System.arraycopy(buffArr, 0, newArray, _part.data.length,
 					buffArr.length);
 
 			// save the result as new data
-			part.data = newArray;
+			_part.data = newArray;
 		} else {
 			// was empty, just fill it
-			part.data = buff.toByteArray();
+			_part.data = _buff.toByteArray();
 		}
 
 		/*
 		 * Clear this streams buffer, in case flush() is called a second time
 		 * Fix bug 1921637 - provided by Rainer Schwarze
 		 */
-		buff.reset();
+		_buff.reset();
 	}
 
 	@Override
-	public void write(byte[] b, int off, int len) throws IOException {
-		buff.write(b, off, len);
+	public void write(byte[] b, int off, int len) {
+		_buff.write(b, off, len);
 	}
 
 	@Override
 	public void write(byte[] b) throws IOException {
-		buff.write(b);
+		_buff.write(b);
 	}
 }

Modified: poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.java Tue Aug 18 19:49:28 2009
@@ -25,7 +25,6 @@
 
 import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
 import org.apache.poi.openxml4j.exceptions.InvalidOperationException;
-import org.apache.poi.openxml4j.exceptions.OpenXML4JException;
 import org.apache.poi.openxml4j.opc.ContentTypes;
 import org.apache.poi.openxml4j.opc.OPCPackage;
 import org.apache.poi.openxml4j.opc.PackagePart;

Modified: poi/trunk/src/ooxml/java/org/apache/poi/util/PackageHelper.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/util/PackageHelper.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/util/PackageHelper.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/util/PackageHelper.java Tue Aug 18 19:49:28 2009
@@ -97,7 +97,7 @@
     /**
      * Creates an empty file in the default temporary-file directory,
      */
-    public static File createTempFile() throws IOException {
+    public static File createTempFile() {
         File file = TempFile.createTempFile("poi-ooxml-", ".tmp");
         //there is no way to pass an existing file to Package.create(file),
         //delete first, the file will be re-created in Packe.create(file)

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLDocument.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLDocument.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLDocument.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLDocument.java Tue Aug 18 19:49:28 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,33 +14,30 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
 
 package org.apache.poi;
 
 import java.io.File;
-import java.io.IOException;
 import java.io.FileOutputStream;
-import java.util.List;
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
+
+import junit.framework.TestCase;
 
-import org.apache.poi.util.TempFile;
 import org.apache.poi.openxml4j.opc.OPCPackage;
 import org.apache.poi.openxml4j.opc.PackagePart;
 import org.apache.poi.openxml4j.opc.PackageRelationship;
-import org.apache.poi.openxml4j.exceptions.OpenXML4JException;
-
-import junit.framework.TestCase;
+import org.apache.poi.util.TempFile;
 
 /**
  * Test recursive read and write of OPC packages
  */
-public class TestPOIXMLDocument extends TestCase
-{
+public final class TestPOIXMLDocument extends TestCase {
     private static class OPCParser extends POIXMLDocument {
 
-        public OPCParser(OPCPackage pkg) throws IOException {
+        public OPCParser(OPCPackage pkg) {
             super(pkg);
         }
 
@@ -49,13 +45,16 @@
             throw new RuntimeException("not supported");
         }
 
-        public void parse(POIXMLFactory factory) throws OpenXML4JException, IOException{
+        public void parse(POIXMLFactory factory) throws IOException{
             load(factory);
         }
     }
 
-    private static class TestFactory extends POIXMLFactory  {
+    private static final class TestFactory extends POIXMLFactory {
 
+        public TestFactory() {
+            //
+        }
         public POIXMLDocumentPart createDocumentPart(PackageRelationship rel, PackagePart part){
             return new POIXMLDocumentPart(part, rel);
         }
@@ -70,16 +69,16 @@
      * Recursively traverse a OOXML document and assert that same logical parts have the same physical instances
      */
     private static void traverse(POIXMLDocumentPart part, HashMap<String,POIXMLDocumentPart> context) throws IOException{
-    	context.put(part.getPackageRelationship().getTargetURI().toString(), part);
-    	for(POIXMLDocumentPart p : part.getRelations()){
+        context.put(part.getPackageRelationship().getTargetURI().toString(), part);
+        for(POIXMLDocumentPart p : part.getRelations()){
             String uri = p.getPackageRelationship().getTargetURI().toString();
             if (!context.containsKey(uri)) {
-    			traverse(p, context);
-    		} else {
+                traverse(p, context);
+            } else {
                 POIXMLDocumentPart prev = context.get(uri);
                 assertSame("Duplicate POIXMLDocumentPart instance for targetURI=" + uri, prev, p);
             }
-    	}
+        }
     }
 
     public void assertReadWrite(String path) throws Exception {
@@ -138,4 +137,4 @@
         File file = new File(System.getProperty("OOXML.testdata.path"), "WordWithAttachments.docx");
         assertReadWrite(file.getAbsolutePath());
     }
-}
\ No newline at end of file
+}

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java Tue Aug 18 19:49:28 2009
@@ -32,10 +32,10 @@
 /**
  * Test setting extended and custom OOXML properties
  */
-public class TestPOIXMLProperties extends TestCase {
-	POIXMLProperties props;
-	CoreProperties coreProperties;
-	
+public final class TestPOIXMLProperties extends TestCase {
+	private POIXMLProperties _props;
+	private CoreProperties _coreProperties;
+
 	public void setUp() throws Exception{
 		File sampleFile = new File(
 				System.getProperty("HWPF.testdata.path") +
@@ -46,139 +46,139 @@
 		sampleDoc = new XWPFDocument(
 				POIXMLDocument.openPackage(sampleFile.toString())
 		);
-		props = sampleDoc.getProperties();
-		coreProperties = props.getCoreProperties();
-		assertNotNull(props);
+		_props = sampleDoc.getProperties();
+		_coreProperties = _props.getCoreProperties();
+		assertNotNull(_props);
 	}
-	
-    public void testWorkbookExtendedProperties() throws Exception {
-        XSSFWorkbook workbook = new XSSFWorkbook();
-        POIXMLProperties props = workbook.getProperties();
-        assertNotNull(props);
 
-        org.apache.poi.POIXMLProperties.ExtendedProperties properties =
-                props.getExtendedProperties();
+	public void testWorkbookExtendedProperties() {
+		XSSFWorkbook workbook = new XSSFWorkbook();
+		POIXMLProperties props = workbook.getProperties();
+		assertNotNull(props);
+
+		org.apache.poi.POIXMLProperties.ExtendedProperties properties =
+				props.getExtendedProperties();
 
-        org.openxmlformats.schemas.officeDocument.x2006.extendedProperties.CTProperties
-                ctProps = properties.getUnderlyingProperties();
+		org.openxmlformats.schemas.officeDocument.x2006.extendedProperties.CTProperties
+				ctProps = properties.getUnderlyingProperties();
 
 
-        String appVersion = "3.5 beta";
-        String application = "POI";
+		String appVersion = "3.5 beta";
+		String application = "POI";
 
-        ctProps.setApplication(application);
-        ctProps.setAppVersion(appVersion);
+		ctProps.setApplication(application);
+		ctProps.setAppVersion(appVersion);
 
-        ctProps = null;
-        properties = null;
-        props = null;
+		ctProps = null;
+		properties = null;
+		props = null;
 
-        XSSFWorkbook newWorkbook =
-                XSSFTestDataSamples.writeOutAndReadBack(workbook);
+		XSSFWorkbook newWorkbook =
+				XSSFTestDataSamples.writeOutAndReadBack(workbook);
 
-        assertTrue(workbook != newWorkbook);
+		assertTrue(workbook != newWorkbook);
 
 
-        POIXMLProperties newProps = newWorkbook.getProperties();
-        assertNotNull(newProps);
-        org.apache.poi.POIXMLProperties.ExtendedProperties newProperties =
-                newProps.getExtendedProperties();
+		POIXMLProperties newProps = newWorkbook.getProperties();
+		assertNotNull(newProps);
+		org.apache.poi.POIXMLProperties.ExtendedProperties newProperties =
+				newProps.getExtendedProperties();
 
-        org.openxmlformats.schemas.officeDocument.x2006.extendedProperties.CTProperties
-                newCtProps = newProperties.getUnderlyingProperties();
+		org.openxmlformats.schemas.officeDocument.x2006.extendedProperties.CTProperties
+				newCtProps = newProperties.getUnderlyingProperties();
 
-        assertEquals(application, newCtProps.getApplication());
-        assertEquals(appVersion, newCtProps.getAppVersion());
+		assertEquals(application, newCtProps.getApplication());
+		assertEquals(appVersion, newCtProps.getAppVersion());
 
 
-    }
+	}
 
 
-    public void testWorkbookCustomProperties() throws Exception {
-        XSSFWorkbook workbook = new XSSFWorkbook();
-        POIXMLProperties props = workbook.getProperties();
-        assertNotNull(props);
+	public void testWorkbookCustomProperties() {
+		XSSFWorkbook workbook = new XSSFWorkbook();
+		POIXMLProperties props = workbook.getProperties();
+		assertNotNull(props);
 
-        org.apache.poi.POIXMLProperties.CustomProperties properties =
-                props.getCustomProperties();
+		org.apache.poi.POIXMLProperties.CustomProperties properties =
+				props.getCustomProperties();
 
-        org.openxmlformats.schemas.officeDocument.x2006.customProperties.CTProperties
-                ctProps = properties.getUnderlyingProperties();
+		org.openxmlformats.schemas.officeDocument.x2006.customProperties.CTProperties
+				ctProps = properties.getUnderlyingProperties();
 
 
-        org.openxmlformats.schemas.officeDocument.x2006.customProperties.CTProperty
-                property = ctProps.addNewProperty();
+		org.openxmlformats.schemas.officeDocument.x2006.customProperties.CTProperty
+				property = ctProps.addNewProperty();
 
 
-        String fmtid =
-                "{A1A1A1A1A1A1A1A1-A1A1A1A1-A1A1A1A1-A1A1A1A1-A1A1A1A1A1A1A1A1}";
-        int pId = 1;
-        String name = "testProperty";
-        String stringValue = "testValue";
+		String fmtid =
+				"{A1A1A1A1A1A1A1A1-A1A1A1A1-A1A1A1A1-A1A1A1A1-A1A1A1A1A1A1A1A1}";
+		int pId = 1;
+		String name = "testProperty";
+		String stringValue = "testValue";
 
 
-        property.setFmtid(fmtid);
-        property.setPid(pId);
-        property.setName(name);
-        property.setBstr(stringValue);
+		property.setFmtid(fmtid);
+		property.setPid(pId);
+		property.setName(name);
+		property.setBstr(stringValue);
 
 
-        property = null;
-        ctProps = null;
-        properties = null;
-        props = null;
+		property = null;
+		ctProps = null;
+		properties = null;
+		props = null;
 
-        XSSFWorkbook newWorkbook =
-                XSSFTestDataSamples.writeOutAndReadBack(workbook);
+		XSSFWorkbook newWorkbook =
+				XSSFTestDataSamples.writeOutAndReadBack(workbook);
 
-        assertTrue(workbook != newWorkbook);
+		assertTrue(workbook != newWorkbook);
 
 
-        POIXMLProperties newProps = newWorkbook.getProperties();
-        assertNotNull(newProps);
-        org.apache.poi.POIXMLProperties.CustomProperties newProperties =
-                newProps.getCustomProperties();
+		POIXMLProperties newProps = newWorkbook.getProperties();
+		assertNotNull(newProps);
+		org.apache.poi.POIXMLProperties.CustomProperties newProperties =
+				newProps.getCustomProperties();
 
-        org.openxmlformats.schemas.officeDocument.x2006.customProperties.CTProperties
-                newCtProps = newProperties.getUnderlyingProperties();
+		org.openxmlformats.schemas.officeDocument.x2006.customProperties.CTProperties
+				newCtProps = newProperties.getUnderlyingProperties();
 
-        assertEquals(1, newCtProps.getPropertyArray().length);
+		assertEquals(1, newCtProps.getPropertyArray().length);
 
 
-        org.openxmlformats.schemas.officeDocument.x2006.customProperties.CTProperty
-                newpProperty = newCtProps.getPropertyArray()[0];
+		org.openxmlformats.schemas.officeDocument.x2006.customProperties.CTProperty
+				newpProperty = newCtProps.getPropertyArray()[0];
 
-        assertEquals(fmtid, newpProperty.getFmtid());
-        assertEquals(pId, newpProperty.getPid());
-        assertEquals(name, newpProperty.getName());
-        assertEquals(stringValue, newpProperty.getBstr());
+		assertEquals(fmtid, newpProperty.getFmtid());
+		assertEquals(pId, newpProperty.getPid());
+		assertEquals(name, newpProperty.getName());
+		assertEquals(stringValue, newpProperty.getBstr());
 
 
-    }
-    
-    public void testDocumentProperties() {
-		String category = coreProperties.getCategory();
+	}
+
+	public void testDocumentProperties() {
+		String category = _coreProperties.getCategory();
 		assertEquals("test", category);
 		String contentStatus = "Draft";
-		coreProperties.setContentStatus(contentStatus);
+		_coreProperties.setContentStatus(contentStatus);
 		assertEquals("Draft", contentStatus);
-		Date created = coreProperties.getCreated();
+		Date created = _coreProperties.getCreated();
 		SimpleDateFormat formatter = new SimpleDateFormat("EEE, MMM d, ''yy");
 		assertEquals("Mon, Jul 20, '09", formatter.format(created));
-		String creator = coreProperties.getCreator();
+		String creator = _coreProperties.getCreator();
 		assertEquals("Paolo Mottadelli", creator);
-		String subject = coreProperties.getSubject();
+		String subject = _coreProperties.getSubject();
 		assertEquals("Greetings", subject);
-		String title = coreProperties.getTitle();
+		String title = _coreProperties.getTitle();
 		assertEquals("Hello World", title);
-    }
-    
-    public void testGetSetRevision() {
-		String revision = coreProperties.getRevision();
-		assertTrue("Revision number is 1", new Integer(coreProperties.getRevision()).intValue() > 1);
-		coreProperties.setRevision("20");
-		assertEquals("20", coreProperties.getRevision());
-		coreProperties.setRevision("20xx");
-		assertEquals("20", coreProperties.getRevision());
-    }
-}
\ No newline at end of file
+	}
+
+	public void testGetSetRevision() {
+		String revision = _coreProperties.getRevision();
+		assertTrue("Revision number is 1", new Integer(_coreProperties.getRevision()).intValue() > 1);
+		_coreProperties.setRevision("20");
+		assertEquals("20", _coreProperties.getRevision());
+		_coreProperties.setRevision("20xx");
+		assertEquals("20", _coreProperties.getRevision());
+	}
+}

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/TestXMLPropertiesTextExtractor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/TestXMLPropertiesTextExtractor.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/TestXMLPropertiesTextExtractor.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/TestXMLPropertiesTextExtractor.java Tue Aug 18 19:49:28 2009
@@ -24,14 +24,14 @@
 
 import junit.framework.TestCase;
 
-public class TestXMLPropertiesTextExtractor extends TestCase {
+public final class TestXMLPropertiesTextExtractor extends TestCase {
 	private String dirname;
-	
-	protected void setUp() throws Exception {
+
+	protected void setUp() {
 		dirname = System.getProperty("OOXML.testdata.path");
 		assertTrue( (new File(dirname)).exists() );
 	}
-	
+
 	public void testGetFromMainExtractor() throws Exception {
 		OPCPackage pkg = OPCPackage.open(
 				(new File(dirname, "ExcelWithAttachments.xlsm")).toString()
@@ -40,15 +40,15 @@
 
 		XSSFExcelExtractor ext = new XSSFExcelExtractor(wb);
 		POIXMLPropertiesTextExtractor textExt = ext.getMetadataTextExtractor();
-		
+
 		// Check basics
 		assertNotNull(textExt);
 		assertTrue(textExt.getText().length() > 0);
-		
+
 		// Check some of the content
 		String text = textExt.getText();
 		String cText = textExt.getCorePropertiesText();
-		
+
 		assertTrue(text.contains("LastModifiedBy = Yury Batrakov"));
 		assertTrue(cText.contains("LastModifiedBy = Yury Batrakov"));
 	}
@@ -58,38 +58,38 @@
 				(new File(dirname, "ExcelWithAttachments.xlsm")).toString()
 		);
 		XSSFWorkbook wb = new XSSFWorkbook(pkg);
-		
+
 		POIXMLPropertiesTextExtractor ext = new POIXMLPropertiesTextExtractor(wb);
 		ext.getText();
-		
+
 		// Now check
 		String text = ext.getText();
 		String cText = ext.getCorePropertiesText();
-		
+
 		assertTrue(text.contains("LastModifiedBy = Yury Batrakov"));
 		assertTrue(cText.contains("LastModifiedBy = Yury Batrakov"));
 	}
-	
+
 	public void testExtended() throws Exception {
 		OPCPackage pkg = OPCPackage.open(
 				(new File(dirname, "ExcelWithAttachments.xlsm")).toString()
 		);
 		XSSFWorkbook wb = new XSSFWorkbook(pkg);
-		
+
 		POIXMLPropertiesTextExtractor ext = new POIXMLPropertiesTextExtractor(wb);
 		ext.getText();
-		
+
 		// Now check
 		String text = ext.getText();
 		String eText = ext.getExtendedPropertiesText();
-		
+
 		assertTrue(text.contains("Application = Microsoft Excel"));
 		assertTrue(text.contains("Company = Mera"));
 		assertTrue(eText.contains("Application = Microsoft Excel"));
 		assertTrue(eText.contains("Company = Mera"));
 	}
-	
-	public void testCustom() throws Exception {
+
+	public void testCustom() {
 		// TODO!
 	}
 }

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/internal/TestContentTypeManager.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/internal/TestContentTypeManager.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/internal/TestContentTypeManager.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/internal/TestContentTypeManager.java Tue Aug 18 19:49:28 2009
@@ -19,7 +19,13 @@
 
 import junit.framework.TestCase;
 
+import org.apache.poi.openxml4j.OpenXML4JTestDataSamples;
+import org.apache.poi.openxml4j.opc.OPCPackage;
+import org.apache.poi.openxml4j.opc.PackageAccess;
+import org.apache.poi.openxml4j.opc.PackagePart;
 import org.apache.poi.openxml4j.opc.PackagePartName;
+import org.apache.poi.openxml4j.opc.PackageRelationship;
+import org.apache.poi.openxml4j.opc.PackageRelationshipTypes;
 import org.apache.poi.openxml4j.opc.PackagingURIHelper;
 
 public final class TestContentTypeManager extends TestCase {
@@ -27,25 +33,21 @@
 	/**
 	 * Test the properties part content parsing.
 	 */
-	public void testContentType() throws Exception {
-		// File originalFile = new File(testCore.getTestRootPath() +
-		// File.separator +
-		// "sample.docx");
-		//
-		// // Retrieves core properties part
-		// Package p = Package.open(originalFile.getAbsolutePath(),
-		// PackageAccess.READ);
-		// PackageRelationship corePropertiesRelationship = p
-		// .getRelationshipsByType(
-		// PackageRelationshipTypes.CORE_PROPERTIES)
-		// .getRelationship(0);
-		// PackagePart coreDocument = p.getPart(corePropertiesRelationship);
-		//
-		// ContentTypeManager ctm = new ZipContentTypeManager(coreDocument
-		// .getInputStream());
-		//
-		// // TODO
-		//fail();
+	public void disabled_testContentType() throws Exception {
+		String filepath =  OpenXML4JTestDataSamples.getSampleFileName("sample.docx");
+
+		 // Retrieves core properties part
+		 OPCPackage p = OPCPackage.open(filepath, PackageAccess.READ);
+		 PackageRelationship corePropertiesRelationship = p
+		 .getRelationshipsByType(
+		 PackageRelationshipTypes.CORE_PROPERTIES)
+		 .getRelationship(0);
+		 PackagePart coreDocument = p.getPart(corePropertiesRelationship);
+
+		 ContentTypeManager ctm = new ZipContentTypeManager(coreDocument.getInputStream(), p);
+
+		 // TODO - finish writing this test
+		fail();
 	}
 
 	/**
@@ -54,14 +56,10 @@
 	public void testContentTypeAddition() throws Exception {
 		ContentTypeManager ctm = new ZipContentTypeManager(null, null);
 
-		PackagePartName name1 = PackagingURIHelper
-				.createPartName("/foo/foo.XML");
-		PackagePartName name2 = PackagingURIHelper
-				.createPartName("/foo/foo2.xml");
-		PackagePartName name3 = PackagingURIHelper
-				.createPartName("/foo/doc.rels");
-		PackagePartName name4 = PackagingURIHelper
-				.createPartName("/foo/doc.RELS");
+		PackagePartName name1 = PackagingURIHelper.createPartName("/foo/foo.XML");
+		PackagePartName name2 = PackagingURIHelper.createPartName("/foo/foo2.xml");
+		PackagePartName name3 = PackagingURIHelper.createPartName("/foo/doc.rels");
+		PackagePartName name4 = PackagingURIHelper.createPartName("/foo/doc.RELS");
 
 		// Add content types
 		ctm.addContentType(name1, "foo-type1");
@@ -81,14 +79,10 @@
 	public void testContentTypeRemoval() throws Exception {
 		ContentTypeManager ctm = new ZipContentTypeManager(null, null);
 
-		PackagePartName name1 = PackagingURIHelper
-				.createPartName("/foo/foo.xml");
-		PackagePartName name2 = PackagingURIHelper
-				.createPartName("/foo/foo2.xml");
-		PackagePartName name3 = PackagingURIHelper
-				.createPartName("/foo/doc.rels");
-		PackagePartName name4 = PackagingURIHelper
-				.createPartName("/foo/doc.RELS");
+		PackagePartName name1 = PackagingURIHelper.createPartName("/foo/foo.xml");
+		PackagePartName name2 = PackagingURIHelper.createPartName("/foo/foo2.xml");
+		PackagePartName name3 = PackagingURIHelper.createPartName("/foo/doc.rels");
+		PackagePartName name4 = PackagingURIHelper.createPartName("/foo/doc.RELS");
 
 		// Add content types
 		ctm.addContentType(name1, "foo-type1");
@@ -110,7 +104,7 @@
 	/**
 	 * Test the addition then removal of content types in a package.
 	 */
-	public void testContentTypeRemovalPackage() throws Exception {
+	public void testContentTypeRemovalPackage() {
 		// TODO
 	}
 }

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/ss/TestWorkbookFactory.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/ss/TestWorkbookFactory.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/ss/TestWorkbookFactory.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/ss/TestWorkbookFactory.java Tue Aug 18 19:49:28 2009
@@ -14,6 +14,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
+
 package org.apache.poi.ss;
 
 import java.io.File;
@@ -28,12 +29,12 @@
 
 import junit.framework.TestCase;
 
-public class TestWorkbookFactory extends TestCase {
+public final class TestWorkbookFactory extends TestCase {
 	private File xls;
 	private File xlsx;
 	private File txt;
 
-	protected void setUp() throws Exception {
+	protected void setUp() {
 		xls = new File(
 				System.getProperty("HSSF.testdata.path") +
 				File.separator + "SampleSS.xls"
@@ -50,17 +51,17 @@
 		assertTrue(xlsx.exists());
 		assertTrue(txt.exists());
 	}
-	
+
 	public void testCreateNative() throws Exception {
 		Workbook wb;
-		
+
 		// POIFS -> hssf
 		wb = WorkbookFactory.create(
 				new POIFSFileSystem(new FileInputStream(xls))
 		);
 		assertNotNull(wb);
 		assertTrue(wb instanceof HSSFWorkbook);
-		
+
 		// Package -> xssf
 		wb = WorkbookFactory.create(
 				OPCPackage.open(xlsx.toString())
@@ -68,7 +69,7 @@
 		assertNotNull(wb);
 		assertTrue(wb instanceof XSSFWorkbook);
 	}
-		
+
 	/**
 	 * Creates the appropriate kind of Workbook, but
 	 *  checking the mime magic at the start of the
@@ -76,20 +77,20 @@
 	 */
 	public void testCreateGeneric() throws Exception {
 		Workbook wb;
-		
+
 		// InputStream -> either
 		wb = WorkbookFactory.create(
 				new FileInputStream(xls)
 		);
 		assertNotNull(wb);
 		assertTrue(wb instanceof HSSFWorkbook);
-		
+
 		wb = WorkbookFactory.create(
 				new FileInputStream(xlsx)
 		);
 		assertNotNull(wb);
 		assertTrue(wb instanceof XSSFWorkbook);
-		
+
 		try {
 			wb = WorkbookFactory.create(
 					new FileInputStream(txt)
@@ -99,4 +100,4 @@
 			// Good
 		}
 	}
-}
\ No newline at end of file
+}

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java Tue Aug 18 19:49:28 2009
@@ -30,191 +30,150 @@
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 
 /**
- * 
  * @author Roberto Manicardi
- *
  */
-public class TestXSSFExportToXML extends TestCase{
-	
-	
-	
-	
-	
-	public void testExportToXML() throws Exception{
-	
-		
-		 XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("CustomXMLMappings.xlsx");
-		  
-		 
-		 
-		  MapInfo mapInfo = null;
-		  
-		  for(POIXMLDocumentPart p : wb.getRelations()){
-			  
-			  
-			  if(p instanceof MapInfo){
-				  mapInfo = (MapInfo) p;
-				  
-				  
-				  XSSFMap map = mapInfo.getXSSFMapById(1);
-				  XSSFExportToXml exporter = new XSSFExportToXml(map);
-				  ByteArrayOutputStream os = new ByteArrayOutputStream();
-				  exporter.exportToXML(os,true);
-				  String xml = os.toString("UTF-8");
-				  
-				  assertNotNull(xml);
-				  assertTrue(!xml.equals(""));
-				  
-				  
-				  String docente = xml.split("<DOCENTE>")[1].split("</DOCENTE>")[0].trim();
-				  String nome = xml.split("<NOME>")[1].split("</NOME>")[0].trim();
-				  String tutor = xml.split("<TUTOR>")[1].split("</TUTOR>")[0].trim();
-				  String cdl = xml.split("<CDL>")[1].split("</CDL>")[0].trim();
-				  String durata = xml.split("<DURATA>")[1].split("</DURATA>")[0].trim();
-				  String argomento = xml.split("<ARGOMENTO>")[1].split("</ARGOMENTO>")[0].trim();
-				  String progetto = xml.split("<PROGETTO>")[1].split("</PROGETTO>")[0].trim();
-				  String crediti = xml.split("<CREDITI>")[1].split("</CREDITI>")[0].trim();
-				  
-				  assertEquals("ro",docente);
-				  assertEquals("ro",nome);
-				  assertEquals("ds",tutor);
-				  assertEquals("gs",cdl);
-				  assertEquals("g",durata);
-				  assertEquals("gvvv",argomento);
-				  assertEquals("aaaa",progetto);
-				  assertEquals("aa",crediti);
-				  
-			  }
-			 
-		  }
-		
-	}
-	
-	
-	public void testExportToXMLInverseOrder() throws Exception{
-		
-	
-		
-		 XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("CustomXmlMappings-inverse-order.xlsx");
-	 
-		  MapInfo mapInfo = null;
-		  
-		  for(POIXMLDocumentPart p : wb.getRelations()){
-			  
-			  
-			  if(p instanceof MapInfo){
-				  mapInfo = (MapInfo) p;
-				  
-				  
-				  XSSFMap map = mapInfo.getXSSFMapById(1);
-				  XSSFExportToXml exporter = new XSSFExportToXml(map);
-				  ByteArrayOutputStream os = new ByteArrayOutputStream();
-				  exporter.exportToXML(os,true);
-				  String xml = os.toString("UTF-8");
-				  
-				  assertNotNull(xml);
-				  assertTrue(!xml.equals(""));
-				  
-				  String docente = xml.split("<DOCENTE>")[1].split("</DOCENTE>")[0].trim();
-				  String nome = xml.split("<NOME>")[1].split("</NOME>")[0].trim();
-				  String tutor = xml.split("<TUTOR>")[1].split("</TUTOR>")[0].trim();
-				  String cdl = xml.split("<CDL>")[1].split("</CDL>")[0].trim();
-				  String durata = xml.split("<DURATA>")[1].split("</DURATA>")[0].trim();
-				  String argomento = xml.split("<ARGOMENTO>")[1].split("</ARGOMENTO>")[0].trim();
-				  String progetto = xml.split("<PROGETTO>")[1].split("</PROGETTO>")[0].trim();
-				  String crediti = xml.split("<CREDITI>")[1].split("</CREDITI>")[0].trim();
-				  
-				  assertEquals("aa",nome);
-				  assertEquals("aaaa",docente);
-				  assertEquals("gvvv",tutor);
-				  assertEquals("g",cdl);
-				  assertEquals("gs",durata);
-				  assertEquals("ds",argomento);
-				  assertEquals("ro",progetto);
-				  assertEquals("ro",crediti);
-				  
-			  }
-			 
-		  }
-		  
-		
-		
-		
-		
+public final class TestXSSFExportToXML extends TestCase {
+
+	public void testExportToXML() throws Exception {
+
+		XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("CustomXMLMappings.xlsx");
+
+		for (POIXMLDocumentPart p : wb.getRelations()) {
+
+			if (!(p instanceof MapInfo)) {
+				continue;
+			}
+			MapInfo mapInfo = (MapInfo) p;
+
+			XSSFMap map = mapInfo.getXSSFMapById(1);
+			XSSFExportToXml exporter = new XSSFExportToXml(map);
+			ByteArrayOutputStream os = new ByteArrayOutputStream();
+			exporter.exportToXML(os, true);
+			String xml = os.toString("UTF-8");
+
+			assertNotNull(xml);
+			assertTrue(!xml.equals(""));
+
+			String docente = xml.split("<DOCENTE>")[1].split("</DOCENTE>")[0].trim();
+			String nome = xml.split("<NOME>")[1].split("</NOME>")[0].trim();
+			String tutor = xml.split("<TUTOR>")[1].split("</TUTOR>")[0].trim();
+			String cdl = xml.split("<CDL>")[1].split("</CDL>")[0].trim();
+			String durata = xml.split("<DURATA>")[1].split("</DURATA>")[0].trim();
+			String argomento = xml.split("<ARGOMENTO>")[1].split("</ARGOMENTO>")[0].trim();
+			String progetto = xml.split("<PROGETTO>")[1].split("</PROGETTO>")[0].trim();
+			String crediti = xml.split("<CREDITI>")[1].split("</CREDITI>")[0].trim();
+
+			assertEquals("ro", docente);
+			assertEquals("ro", nome);
+			assertEquals("ds", tutor);
+			assertEquals("gs", cdl);
+			assertEquals("g", durata);
+			assertEquals("gvvv", argomento);
+			assertEquals("aaaa", progetto);
+			assertEquals("aa", crediti);
+		}
 	}
-	
-	public void testXPathOrdering() throws Exception{
-		
-		XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("CustomXmlMappings-inverse-order.xlsx");
-		
-		 MapInfo mapInfo = null;
-		  
-		  for(POIXMLDocumentPart p : wb.getRelations()){
-			  
-			  
-			  if(p instanceof MapInfo){
-				  mapInfo = (MapInfo) p;
-				  
-				  XSSFMap map = mapInfo.getXSSFMapById(1);
-				  XSSFExportToXml exporter = new XSSFExportToXml(map);
-				  
-				  assertEquals(1,exporter.compare("/CORSO/DOCENTE", "/CORSO/NOME"));
-				  
-				  assertEquals(-1,exporter.compare("/CORSO/NOME", "/CORSO/DOCENTE"));
-				  
-				  
-			  }
-		  }
+
+	public void testExportToXMLInverseOrder() throws Exception {
+
+		XSSFWorkbook wb = XSSFTestDataSamples
+				.openSampleWorkbook("CustomXmlMappings-inverse-order.xlsx");
+
+		MapInfo mapInfo = null;
+
+		for (POIXMLDocumentPart p : wb.getRelations()) {
+
+			if (!(p instanceof MapInfo)) {
+				continue;
+			}
+			mapInfo = (MapInfo) p;
+
+			XSSFMap map = mapInfo.getXSSFMapById(1);
+			XSSFExportToXml exporter = new XSSFExportToXml(map);
+			ByteArrayOutputStream os = new ByteArrayOutputStream();
+			exporter.exportToXML(os, true);
+			String xml = os.toString("UTF-8");
+
+			assertNotNull(xml);
+			assertTrue(!xml.equals(""));
+
+			String docente = xml.split("<DOCENTE>")[1].split("</DOCENTE>")[0].trim();
+			String nome = xml.split("<NOME>")[1].split("</NOME>")[0].trim();
+			String tutor = xml.split("<TUTOR>")[1].split("</TUTOR>")[0].trim();
+			String cdl = xml.split("<CDL>")[1].split("</CDL>")[0].trim();
+			String durata = xml.split("<DURATA>")[1].split("</DURATA>")[0].trim();
+			String argomento = xml.split("<ARGOMENTO>")[1].split("</ARGOMENTO>")[0].trim();
+			String progetto = xml.split("<PROGETTO>")[1].split("</PROGETTO>")[0].trim();
+			String crediti = xml.split("<CREDITI>")[1].split("</CREDITI>")[0].trim();
+
+			assertEquals("aa", nome);
+			assertEquals("aaaa", docente);
+			assertEquals("gvvv", tutor);
+			assertEquals("g", cdl);
+			assertEquals("gs", durata);
+			assertEquals("ds", argomento);
+			assertEquals("ro", progetto);
+			assertEquals("ro", crediti);
+		}
 	}
-	
-	
 
-	
-	public void testMultiTable() throws Exception{
-		
-		
-		XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("CustomXMLMappings-complex-type.xlsx");	 
-		  
-		  for(POIXMLDocumentPart p : wb.getRelations()){
-			  
-			  
-			  if(p instanceof MapInfo){
-				  MapInfo mapInfo = (MapInfo) p;
-				  
-				  XSSFMap map = mapInfo.getXSSFMapById(2);
-				  
-				  assertNotNull(map);
-				  
-				  XSSFExportToXml exporter = new XSSFExportToXml(map);
-				  ByteArrayOutputStream os = new ByteArrayOutputStream();
-				  exporter.exportToXML(os,true);
-				  String xml = os.toString("UTF-8");
-				  
-				  assertNotNull(xml);
-				  
-				  String[] regexConditions = {  "<MapInfo",
-						  						"</MapInfo>",
-						  						"<Schema ID=\"1\" Namespace=\"\" SchemaRef=\"\"/>",
-						  						"<Schema ID=\"4\" Namespace=\"\" SchemaRef=\"\"/>",
-						  						"DataBinding",
-						  						"Map Append=\"false\" AutoFit=\"false\" ID=\"1\"",
-						  						"Map Append=\"false\" AutoFit=\"false\" ID=\"5\""
-						  						
-				  						     };
-				  
-				  for(String condition : regexConditions){
-					  Pattern pattern = Pattern.compile(condition);
-					  Matcher matcher = pattern.matcher(xml);
-					  assertTrue(matcher.find());
-				  }
-				  
-				  
-			  }
-		  }
-		
-		
+	public void testXPathOrdering() {
+
+		XSSFWorkbook wb = XSSFTestDataSamples
+				.openSampleWorkbook("CustomXmlMappings-inverse-order.xlsx");
+
+		MapInfo mapInfo = null;
+
+		for (POIXMLDocumentPart p : wb.getRelations()) {
+
+			if (p instanceof MapInfo) {
+				mapInfo = (MapInfo) p;
+
+				XSSFMap map = mapInfo.getXSSFMapById(1);
+				XSSFExportToXml exporter = new XSSFExportToXml(map);
+
+				assertEquals(1, exporter.compare("/CORSO/DOCENTE", "/CORSO/NOME"));
+				assertEquals(-1, exporter.compare("/CORSO/NOME", "/CORSO/DOCENTE"));
+			}
+		}
 	}
-	
-	
 
+	public void testMultiTable() throws Exception {
+
+		XSSFWorkbook wb = XSSFTestDataSamples
+				.openSampleWorkbook("CustomXMLMappings-complex-type.xlsx");
+
+		for (POIXMLDocumentPart p : wb.getRelations()) {
+
+			if (p instanceof MapInfo) {
+				MapInfo mapInfo = (MapInfo) p;
+
+				XSSFMap map = mapInfo.getXSSFMapById(2);
+
+				assertNotNull(map);
+
+				XSSFExportToXml exporter = new XSSFExportToXml(map);
+				ByteArrayOutputStream os = new ByteArrayOutputStream();
+				exporter.exportToXML(os, true);
+				String xml = os.toString("UTF-8");
+
+				assertNotNull(xml);
+
+				String[] regexConditions = {
+						"<MapInfo", "</MapInfo>",
+						"<Schema ID=\"1\" Namespace=\"\" SchemaRef=\"\"/>",
+						"<Schema ID=\"4\" Namespace=\"\" SchemaRef=\"\"/>",
+						"DataBinding",
+						"Map Append=\"false\" AutoFit=\"false\" ID=\"1\"",
+						"Map Append=\"false\" AutoFit=\"false\" ID=\"5\"",
+				};
+
+				for (String condition : regexConditions) {
+					Pattern pattern = Pattern.compile(condition);
+					Matcher matcher = pattern.matcher(xml);
+					assertTrue(matcher.find());
+				}
+			}
+		}
+	}
 }

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestCalculationChain.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestCalculationChain.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestCalculationChain.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestCalculationChain.java Tue Aug 18 19:49:28 2009
@@ -24,9 +24,9 @@
 import junit.framework.TestCase;
 
 
-public class TestCalculationChain extends TestCase {
+public final class TestCalculationChain extends TestCase {
 
-    public void test46535() throws Exception {
+    public void test46535() {
         XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("46535.xlsx");
 
         CalculationChain chain = wb.getCalculationChain();
@@ -42,7 +42,7 @@
         assertEquals(XSSFCell.CELL_TYPE_FORMULA, cell.getCellType());
         cell.setCellFormula(null);
 
-        //the count of items is less by one 
+        //the count of items is less by one
         c = chain.getCTCalcChain().getCArray(0);
         int cnt2 =  chain.getCTCalcChain().getCArray().length;
         assertEquals(cnt - 1, cnt2);
@@ -56,4 +56,4 @@
     }
 
 
-}
\ No newline at end of file
+}

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestMapInfo.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestMapInfo.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestMapInfo.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestMapInfo.java Tue Aug 18 19:49:28 2009
@@ -30,11 +30,10 @@
 /**
  * @author Roberto Manicardi
  */
-public class TestMapInfo extends TestCase {
+public final class TestMapInfo extends TestCase {
 
 
-    public void testMapInfoExists() throws Exception {
-
+    public void testMapInfoExists() {
 
         XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("CustomXMLMappings.xlsx");
 
@@ -72,13 +71,7 @@
             }
 
         }
-
-
         assertNotNull(mapInfo);
         assertNotNull(singleXMLCells);
-
-
     }
-
-
 }

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestStylesTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestStylesTable.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestStylesTable.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestStylesTable.java Tue Aug 18 19:49:28 2009
@@ -25,10 +25,10 @@
 
 import junit.framework.TestCase;
 
-public class TestStylesTable extends TestCase {
+public final class TestStylesTable extends TestCase {
 	private File xml;
-	
-	protected void setUp() throws Exception {
+
+	protected void setUp() {
 		xml = new File(
 				System.getProperty("HSSF.testdata.path") +
 				File.separator + "Formatting.xlsx"
@@ -36,92 +36,92 @@
 		assertTrue(xml.exists());
 	}
 
-	public void testCreateNew() throws Exception {
+	public void testCreateNew() {
 		StylesTable st = new StylesTable();
-		
+
 		// Check defaults
 		assertNotNull(st.getCTStylesheet());
 		assertEquals(1, st._getXfsSize());
 		assertEquals(1, st._getStyleXfsSize());
 		assertEquals(0, st._getNumberFormatSize());
 	}
-	
-	public void testCreateSaveLoad() throws Exception {
-        XSSFWorkbook wb = new XSSFWorkbook();
-        StylesTable st = wb.getStylesSource();
+
+	public void testCreateSaveLoad() {
+		XSSFWorkbook wb = new XSSFWorkbook();
+		StylesTable st = wb.getStylesSource();
 
 		assertNotNull(st.getCTStylesheet());
 		assertEquals(1, st._getXfsSize());
 		assertEquals(1, st._getStyleXfsSize());
 		assertEquals(0, st._getNumberFormatSize());
-		
+
 		st = XSSFTestDataSamples.writeOutAndReadBack(wb).getStylesSource();
 
-        assertNotNull(st.getCTStylesheet());
+		assertNotNull(st.getCTStylesheet());
 		assertEquals(1, st._getXfsSize());
 		assertEquals(1, st._getStyleXfsSize());
 		assertEquals(0, st._getNumberFormatSize());
 	}
-	
+
 	public void testLoadExisting() throws Exception {
 		XSSFWorkbook workbook = new XSSFWorkbook(xml.toString());
 		assertNotNull(workbook.getStylesSource());
-		
+
 		StylesTable st = workbook.getStylesSource();
-		
+
 		doTestExisting(st);
 	}
 	public void testLoadSaveLoad() throws Exception {
 		XSSFWorkbook workbook = new XSSFWorkbook(xml.toString());
 		assertNotNull(workbook.getStylesSource());
-		
+
 		StylesTable st = workbook.getStylesSource();
 		doTestExisting(st);
-		
+
 		st = XSSFTestDataSamples.writeOutAndReadBack(workbook).getStylesSource();
 		doTestExisting(st);
 	}
-	public void doTestExisting(StylesTable st) throws Exception {
+	public void doTestExisting(StylesTable st) {
 		// Check contents
 		assertNotNull(st.getCTStylesheet());
 		assertEquals(11, st._getXfsSize());
 		assertEquals(1, st._getStyleXfsSize());
 		assertEquals(8, st._getNumberFormatSize());
-		
+
 		assertEquals(2, st.getFonts().size());
 		assertEquals(2, st.getFills().size());
 		assertEquals(1, st.getBorders().size());
-		
+
 		assertEquals("yyyy/mm/dd", st.getNumberFormatAt(165));
 		assertEquals("yy/mm/dd", st.getNumberFormatAt(167));
-		
+
 		assertNotNull(st.getStyleAt(0));
 		assertNotNull(st.getStyleAt(1));
 		assertNotNull(st.getStyleAt(2));
-		
+
 		assertEquals(0, st.getStyleAt(0).getDataFormat());
 		assertEquals(14, st.getStyleAt(1).getDataFormat());
 		assertEquals(0, st.getStyleAt(2).getDataFormat());
 		assertEquals(165, st.getStyleAt(3).getDataFormat());
-		
+
 		assertEquals("yyyy/mm/dd", st.getStyleAt(3).getDataFormatString());
 	}
-	
-	public void testPopulateNew() throws Exception {
+
+	public void testPopulateNew() {
 		XSSFWorkbook wb = new XSSFWorkbook();
-        StylesTable st = wb.getStylesSource();
-		
+		StylesTable st = wb.getStylesSource();
+
 		assertNotNull(st.getCTStylesheet());
 		assertEquals(1, st._getXfsSize());
 		assertEquals(1, st._getStyleXfsSize());
 		assertEquals(0, st._getNumberFormatSize());
-		
+
 		int nf1 = st.putNumberFormat("yyyy-mm-dd");
 		int nf2 = st.putNumberFormat("yyyy-mm-DD");
 		assertEquals(nf1, st.putNumberFormat("yyyy-mm-dd"));
-		
+
 		st.putStyle(new XSSFCellStyle(st));
-		
+
 		// Save and re-load
 		st = XSSFTestDataSamples.writeOutAndReadBack(wb).getStylesSource();
 
@@ -129,31 +129,31 @@
 		assertEquals(2, st._getXfsSize());
 		assertEquals(1, st._getStyleXfsSize());
 		assertEquals(2, st._getNumberFormatSize());
-		
+
 		assertEquals("yyyy-mm-dd", st.getNumberFormatAt(nf1));
 		assertEquals(nf1, st.putNumberFormat("yyyy-mm-dd"));
 		assertEquals(nf2, st.putNumberFormat("yyyy-mm-DD"));
 	}
-	
+
 	public void testPopulateExisting() throws Exception {
 		XSSFWorkbook workbook = new XSSFWorkbook(xml.toString());
 		assertNotNull(workbook.getStylesSource());
-		
+
 		StylesTable st = workbook.getStylesSource();
 		assertEquals(11, st._getXfsSize());
 		assertEquals(1, st._getStyleXfsSize());
 		assertEquals(8, st._getNumberFormatSize());
-		
+
 		int nf1 = st.putNumberFormat("YYYY-mm-dd");
 		int nf2 = st.putNumberFormat("YYYY-mm-DD");
 		assertEquals(nf1, st.putNumberFormat("YYYY-mm-dd"));
-		
+
         st = XSSFTestDataSamples.writeOutAndReadBack(workbook).getStylesSource();
 
 		assertEquals(11, st._getXfsSize());
 		assertEquals(1, st._getStyleXfsSize());
 		assertEquals(10, st._getNumberFormatSize());
-		
+
 		assertEquals("YYYY-mm-dd", st.getNumberFormatAt(nf1));
 		assertEquals(nf1, st.putNumberFormat("YYYY-mm-dd"));
 		assertEquals(nf2, st.putNumberFormat("YYYY-mm-DD"));

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestSheetHiding.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestSheetHiding.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestSheetHiding.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestSheetHiding.java Tue Aug 18 19:49:28 2009
@@ -37,7 +37,7 @@
      *  with the right text on them, no matter what
      *  the hidden flags are
      */
-    public void testTextSheets() throws Exception {
+    public void testTextSheets() {
         // Both should have two sheets
         assertEquals(2, wbH.getNumberOfSheets());
         assertEquals(2, wbU.getNumberOfSheets());
@@ -65,7 +65,7 @@
      * Check that we can get and set the hidden flags
      *  as expected
      */
-    public void testHideUnHideFlags() throws Exception {
+    public void testHideUnHideFlags() {
         assertTrue(wbH.isSheetHidden(0));
         assertFalse(wbH.isSheetHidden(1));
         assertFalse(wbU.isSheetHidden(0));
@@ -76,7 +76,7 @@
      * Turn the sheet with none hidden into the one with
      *  one hidden
      */
-    public void testHide() throws Exception {
+    public void testHide() {
         wbU.setSheetHidden(0, true);
         assertTrue(wbU.isSheetHidden(0));
         assertFalse(wbU.isSheetHidden(1));
@@ -89,7 +89,7 @@
      * Turn the sheet with one hidden into the one with
      *  none hidden
      */
-    public void testUnHide() throws Exception {
+    public void testUnHide() {
         wbH.setSheetHidden(0, false);
         assertFalse(wbH.isSheetHidden(0));
         assertFalse(wbH.isSheetHidden(1));

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java Tue Aug 18 19:49:28 2009
@@ -45,7 +45,7 @@
      * Named ranges had the right reference, but
      *  the wrong sheet name
      */
-    public void test45430() throws Exception {
+    public void test45430() {
         XSSFWorkbook wb = getTestDataProvider().openSampleWorkbook("45430.xlsx");
         assertFalse(wb.isMacroEnabled());
         assertEquals(3, wb.getNumberOfNames());

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java Tue Aug 18 19:49:28 2009
@@ -35,7 +35,7 @@
      * Bug 47026: trouble changing cell type when workbook doesn't contain
      * Shared String Table
      */
-    public void test47026_1() throws Exception {
+    public void test47026_1() {
         Workbook source = _testDataProvider.openSampleWorkbook("47026.xlsm");
         Sheet sheet = source.getSheetAt(0);
         Row row = sheet.getRow(0);
@@ -44,7 +44,7 @@
         cell.setCellValue("456");
     }
 
-    public void test47026_2() throws Exception {
+    public void test47026_2() {
         Workbook source = _testDataProvider.openSampleWorkbook("47026.xlsm");
         Sheet sheet = source.getSheetAt(0);
         Row row = sheet.getRow(0);
@@ -60,7 +60,7 @@
      * Some programs, for example, Microsoft Excel Driver for .xlsx insert inline string
      * instead of using the shared string table. See bug 47206
      */
-    public void testInlineString() throws Exception {
+    public void testInlineString() {
         XSSFWorkbook wb = (XSSFWorkbook)_testDataProvider.openSampleWorkbook("xlsx-jdbc.xlsx");
         XSSFSheet sheet = wb.getSheetAt(0);
         XSSFRow row = sheet.getRow(1);
@@ -84,7 +84,7 @@
     /**
      *  Bug 47278 -  xsi:nil attribute for <t> tag caused Excel 2007 to fail to open workbook
      */
-    public void test47278() throws Exception {
+    public void test47278() {
         XSSFWorkbook wb = (XSSFWorkbook)_testDataProvider.createWorkbook();
         XSSFSheet sheet = wb.createSheet();
         XSSFRow row = sheet.createRow(0);
@@ -105,5 +105,4 @@
         assertEquals(0, sst.getCount());
         assertEquals(XSSFCell.CELL_TYPE_BLANK, cell_1.getCellType());
     }
-    
-}
\ No newline at end of file
+}

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java Tue Aug 18 19:49:28 2009
@@ -46,9 +46,9 @@
 	@Override
 	protected void setUp() {
 		stylesTable = new StylesTable();
-		
+
 		ctStylesheet = stylesTable.getCTStylesheet();
-		
+
 		ctBorderA = CTBorder.Factory.newInstance();
 		XSSFCellBorder borderA = new XSSFCellBorder(ctBorderA);
 		long borderId = stylesTable.putBorder(borderA);
@@ -71,7 +71,7 @@
 		cellStyleXf.setBorderId(1);
 		cellStyleXf.setFillId(1);
 		cellStyleXf.setFontId(1);
-		
+
 		cellXfs = ctStylesheet.addNewCellXfs();
 		cellXf = cellXfs.addNewXf();
 		cellXf.setXfId(1);
@@ -419,7 +419,7 @@
         assertNull(cellStyle.getFillBackgroundXSSFColor());
         assertEquals(IndexedColors.AUTOMATIC.getIndex(), cellStyle.getFillBackgroundColor());
 	}
-	
+
 	public void testDefaultStyles() {
 
 		XSSFWorkbook wb1 = new XSSFWorkbook();
@@ -445,7 +445,7 @@
         assertEquals(style2.getBorderRight(), style1.getBorderRight());
         assertEquals(style2.getBorderTop(), style1.getBorderTop());
 	}
-	
+
 
 	public void testGetFillForegroundColor() {
 
@@ -481,7 +481,7 @@
             assertEquals(4, styles.getFills().size());
         }
 	}
-	
+
 	public void testGetFillPattern() {
 
         assertEquals(CellStyle.NO_FILL, cellStyle.getFillPattern());
@@ -585,13 +585,13 @@
 	/**
 	 * Cloning one XSSFCellStyle onto Another, same XSSFWorkbook
 	 */
-	public void testCloneStyleSameWB() throws Exception {
+	public void testCloneStyleSameWB() {
 		// TODO
 	}
 	/**
 	 * Cloning one XSSFCellStyle onto Another, different XSSFWorkbooks
 	 */
-	public void testCloneStyleDiffWB() throws Exception {
+	public void testCloneStyleDiffWB() {
 		// TODO
 	}
 }

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFComment.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFComment.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFComment.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFComment.java Tue Aug 18 19:49:28 2009
@@ -140,7 +140,7 @@
      *  file, save, load, and still see them
      * @throws Exception
      */
-    public void testCreateSave() throws Exception {
+    public void testCreateSave() {
         XSSFWorkbook wb = new XSSFWorkbook();
         XSSFSheet s1 = wb.createSheet();
         Row r1 = s1.createRow(0);

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java Tue Aug 18 19:49:28 2009
@@ -27,14 +27,15 @@
  */
 public final class TestXSSFDataFormat extends BaseTestDataFormat {
 
-    @Override
-    protected ITestDataProvider getTestDataProvider(){
-        return XSSFITestDataProvider.getInstance();
-    }
+	@Override
+	protected ITestDataProvider getTestDataProvider() {
+		return XSSFITestDataProvider.getInstance();
+	}
+
 	/**
-     * Test setting and getting boolean values.
-     */
-    public void testBuiltinFormats() throws Exception {
-        baseBuiltinFormats();
-    }
+	 * Test setting and getting boolean values.
+	 */
+	public void testBuiltinFormats() {
+		baseBuiltinFormats();
+	}
 }

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/TestXWPFDocument.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/TestXWPFDocument.java?rev=805552&r1=805551&r2=805552&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/TestXWPFDocument.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/TestXWPFDocument.java Tue Aug 18 19:49:28 2009
@@ -14,6 +14,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
+
 package org.apache.poi.xwpf;
 
 import java.io.File;
@@ -27,13 +28,13 @@
 import org.apache.poi.xwpf.usermodel.XWPFDocument;
 import org.apache.poi.xwpf.usermodel.XWPFRelation;
 
-public class TestXWPFDocument extends TestCase {
+public final class TestXWPFDocument extends TestCase {
 	private File sampleFile;
 	private File complexFile;
 
 	protected void setUp() throws Exception {
 		super.setUp();
-		
+
 		sampleFile = new File(
 				System.getProperty("HWPF.testdata.path") +
 				File.separator + "sample.docx"
@@ -42,14 +43,14 @@
 				System.getProperty("HWPF.testdata.path") +
 				File.separator + "IllustrativeCases.docx"
 		);
-		
+
 		assertTrue(sampleFile.exists());
 		assertTrue(complexFile.exists());
 	}
 
 	public void testContainsMainContentType() throws Exception {
 		OPCPackage pack = POIXMLDocument.openPackage(sampleFile.toString());
-		
+
 		boolean found = false;
 		for(PackagePart part : pack.getParts()) {
 			if(part.getContentType().equals(XWPFRelation.DOCUMENT.getContentType())) {
@@ -63,16 +64,16 @@
 	public void testOpen() throws Exception {
 		POIXMLDocument.openPackage(sampleFile.toString());
 		POIXMLDocument.openPackage(complexFile.toString());
-		
+
 		new XWPFDocument(
 				POIXMLDocument.openPackage(sampleFile.toString())
 		);
 		new XWPFDocument(
 				POIXMLDocument.openPackage(complexFile.toString())
 		);
-		
+
 		XWPFDocument xml;
-		
+
 		// Simple file
 		xml = new XWPFDocument(
 				POIXMLDocument.openPackage(sampleFile.toString())
@@ -81,7 +82,7 @@
 		assertNotNull(xml.getDocument());
 		assertNotNull(xml.getDocument().getBody());
 		assertNotNull(xml.getStyle());
-		
+
 		// Complex file
 		xml = new XWPFDocument(
 				POIXMLDocument.openPackage(complexFile.toString())
@@ -90,42 +91,42 @@
 		assertNotNull(xml.getDocument().getBody());
 		assertNotNull(xml.getStyle());
 	}
-	
+
 	public void testMetadataBasics() throws Exception {
 		XWPFDocument xml = new XWPFDocument(
 				POIXMLDocument.openPackage(sampleFile.toString())
 		);
 		assertNotNull(xml.getProperties().getCoreProperties());
 		assertNotNull(xml.getProperties().getExtendedProperties());
-		
+
 		assertEquals("Microsoft Office Word", xml.getProperties().getExtendedProperties().getUnderlyingProperties().getApplication());
 		assertEquals(1315, xml.getProperties().getExtendedProperties().getUnderlyingProperties().getCharacters());
 		assertEquals(10, xml.getProperties().getExtendedProperties().getUnderlyingProperties().getLines());
-		
+
 		assertEquals(null, xml.getProperties().getCoreProperties().getTitle());
 		assertEquals(null, xml.getProperties().getCoreProperties().getUnderlyingProperties().getSubjectProperty().getValue());
 	}
-	
+
 	public void testMetadataComplex() throws Exception {
 		XWPFDocument xml = new XWPFDocument(
 				POIXMLDocument.openPackage(complexFile.toString())
 		);
 		assertNotNull(xml.getProperties().getCoreProperties());
 		assertNotNull(xml.getProperties().getExtendedProperties());
-		
+
 		assertEquals("Microsoft Office Outlook", xml.getProperties().getExtendedProperties().getUnderlyingProperties().getApplication());
 		assertEquals(5184, xml.getProperties().getExtendedProperties().getUnderlyingProperties().getCharacters());
 		assertEquals(0, xml.getProperties().getExtendedProperties().getUnderlyingProperties().getLines());
-		
+
 		assertEquals(" ", xml.getProperties().getCoreProperties().getTitle());
 		assertEquals(" ", xml.getProperties().getCoreProperties().getUnderlyingProperties().getSubjectProperty().getValue());
 	}
 
-    public void testWorkbookProperties() throws Exception {
-        XWPFDocument doc = new XWPFDocument();
-        POIXMLProperties props = doc.getProperties();
-        assertNotNull(props);
-        assertEquals("Apache POI", props.getExtendedProperties().getUnderlyingProperties().getApplication());
-    }
+	public void testWorkbookProperties() {
+		XWPFDocument doc = new XWPFDocument();
+		POIXMLProperties props = doc.getProperties();
+		assertNotNull(props);
+		assertEquals("Apache POI", props.getExtendedProperties().getUnderlyingProperties().getApplication());
+	}
 
 }



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


Mime
View raw message