Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0041034Openbravo ERPA. Platformpublic2019-06-05 16:432019-06-07 08:01
caristu 
caristu 
immediatemajorhave not tried
closedfixed 
5
 
3.0PR19Q2.13.0PR19Q2.1 
alostale
Core
Production - QA Approved
2019-01-08
https://code.openbravo.com/erp/devel/pi/rev/90c48060859cc70935add00e77e8065dedb197cc [^]
No
0041034: ImportEntryPreProcessors with qualifiers are not executed
ImportEntryPreProcessors with qualifiers are not executed
1) Apply the attached patch, it contains a test case that assumes thatImportEntryPreProcessors are executed
 
2) Run the test. It fails. Note that the TestImportEntryPreProcessor is not executed.

3) Remove the Qualifier annotation from the TestImportEntryPreProcessor class and rerun the test. Note that now it works.
No tags attached.
blocks defect 0041033 closed caristu ImportEntryPreProcessors with qualifiers are not executed 
Issue History
2019-06-05 16:50caristuTypedefect => backport
2019-06-05 16:50caristuTarget Version => 3.0PR19Q2.1
2019-06-06 11:09hgbotCheckin
2019-06-06 11:09hgbotNote Added: 0112461
2019-06-06 11:09hgbotStatusscheduled => resolved
2019-06-06 11:09hgbotResolutionopen => fixed
2019-06-06 11:09hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR19Q2.1/rev/36c7590bae0a74456de885458b154120c4703729 [^]
2019-06-06 11:09caristuReview Assigned To => alostale
2019-06-06 13:03caristuAssigned Toplatform => caristu
2019-06-07 08:01alostaleNote Added: 0112497
2019-06-07 08:01alostaleStatusresolved => closed
2019-06-07 08:01alostaleFixed in Version => 3.0PR19Q2.1

Notes
(0112461)
hgbot   
2019-06-06 11:09   
Repository: erp/backports/3.0PR19Q2.1
Changeset: 36c7590bae0a74456de885458b154120c4703729
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu Jun 06 10:34:38 2019 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR19Q2.1/rev/36c7590bae0a74456de885458b154120c4703729 [^]

fixes bug 41034: ImportEntryPreProcessors with qualifiers are not executed

  As part of the refactor to provide the ImportEntryBuilder[1], the injection of the import entry preprocessors was changed. As the instances of that class are created outside of the Weld scope, the preprocessors are injected using "WeldUtils.getInstances()" method instead of using @Inject.

  The problem here is that "WeldUtils.getInstances()" looked for all beans of an specific type that does not have a qualifier. For this reason, import entry preprocessors with qualifiers were not being found and, therefore, not executed by the ImportEntryBuilder before creating the import entry.

  To fix this problem now "WeldUtils.getInstances()" has been changed in order to look for any bean of a particular type (regardless of whether it is qualified or not). This is done by specifying the @Any qualifier to the "BeanManager.getBeans()" method.

  Thus, now WeldUtils.getInstances() behaves exactly in the same way as when using @Inject together with @Any when we are inside the scope of Weld.

 [1] https://code.openbravo.com/erp/devel/pi/rev/90c48060859cc70935add00e77e8065dedb197cc [^]

---
M modules/org.openbravo.base.weld/src/org/openbravo/base/weld/WeldUtils.java
---
(0112497)
alostale   
2019-06-07 08:01   
reviewed + tested