You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by on...@apache.org on 2016/07/17 10:27:45 UTC

svn commit: r1753053 - /poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/HyperlinkExample.java

Author: onealj
Date: Sun Jul 17 10:27:44 2016
New Revision: 1753053

URL: http://svn.apache.org/viewvc?rev=1753053&view=rev
Log:
close workbook to avoid resource leak

Modified:
    poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/HyperlinkExample.java

Modified: poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/HyperlinkExample.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/HyperlinkExample.java?rev=1753053&r1=1753052&r2=1753053&view=diff
==============================================================================
--- poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/HyperlinkExample.java (original)
+++ poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/HyperlinkExample.java Sun Jul 17 10:27:44 2016
@@ -17,6 +17,7 @@
 package org.apache.poi.xssf.usermodel.examples;
 
 import java.io.FileOutputStream;
+import java.io.IOException;
 
 import org.apache.poi.common.usermodel.HyperlinkType;
 import org.apache.poi.ss.usermodel.Cell;
@@ -35,7 +36,7 @@ import org.apache.poi.xssf.usermodel.XSS
 public class HyperlinkExample {
 
 
-    public static void main(String[]args) throws Exception{
+    public static void main(String[]args) throws IOException {
         Workbook wb = new XSSFWorkbook(); //or new HSSFWorkbook();
         CreationHelper createHelper = wb.getCreationHelper();
 
@@ -91,6 +92,7 @@ public class HyperlinkExample {
         FileOutputStream out = new FileOutputStream("hyperinks.xlsx");
         wb.write(out);
         out.close();
-
+        
+        wb.close();
     }
 }



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