Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033225Openbravo ERPA. Platformpublic2016-06-11 21:362016-06-20 12:46
guillermogil 
caristu 
immediatemajoralways
closedfixed 
5
 
3.0PR16Q2.13.0PR16Q2.1 
alostale
Core
Production - QA Approved
2015-10-27
3.0PR16Q1
https://code.openbravo.com/erp/devel/pi/rev/cbf2d65774b8afda5265c76b78642271a0a7246a [^]
No
0033225: ConcatPDFReport has a null pointer exception if is used without reportConfiguration parameter
ConcatPDFReport has a null pointer exception if is used without reportConfiguration parameter
Method concatPDFReport(List<JasperPrint> jasperPrintList, boolean createBookmarks,
      OutputStream outputStream)
is creating a null pointer exception
Create a call on concatPDFReport(List<JasperPrint> jasperPrintList, boolean createBookmarks,
      OutputStream outputStream)
Without any SimplePdfExporterConfiguration
On ReportingUtils.java:
   public static void concatPDFReport(List<JasperPrint> jasperPrintList, boolean createBookmarks,
      OutputStream outputStream, SimplePdfExporterConfiguration reportConfiguration)
      throws JRException {

    JRPdfExporter exporter = new JRPdfExporter();
    SimpleOutputStreamExporterOutput exporterOutput = new SimpleOutputStreamExporterOutput(
        outputStream);
    SimplePdfExporterConfiguration configuration = reportConfiguration != null ? reportConfiguration
        : new SimplePdfExporterConfiguration();

    reportConfiguration.setCreatingBatchModeBookmarks(createBookmarks);
    exporter.setConfiguration(configuration);
    exporter.setExporterInput(SimpleExporterInput.getInstance(jasperPrintList));
    exporter.setExporterOutput(exporterOutput);

    exporter.exportReport();
  }

Line:
    reportConfiguration.setCreatingBatchModeBookmarks(createBookmarks);
Should be:
    configuration.setCreatingBatchModeBookmarks(createBookmarks);
No tags attached.
blocks defect 0033222 closed caristu ConcatPDFReport has a null pointer exception if is used without reportConfiguration parameter 
Issue History
2016-06-13 09:49alostaleTypedefect => backport
2016-06-13 09:49alostaleTarget Version => 3.0PR16Q2.1
2016-06-17 08:40hgbotCheckin
2016-06-17 08:40hgbotNote Added: 0087377
2016-06-17 08:40hgbotStatusscheduled => resolved
2016-06-17 08:40hgbotResolutionopen => fixed
2016-06-17 08:40hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR16Q2.1/rev/0d7147bf0f26fcf6bc98e10fd92b0461fee9f887 [^]
2016-06-17 08:40caristuReview Assigned To => alostale
2016-06-20 12:46alostaleNote Added: 0087664
2016-06-20 12:46alostaleStatusresolved => closed
2016-06-20 12:46alostaleFixed in Version => 3.0PR16Q2.1

Notes
(0087377)
hgbot   
2016-06-17 08:40   
Repository: erp/backports/3.0PR16Q2.1
Changeset: 0d7147bf0f26fcf6bc98e10fd92b0461fee9f887
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri Jun 17 08:39:55 2016 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR16Q2.1/rev/0d7147bf0f26fcf6bc98e10fd92b0461fee9f887 [^]

fixes issue 33225: ConcatPDFReport can throw a null pointer exception
Use the correct variable name (configuration instead of reportConfiguration) when using the setCreatingBatchModeBookmarks method

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportingUtils.java
---
(0087664)
alostale   
2016-06-20 12:46   
code reviewed + tested