Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0008502 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] 02. Master data management | trivial | always | 2009-04-08 12:30 | 2009-05-13 00:00 | |||
Reporter | cheli | View Status | public | |||||
Assigned To | shuehner | |||||||
Priority | normal | Resolution | no change required | Fixed in Version | ||||
Status | closed | Fix in branch | pi | Fixed in SCM revision | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Linux 32 bit | Database | Oracle | Java version | 1.6 | |||
OS Version | Debian Gnu Linux | Database version | 11g | Ant version | 1.7 | |||
Product Version | 2.40MP1 | SCM revision | ||||||
Review Assigned To | ||||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0008502: Code errors in SE_Order_BPartner.java file | |||||||
Description | I was trying to upgrade from 2.40mp1 to 2.40mp3 and I found some odd things, then I have checked the mp3 source file and I found this: Line 81: if (data!=null && data.length>0) { strDeliveryRule = data[0].deliveryrule.equals("")?strDeliveryRule0:data[0].deliveryrule; strUserRep = SEOrderBPartnerData.userIdSalesRep(this, data[0].salesrepId); strUserRep = strUserRep.equals("")?strUserRep0:strUserRep; strPaymentrule = (strIsSOTrx.equals("Y")?data[0].paymentrule: data[0].paymentrulepo); strPaymentrule = strPaymentrule.equals("")?strPaymentrule0:strPaymentrule; strPaymentterm = (strIsSOTrx.equals("Y")?data[0].cPaymenttermId: data[0].poPaymenttermId); strPaymentterm = strPaymentterm.equals("")?strPaymentterm0:strPaymentterm; strInvoiceRule = data[0].invoicerule.equals("")?strInvoiceRule0:data[0].invoicerule; strPriceList = (strIsSOTrx.equals("Y")?data[0].mPricelistId: data[0].poPricelistId); strPriceList = strPriceList.equals("")?strPriceList0:strPriceList; } it makes no sense to make assignments twice for the same variable. | |||||||
Proposed Solution | Leave only last assignment for each variable. | |||||||
Tags | Clean-up, tictech | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Notes | |
(0015284) cheli (reporter) 2009-04-08 14:57 |
Ok you compare if the first assignment returns 0 length string. strUserRep = SEOrderBPartnerData.userIdSalesRep(this, data[0].salesrepId); strUserRep = strUserRep.equals("")?strUserRep0:strUserRep; |
(0016286) shuehner (administrator) 2009-05-12 10:12 |
cheli: do you have any further info that there is a possible bug/problem? As like you said the two lines together only select one of three values. If not i would like to reject this as not an issue.. |
(0016287) shuehner (administrator) 2009-05-12 11:02 |
Reasking last notes' question via the feedback state: do you have any further info that there is a possible bug/problem? As like you said the two lines together only select one of three values. If not i would like to reject this as not an issue.. |
(0016289) cheli (reporter) 2009-05-12 11:13 |
Hi Shuehner, perhaps the code is not as elegant as it could be but the answear is no, it has not got any bug/problem. You can reject this issue. Thanks. |
(0016292) shuehner (administrator) 2009-05-12 11:46 |
After discussion with reporter no change required as the code question does have a purpose and is not a programming mistake. |
Issue History | |||
Date Modified | Username | Field | Change |
2009-04-08 12:30 | cheli | New Issue | |
2009-04-08 12:30 | cheli | Assigned To | => rafaroda |
2009-04-08 12:31 | cheli | Tag Attached: tictech | |
2009-04-08 12:42 | rafaroda | Tag Attached: Clean-up | |
2009-04-08 14:57 | cheli | Note Added: 0015284 | |
2009-04-22 18:43 | psarobe | Status | new => scheduled |
2009-04-22 18:43 | psarobe | fix_in_branch | => pi |
2009-04-23 12:03 | rafaroda | Assigned To | rafaroda => shuehner |
2009-05-12 10:12 | shuehner | Note Added: 0016286 | |
2009-05-12 11:02 | shuehner | Note Added: 0016287 | |
2009-05-12 11:02 | shuehner | Status | scheduled => feedback |
2009-05-12 11:13 | cheli | Note Added: 0016289 | |
2009-05-12 11:46 | shuehner | Regression testing | => No |
2009-05-12 11:46 | shuehner | Status | feedback => closed |
2009-05-12 11:46 | shuehner | Note Added: 0016292 | |
2009-05-12 11:46 | shuehner | Resolution | open => no change required |
2009-05-13 00:00 | anonymous | sf_bug_id | 0 => 2790912 |
Copyright © 2000 - 2009 MantisBT Group |