You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by jo...@apache.org on 2010/10/11 10:10:42 UTC

svn commit: r1021273 - /uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/ui/wizards/DocumentImportStructureProvider.java

Author: joern
Date: Mon Oct 11 08:10:41 2010
New Revision: 1021273

URL: http://svn.apache.org/viewvc?rev=1021273&view=rev
Log:
No Jira, minor formatting and removal of an unused import.

Modified:
    uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/ui/wizards/DocumentImportStructureProvider.java

Modified: uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/ui/wizards/DocumentImportStructureProvider.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/ui/wizards/DocumentImportStructureProvider.java?rev=1021273&r1=1021272&r2=1021273&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/ui/wizards/DocumentImportStructureProvider.java (original)
+++ uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/ui/wizards/DocumentImportStructureProvider.java Mon Oct 11 08:10:41 2010
@@ -26,7 +26,6 @@ import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
-import java.nio.charset.Charset;
 import java.util.List;
 
 import javax.swing.text.BadLocationException;
@@ -104,26 +103,25 @@ final class DocumentImportStructureProvi
     ByteArrayOutputStream out = new ByteArrayOutputStream(40000);
 
     if (DocumentFormat.XCAS.equals(format)) {
-	    try {
-	      XCASSerializer.serialize(cas, out);
-	    } catch (SAXException e) {
-	      // should not happen
-	      throw new TaeError("Unexpected exception!", e);
-	    } catch (IOException e) {
-	      // will not happen, writing to memory
-	      throw new TaeError("Unexpected exception!", e);
-	    }
-    }
+      try {
+        XCASSerializer.serialize(cas, out);
+      } catch (SAXException e) {
+        // should not happen
+        throw new TaeError("Unexpected exception!", e);
+      } catch (IOException e) {
+        // will not happen, writing to memory
+        throw new TaeError("Unexpected exception!", e);
+      }
+    } 
     else if (DocumentFormat.XMI.equals(format)) {
-    	try {
-			XmiCasSerializer.serialize(cas, out);
-		} catch (SAXException e) {
-			// should not happen
-			throw new TaeError("Unexpected exception!", e);
-		}
-    }
-    else {
-    	throw new TaeError("Unkown document type!", null);
+      try {
+        XmiCasSerializer.serialize(cas, out);
+      } catch (SAXException e) {
+        // should not happen
+        throw new TaeError("Unexpected exception!", e);
+      }
+    } else {
+      throw new TaeError("Unkown document type!", null);
     }
 
     return new ByteArrayInputStream(out.toByteArray());