diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractExcelView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractExcelView.java index c3ff4f5d8cb..425ac888108 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractExcelView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractExcelView.java @@ -26,7 +26,6 @@ import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; -import org.apache.poi.poifs.filesystem.POIFSFileSystem; import org.springframework.core.io.Resource; import org.springframework.core.io.support.LocalizedResourceHelper; @@ -172,8 +171,7 @@ public abstract class AbstractExcelView extends AbstractView { if (logger.isDebugEnabled()) { logger.debug("Loading Excel workbook from " + inputFile); } - POIFSFileSystem fs = new POIFSFileSystem(inputFile.getInputStream()); - return new HSSFWorkbook(fs); + return new HSSFWorkbook(inputFile.getInputStream()); } /** @@ -194,7 +192,7 @@ public abstract class AbstractExcelView extends AbstractView { *
Creates the row and the cell if they still doesn't already exist. * Thus, the column can be passed as an int, the method making the needed downcasts. * @param sheet a sheet object. The first sheet is usually obtained by workbook.getSheetAt(0) - * @param row thr row number + * @param row the row number * @param col the column number * @return the HSSFCell */ diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsMultiFormatView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsMultiFormatView.java index e1f74c277ab..2ae6bf8a926 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsMultiFormatView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsMultiFormatView.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ import org.springframework.beans.BeanUtils; import org.springframework.util.CollectionUtils; /** - * Jasper Reports view class that allows for the actual rendering format + * JasperReports view class that allows for the actual rendering format * to be specified at runtime using a parameter contained in the model. * *
This view works on the concept of a format key and a mapping key.
diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/document/ExcelViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/document/ExcelViewTests.java
index d6cfc81b3aa..c55452b0c8c 100644
--- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/document/ExcelViewTests.java
+++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/document/ExcelViewTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -36,7 +36,6 @@ import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
-import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.junit.Before;
import org.junit.Test;
@@ -59,8 +58,6 @@ import static org.junit.Assert.*;
@SuppressWarnings("deprecation")
public class ExcelViewTests {
- private MockServletContext servletCtx;
-
private MockHttpServletRequest request;
private MockHttpServletResponse response;
@@ -70,7 +67,7 @@ public class ExcelViewTests {
@Before
public void setUp() {
- servletCtx = new MockServletContext("org/springframework/web/servlet/view/document");
+ MockServletContext servletCtx = new MockServletContext("org/springframework/web/servlet/view/document");
request = new MockHttpServletRequest(servletCtx);
response = new MockHttpServletResponse();
webAppCtx = new StaticWebApplicationContext();
@@ -99,8 +96,7 @@ public class ExcelViewTests {
excelView.render(new HashMap