Skip to content

Commit 8fab14d

Browse files
committed
Upgraded to JasperReports 5.0 (preserving compatibility with all previous releases) and POI 3.9 (preserving compatibility with POI 3.5+)
1 parent 9caa514 commit 8fab14d

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,10 +421,10 @@ project("spring-context-support") {
421421
optional("org.apache.velocity:velocity:1.7")
422422
optional("org.freemarker:freemarker:2.3.15")
423423
optional("com.lowagie:itext:2.1.7")
424-
optional("jasperreports:jasperreports:2.0.5")
424+
optional("net.sf.jasperreports:jasperreports:5.0.4")
425425
optional("org.slf4j:slf4j-api:${slf4jVersion}")
426426
provided("javax.activation:activation:1.1")
427-
testCompile("org.apache.poi:poi:3.0.2-FINAL")
427+
testCompile("org.apache.poi:poi:3.9")
428428
testCompile("commons-beanutils:commons-beanutils:1.8.0") // for Velocity/JasperReports
429429
testCompile("commons-digester:commons-digester:1.8.1") // for Velocity/JasperReports
430430
testCompile("hsqldb:hsqldb:${hsqldbVersion}")
@@ -527,9 +527,9 @@ project("spring-webmvc") {
527527
optional("org.apache.tiles:tiles-jsp:2.1.2")
528528
optional("org.apache.tiles:tiles-servlet:2.1.2")
529529
optional("net.sourceforge.jexcelapi:jxl:2.6.3")
530-
optional("org.apache.poi:poi:3.0.2-FINAL")
530+
optional("org.apache.poi:poi:3.9")
531531
optional("com.lowagie:itext:2.1.7")
532-
optional("jasperreports:jasperreports:2.0.5") {
532+
optional("net.sf.jasperreports:jasperreports:5.0.4") {
533533
exclude group: "xml-apis", module: "xml-apis"
534534
}
535535
optional("rome:rome:1.0")

spring-context-support/src/test/java/org/springframework/ui/jasperreports/JasperReportsUtilsTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2013 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -122,7 +122,7 @@ public void testRenderAsPdfWithCollection() throws Exception {
122122
public void testRenderAsPdfWithExporterParameters() throws Exception {
123123
ByteArrayOutputStream os = new ByteArrayOutputStream();
124124
Map<JRExporterParameter, Object> exporterParameters = new HashMap<JRExporterParameter, Object>();
125-
exporterParameters.put(JRPdfExporterParameter.PDF_VERSION, JRPdfExporterParameter.PDF_VERSION_1_6.toString());
125+
exporterParameters.put(JRPdfExporterParameter.PDF_VERSION, JRPdfExporterParameter.PDF_VERSION_1_6);
126126
JasperReportsUtils.renderAsPdf(getReport(), getParameters(), getData(), os, exporterParameters);
127127
byte[] output = os.toByteArray();
128128
assertPdfOutputCorrect(output);

spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractExcelView.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2009 the original author or authors.
2+
* Copyright 2002-2013 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@
3535

3636
/**
3737
* Convenient superclass for Excel document views.
38-
* Compatible with Apache POI 3.0 as well as 3.5, as of Spring 3.0.
38+
* Compatible with Apache POI 3.5 and higher, as of Spring 4.0.
3939
*
4040
* <p>Properties:
4141
* <ul>
@@ -203,9 +203,9 @@ protected HSSFCell getCell(HSSFSheet sheet, int row, int col) {
203203
if (sheetRow == null) {
204204
sheetRow = sheet.createRow(row);
205205
}
206-
HSSFCell cell = sheetRow.getCell((short) col);
206+
HSSFCell cell = sheetRow.getCell(col);
207207
if (cell == null) {
208-
cell = sheetRow.createCell((short) col);
208+
cell = sheetRow.createCell(col);
209209
}
210210
return cell;
211211
}

0 commit comments

Comments
 (0)