Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036435
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Z. Othersminorhave not tried2017-07-06 13:282017-09-21 16:49
ReporteralostaleView Statuspublic 
Assigned Tomarkmm82 
PrioritynormalResolutionfixedFixed in Version3.0PR17Q4
StatusclosedFix in branchFixed in SCM revisionf47b0f799713
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toaferraz
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0036435: unlikely argument type warnings

DescriptionCompiling with ecj >= 3.13 (ie. using Eclipse Oxygen) some "unlikely argument" warnings can be found in code.
Steps To Reproduce1. Open openbravo with eclipse oxygen
2. Import standard openbravo preferences
3. Compile
  -> check warns:
# Eclipse Compiler for Java(TM) v20170516-1929, 3.13.0, Copyright IBM Corp 2000, 2015. All rights reserved.
----------
2. INFO in /home/alostale/ws/projects/license/openbravo/src/org/openbravo/common/datasource/StockReservationPickAndEditDataSource.java (at line 1682)
    if (orderline != null && !"".equals(orderline)) {
                                        ^^^^^^^^^
Unlikely argument type for equals(): OrderLine seems to be unrelated to String
----------
----------
3. WARNING in /home/alostale/ws/projects/license/openbravo/src/org/openbravo/costing/LCCostMatchFromInvoiceHandler.java (at line 200)
    localIl.getLandedCostCostList().remove(matchToRemove);
                                           ^^^^^^^^^^^^^
Unlikely argument type LCMatched for remove(Object) on a Collection<LandedCostCost>
----------
----------
4. INFO in /home/alostale/ws/projects/license/openbravo/src/org/openbravo/erpCommon/ad_forms/ProductInfo.java (at line 327)
    if (_qty == null || "".equals(_qty)) {
                                  ^^^^
Unlikely argument type for equals(): BigDecimal seems to be unrelated to String
----------
----------
5. INFO in /home/alostale/ws/projects/license/openbravo/src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java (at line 973)
    .equals(getAccountBPartner(bpartnerId, as, isReceipt, true, conn))) {
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Unlikely argument type for equals(): Account seems to be unrelated to String
----------
----------
6. INFO in /home/alostale/ws/projects/license/openbravo/src/org/openbravo/erpCommon/ad_callouts/SL_InOut_BPartner.java (at line 244)
    if ((!bpartner.equals(""))
                          ^^
Unlikely argument type for equals(): String seems to be unrelated to BusinessPartner
----------
----------
7. INFO in /home/alostale/ws/projects/license/openbravo/src/org/openbravo/erpCommon/ad_process/ConvertQuotationIntoOrder.java (at line 284)
    if (!"".equals(bdPriceList) && bdPriceList != null
                   ^^^^^^^^^^^
Unlikely argument type for equals(): BigDecimal seems to be unrelated to String
----------
8. INFO in /home/alostale/ws/projects/license/openbravo/src/org/openbravo/erpCommon/ad_process/ConvertQuotationIntoOrder.java (at line 297)
    if (!"".equals(bdPriceStd) && bdPriceStd != null
                   ^^^^^^^^^^
Unlikely argument type for equals(): BigDecimal seems to be unrelated to String
----------
----------
10. INFO in /home/alostale/ws/projects/license/openbravo/src-test/src/org/openbravo/test/costing/TestCosting.java (at line 13180)
    .equals(DOLLAR_ID)))))
            ^^^^^^^^^
Unlikely argument type for equals(): String seems to be unrelated to Currency
----------
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0036434 closedalostale Openbravo ERP unlikely argument type warnings 
related to defect 0036446 closedmarvintm Retail Modules New warnings have appeared in new version of Eclipse 
blocks feature request 0031477 newshuehner Openbravo ERP Tracking issue to reduce the huge number of eclipse warnings in pi 

-  Notes
(0098015)
hgbot (developer)
2017-07-11 13:00

Repository: erp/devel/pi
Changeset: f47b0f799713fba544a3c31c31e3ea8cc7824a35
Author: Mark <markmm82 <at> gmail.com>
Date: Mon Jul 10 12:15:53 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/f47b0f799713fba544a3c31c31e3ea8cc7824a35 [^]

Fixes issue 36435: Unlikely argument type warnings

StockReservationPickAndEditDataSource.java
- Fixed comparison between Empty String and OrderLine object.

LCCostMatchFromInvoiceHandler.java
- Remove the matchToRemove object from localIl.getLandedCostMatchedList() instead
  of localIl.getLandedCostCostList() list.

SL_InOut_BPartner.java
- Replaced two nested IFs for only one that includes all conditions of both of them.
- Used StringUtils methods to avoid NPE.

DocFINReconciliation.java
- Used StringUtils methods to avoid NPE.
- Created two new variables to store accounts required for processing, and avoid
  calculate them twice.

ProductInfo.java
- Removed comparison with Empty String, because it is not needed.

ConvertQuotationIntoOrder.java
- Removed comparison with Empty String, because it is not needed.
- Use BigDecimal.compareTo to compare two BigDecimal objects.

---
M src/org/openbravo/common/datasource/StockReservationPickAndEditDataSource.java
M src/org/openbravo/costing/LCCostMatchFromInvoiceHandler.java
M src/org/openbravo/erpCommon/ad_callouts/SL_InOut_BPartner.java
M src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java
M src/org/openbravo/erpCommon/ad_forms/ProductInfo.java
M src/org/openbravo/erpCommon/ad_process/ConvertQuotationIntoOrder.java
---
(0098016)
hgbot (developer)
2017-07-11 13:00

Repository: erp/devel/pi
Changeset: a99ac166135ba40d38b3bb57e582107ccc8c7320
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Jul 11 12:30:29 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a99ac166135ba40d38b3bb57e582107ccc8c7320 [^]

Related to issue 36435: Fix warning also in TestCosting.java

---
M src-test/src/org/openbravo/test/costing/TestCosting.java
M src/org/openbravo/costing/LCCostMatchFromInvoiceHandler.java
---
(0098017)
aferraz (manager)
2017-07-11 13:02

Code review OK
(0098235)
hgbot (developer)
2017-07-27 09:47

Repository: erp/pmods/org.openbravo.sepa.iso20022.credittransfer.customertobank
Changeset: b15e9f025867996fc7ecf240139923afc862ca91
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Jul 27 09:45:56 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.sepa.iso20022.credittransfer.customertobank/rev/b15e9f025867996fc7ecf240139923afc862ca91 [^]

Related to issue 36435: Unlikely argument type warnings

---
M src/org/openbravo/sepa/iso20022/credittransfer/customertobank/pain/x001/x001/x03/report/CreditTransfer.java
M src/org/openbravo/sepa/iso20022/credittransfer/customertobank/pain/x001/x001/x04/report/CreditTransfer.java
---
(0098236)
hgbot (developer)
2017-07-27 09:48

Repository: erp/pmods/org.openbravo.sepa.iso20022.coredirectdebit.customertobank
Changeset: 7b7d0998207fea11e11ecb1d8a384c7aa7d1739c
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Jul 27 09:44:49 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.sepa.iso20022.coredirectdebit.customertobank/rev/7b7d0998207fea11e11ecb1d8a384c7aa7d1739c [^]

Related to issue 36435: Unlikely argument type warnings

---
M src/org/openbravo/sepa/iso20022/coredirectdebit/customertobank/pain/x008/x001/x02/report/CoreDirectDebit.java
M src/org/openbravo/sepa/iso20022/coredirectdebit/customertobank/pain/x008/x001/x03/report/CoreDirectDebit.java
---
(0098237)
hgbot (developer)
2017-07-27 09:48

Repository: erp/mods/org.openbravo.module.taxreportlauncher
Changeset: ff83388c7aff45ef979491785aa7b9514db8b0a9
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Jul 27 09:41:23 2017 +0200
URL: http://code.openbravo.com/erp/mods/org.openbravo.module.taxreportlauncher/rev/ff83388c7aff45ef979491785aa7b9514db8b0a9 [^]

Related to issue 36435: Unlikely argument type warnings

---
M src/org/openbravo/module/taxreportlauncher/Utility/OBTL_Utility.java
---
(0098238)
hgbot (developer)
2017-07-27 09:49

Repository: erp/mods/org.openbravo.report.improved.balancesheet
Changeset: 30974158c773a5cf2976dffe852cf6631119d68a
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Jul 27 09:37:54 2017 +0200
URL: http://code.openbravo.com/erp/mods/org.openbravo.report.improved.balancesheet/rev/30974158c773a5cf2976dffe852cf6631119d68a [^]

Related to issue 36435: Unlikely argument type warnings

---
M src/org/openbravo/report/improved/balancesheet/ad_reports/GeneralAccountingReports.java
---
(0099269)
hudsonbot (developer)
2017-09-21 16:49

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/9750b78d3e5c [^]
Maturity status: Test
(0099270)
hudsonbot (developer)
2017-09-21 16:49

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/9750b78d3e5c [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-07-06 13:28 alostale New Issue
2017-07-06 13:28 alostale Assigned To => Triage Finance
2017-07-06 13:28 alostale Modules => Core
2017-07-06 13:28 alostale Triggers an Emergency Pack => No
2017-07-06 13:28 alostale Issue generated from 0036434
2017-07-06 13:28 alostale Relationship added related to 0036434
2017-07-06 13:31 alostale Relationship added blocks 0031477
2017-07-06 13:42 alostale Description Updated View Revisions
2017-07-06 16:39 vmromanos Assigned To Triage Finance => collazoandy4
2017-07-10 10:48 aferraz Assigned To collazoandy4 => markmm82
2017-07-10 15:39 markmm82 Status new => scheduled
2017-07-11 13:00 hgbot Checkin
2017-07-11 13:00 hgbot Note Added: 0098015
2017-07-11 13:00 hgbot Status scheduled => resolved
2017-07-11 13:00 hgbot Resolution open => fixed
2017-07-11 13:00 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f47b0f799713fba544a3c31c31e3ea8cc7824a35 [^]
2017-07-11 13:00 hgbot Checkin
2017-07-11 13:00 hgbot Note Added: 0098016
2017-07-11 13:02 aferraz Review Assigned To => aferraz
2017-07-11 13:02 aferraz Note Added: 0098017
2017-07-11 13:02 aferraz Status resolved => closed
2017-07-11 13:02 aferraz Fixed in Version => 3.0PR17Q4
2017-07-12 09:31 alostale Relationship added related to 0036446
2017-07-27 09:47 hgbot Checkin
2017-07-27 09:47 hgbot Note Added: 0098235
2017-07-27 09:48 hgbot Checkin
2017-07-27 09:48 hgbot Note Added: 0098236
2017-07-27 09:48 hgbot Checkin
2017-07-27 09:48 hgbot Note Added: 0098237
2017-07-27 09:49 hgbot Checkin
2017-07-27 09:49 hgbot Note Added: 0098238
2017-09-21 16:49 hudsonbot Checkin
2017-09-21 16:49 hudsonbot Note Added: 0099269
2017-09-21 16:49 hudsonbot Checkin
2017-09-21 16:49 hudsonbot Note Added: 0099270


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker