Openbravo Issue Tracking System - Modules
View Issue Details
0050368ModulesOpenbravo Business APIpublic2022-09-28 15:282022-10-11 10:48
ignacio_deandres 
ignacio_deandres 
normalminorhave not tried
closedfixed 
5
 
 
0050368: Code improvements required in some classes in the business API
There are event handlers that should be repackaged and their classes should not be public. These classes should be in the "dal" package, alongside the other event handlers.
There are classes that implement the ImportedBaseOBObjectFetcher interface. These classes should return a concrete object type, and not a generic one.
There is some code that could be refactored.
No need to reproduce as it is just code clean up.
No tags attached.
related to defect 0044131 acknowledged Triage Platform Conn Remove unneeded generic method in ImportedBaseOBObjectFetcher, it results in unchecked warning 
Issue History
2022-09-28 15:28ignacio_deandresNew Issue
2022-09-28 15:28ignacio_deandresAssigned To => ignacio_deandres
2022-09-28 15:46hgbotNote Added: 0141447
2022-09-29 13:01ignacio_deandresDescription Updatedbug_revision_view_page.php?rev_id=24797#r24797
2022-10-10 15:46caristuRelationship addedrelated to 0044131
2022-10-10 15:47hgbotNote Added: 0141920
2022-10-10 15:47hgbotResolutionopen => fixed
2022-10-10 15:47hgbotStatusnew => closed
2022-10-10 15:47hgbotNote Added: 0141921
2022-10-11 10:48hgbotNote Added: 0141949

Notes
(0141447)
hgbot   
2022-09-28 15:46   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/merge_requests/89 [^]
(0141920)
hgbot   
2022-10-10 15:47   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/merge_requests/89 [^]
(0141921)
hgbot   
2022-10-10 15:47   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.api [^]
Changeset: 073f8806d72f695e16806d3a6ba5f26e7dd085ed
Author: ignacio.deandres <ignacio.deandres@openbravo.com>
Date: 10-10-2022 13:34:55
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/commit/073f8806d72f695e16806d3a6ba5f26e7dd085ed [^]

Fixes ISSUE-50368: code improvements

  - EntityPersistenceEventObservers do not need to be public and also have been repackaged
  - Use class instead of generic class in ImportedBaseOBObjectFetcher

---
A src/org/openbravo/api/dal/goodsmovement/GoodsMvmtLinesEventHandler.java
A src/org/openbravo/api/dal/inventory/InventoryLinesEventHandler.java
M src/org/openbravo/api/hook/goodsmovement/ImportGoodsMvmtBaseOBObjectFetcher.java
M src/org/openbravo/api/hook/inventory/ImportInventoryBaseOBObjectFetcher.java
M src/org/openbravo/api/hook/user/ImportedUserRolesBaseOBObjectFetcher.java
---
(0141949)
hgbot   
2022-10-11 10:48   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.api [^]
Changeset: 480da79b3ee5f8237f73989cc65836d41798a75a
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 11-10-2022 10:44:55
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/commit/480da79b3ee5f8237f73989cc65836d41798a75a [^]

related to ISSUE-50368: revert changes done in ImportedBaseOBObjectFetchers

  The changes to improve the ImportedBaseOBObjectFetchers code forced us
to include a @SuppressWarnings("unchecked") at class level to avoid
warning errors when compiling through the console.

  As in general we do not want to skip this check for an entire class,
we are just reverting the changes done at the fetch method declaration
for those classes.

---
M src/org/openbravo/api/hook/goodsmovement/ImportGoodsMvmtBaseOBObjectFetcher.java
M src/org/openbravo/api/hook/inventory/ImportInventoryBaseOBObjectFetcher.java
M src/org/openbravo/api/hook/user/ImportedUserRolesBaseOBObjectFetcher.java
---