Openbravo Issue Tracking System - Modules | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0044131 | Modules | External Integration Infrastructure | public | 2020-05-21 11:24 | 2022-07-22 11:25 | |||||||
Reporter | AugustoMauch | |||||||||||
Assigned To | Triage Platform Conn | |||||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | |||||||
Status | acknowledged | Resolution | open | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | |||||||||||
Merge Request Status | ||||||||||||
Regression date | ||||||||||||
Regression introduced by commit | ||||||||||||
Regression level | ||||||||||||
Review Assigned To | caristu | |||||||||||
Support ticket | ||||||||||||
OBNetwork customer | ||||||||||||
Regression introduced in release | ||||||||||||
Summary | 0044131: Remove unneeded generic method in ImportedBaseOBObjectFetcher, it results in unchecked warning | |||||||||||
Description | The current definition of the ImportedBaseOBObjectFetcher.fetch method is the following: public <T extends BaseOBObject> T fetch(SynchronizableBusinessObject item); When implemented, an unchecked SuppressWarnings annotation needs to be added: ... @SuppressWarnings("unchecked") @Override public CharacteristicValue fetch(SynchronizableBusinessObject item) { ... But, when compiling and showing the unchecked errors, a warning is still being logged: CharacteristicValueBaseOBObjectFetcher.java:34: warning: [unchecked] fetch(SynchronizableBusinessObject) in CharacteristicValueBaseOBObjectFetcher implements <T>fetch(SynchronizableBusinessObject) in ImportedBaseOBObjectFetcher [javac] public CharacteristicValue fetch(SynchronizableBusinessObject item) { [javac] ^ [javac] return type requires unchecked conversion from CharacteristicValue to T [javac] where T is a type-variable: [javac] T extends BaseOBObject declared in method <T>fetch(SynchronizableBusinessObject) We can just make the fetch method not generic, since generics is not giving any extra value in that method. | |||||||||||
Steps To Reproduce | In an environment where the org.openbravo.service.external.integration is installed: - Create a class that extends the ImportedBaseOBObjectFetcher. A dummy one is enough, it is not going to be executed, we can focus on how it is compiled. - Notice that you need to add a @SuppressWarnings("unchecked") annotation, otherwise there will be an eclipse warning. - Apply the attached diff in the Openbravo root folder. It will show all the unchecked errors when compiling. - Run compile.complete.deploy and check that the warning described in the description is logged | |||||||||||
Proposed Solution | Replace this: public <T extends BaseOBObject> T fetch(SynchronizableBusinessObject item); With: public BaseOBObject fetch(SynchronizableBusinessObject item); | |||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | showUncheckedWarnings.dif (831) 2020-05-21 11:24 https://issues.openbravo.com/file_download.php?file_id=14513&type=bug | |||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2020-05-21 11:24 | AugustoMauch | New Issue | ||||||||||
2020-05-21 11:24 | AugustoMauch | Assigned To | => AugustoMauch | |||||||||
2020-05-21 11:24 | AugustoMauch | Status | new => scheduled | |||||||||
2020-05-21 11:24 | AugustoMauch | File Added: showUncheckedWarnings.dif | ||||||||||
2020-05-21 11:30 | hgbot | Checkin | ||||||||||
2020-05-21 11:30 | hgbot | Note Added: 0120116 | ||||||||||
2020-05-21 11:30 | hgbot | Status | scheduled => resolved | |||||||||
2020-05-21 11:30 | hgbot | Resolution | open => fixed | |||||||||
2020-05-21 11:30 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.service.external.integration/rev/03f304a8c9c16788a4b5b1ad5128c30cb9c5c350 [^] | |||||||||
2020-05-21 11:30 | AugustoMauch | Review Assigned To | => caristu | |||||||||
2020-05-21 11:36 | hgbot | Checkin | ||||||||||
2020-05-21 11:36 | hgbot | Note Added: 0120118 | ||||||||||
2020-05-21 11:54 | hgbot | Checkin | ||||||||||
2020-05-21 11:54 | hgbot | Note Added: 0120120 | ||||||||||
2020-05-21 11:56 | hgbot | Checkin | ||||||||||
2020-05-21 11:56 | hgbot | Note Added: 0120121 | ||||||||||
2020-05-21 16:16 | hgbot | Checkin | ||||||||||
2020-05-21 16:16 | hgbot | Note Added: 0120140 | ||||||||||
2020-05-21 16:17 | hgbot | Checkin | ||||||||||
2020-05-21 16:17 | hgbot | Note Added: 0120141 | ||||||||||
2020-05-21 16:20 | caristu | Status | resolved => new | |||||||||
2020-05-21 16:20 | caristu | Resolution | fixed => open | |||||||||
2020-05-21 16:21 | caristu | Note Added: 0120143 | ||||||||||
2022-07-22 11:25 | caristu | Assigned To | AugustoMauch => Triage Platform Conn | |||||||||
2022-07-22 11:25 | caristu | Status | new => acknowledged | |||||||||
2022-10-10 15:46 | caristu | Relationship added | related to 0050368 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|