wpivotto/vraptor-jasperreport — pull request #10 by rponte (2013-09-10 16:00:07+00:00)
Title: Avoids NullPointerException when controller returns a ReportDownload as null

The NPE happens when you have a code like this:

```java
public ReportDownload generateReport() {

List products = service.listAll();
if (products.isEmpty()) {
result.include("warning", "There's no data to generate the report.");
result.forwardTo(this).index();
return null; // oh shit :~
}

Report report = new ProductsReport(products);
return new ReportDownload(report, pdf());
}
```
That was exactly my case! I know I could simply return `Report`, [where this NPE doesn't happen](https://github.com/wpivotto/vraptor-jasperreport/blob/master/src/main/java/br/com/caelum/vraptor/jasperreports/download/ReportDownloadInterceptor.java#L54), but I preferred to solve this issue instead.

Well, congrats for this awesome plugin!