Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0043450Openbravo ERPA. Platformpublic2020-03-09 09:262020-06-08 07:10
AugustoMauch 
AugustoMauch 
normalminorhave not tried
closedfixed 
5
 
 
alostale
Core
No
0043450: ProcessUploadedFile is meant to be extensible, but is not extensible outside its package
ProcessUploadedFile is an abstract class, meant to be extended to define new processes to upload files. This is one of the methods to be overwritten:

  protected abstract UploadResult doProcessFile(JSONObject paramValues, File file) throws Exception;

The problem is that UploadResult is a inner protected class, whose default constructor is not visible outside the package where it is defined.
In a separate module, define a dummy extension of ProcessUploadedFile:

  @Override
  protected UploadResult doProcessFile(JSONObject paramValues, File file) throws Exception {
    final UploadResult uploadResult = new UploadResult();
    return uploadResult;
  }

There will be a build error:

    [javac] /home/openbravo/workspaces/src/norauto/testSnapshotTip/openbravo/modules/org.openbravo.retail.discounts.priceadjustmentbyproduct/src/org/openbravo/retail/discounts/priceadjustmentbyproduct/imports/DISPAPImportProductInDiscount.java:59: error: UploadResult() has protected access in UploadResult
    [javac] final UploadResult uploadResult = new UploadResult();
No tags attached.
Issue History
2020-03-09 09:26AugustoMauchNew Issue
2020-03-09 09:26AugustoMauchAssigned To => AugustoMauch
2020-03-09 09:26AugustoMauchModules => Core
2020-03-09 09:26AugustoMauchTriggers an Emergency Pack => No
2020-06-03 14:33hgbotCheckin
2020-06-03 14:33hgbotNote Added: 0120601
2020-06-03 14:33hgbotStatusnew => resolved
2020-06-03 14:33hgbotResolutionopen => fixed
2020-06-03 14:33hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1ed665b27b39eff20203e1a444f203c87d680132 [^]
2020-06-08 07:10alostaleReview Assigned To => alostale
2020-06-08 07:10alostaleStatusresolved => closed

Notes
(0120601)
hgbot   
2020-06-03 14:33   
Repository: erp/devel/pi
Changeset: 1ed665b27b39eff20203e1a444f203c87d680132
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Jun 03 14:33:34 2020 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1ed665b27b39eff20203e1a444f203c87d680132 [^]

Fixes ISSUE-43450: UploadResult is public so ProcessUploadedFile is extensible

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/businesslogic/ProcessUploadedFile.java
---