ClassPath: toString is not working correctly
-------------------------------------------- Key: OFBIZ-744 URL: https://issues.apache.org/jira/browse/OFBIZ-744 Project: OFBiz (The Open for Business Project) Issue Type: Bug Components: framework Affects Versions: SVN trunk Environment: SUSE Linux 10.1 & MySQL 5.0.18 Reporter: Michael Imhof Priority: Minor public String toString() { StringBuffer cp = new StringBuffer(1024); int cnt = _elements.size(); if (cnt >= 1) { cp.append(((File) (_elements.get(0))).getPath()); appendPath(cp, ((File) (_elements.get(0))).getPath()); } for (int i = 1; i < cnt; i++) { cp.append(File.pathSeparatorChar); appendPath(cp, ((File) (_elements.get(0))).getPath()); } return cp.toString(); } Solution: ======= Second appendPath should use counter i: appendPath(cp, ((File) (_elements.get(i))).getPath()); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/OFBIZ-744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Imhof updated OFBIZ-744: -------------------------------- Attachment: patch744.txt > ClassPath: toString is not working correctly > -------------------------------------------- > > Key: OFBIZ-744 > URL: https://issues.apache.org/jira/browse/OFBIZ-744 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: SUSE Linux 10.1 & MySQL 5.0.18 > Reporter: Michael Imhof > Priority: Minor > Attachments: patch744.txt > > > public String toString() { > StringBuffer cp = new StringBuffer(1024); > int cnt = _elements.size(); > if (cnt >= 1) { > cp.append(((File) (_elements.get(0))).getPath()); > appendPath(cp, ((File) (_elements.get(0))).getPath()); > } > for (int i = 1; i < cnt; i++) { > cp.append(File.pathSeparatorChar); > appendPath(cp, ((File) (_elements.get(0))).getPath()); > } > return cp.toString(); > } > Solution: > ======= > Second appendPath should use counter i: > appendPath(cp, ((File) (_elements.get(i))).getPath()); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacopo Cappellato reassigned OFBIZ-744: --------------------------------------- Assignee: Adam Heath Adam, am I wrong or do you have already recently fixed this issue? > ClassPath: toString is not working correctly > -------------------------------------------- > > Key: OFBIZ-744 > URL: https://issues.apache.org/jira/browse/OFBIZ-744 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: SUSE Linux 10.1 & MySQL 5.0.18 > Reporter: Michael Imhof > Assignee: Adam Heath > Priority: Minor > Attachments: patch744.txt > > > public String toString() { > StringBuffer cp = new StringBuffer(1024); > int cnt = _elements.size(); > if (cnt >= 1) { > cp.append(((File) (_elements.get(0))).getPath()); > appendPath(cp, ((File) (_elements.get(0))).getPath()); > } > for (int i = 1; i < cnt; i++) { > cp.append(File.pathSeparatorChar); > appendPath(cp, ((File) (_elements.get(0))).getPath()); > } > return cp.toString(); > } > Solution: > ======= > Second appendPath should use counter i: > appendPath(cp, ((File) (_elements.get(i))).getPath()); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adam Heath resolved OFBIZ-744. ------------------------------ Resolution: Fixed Fix Version/s: SVN trunk This was fixed in svn revision 585523. I found the bug while doing a code review, and wasn't aware that this bug had already been filed. > ClassPath: toString is not working correctly > -------------------------------------------- > > Key: OFBIZ-744 > URL: https://issues.apache.org/jira/browse/OFBIZ-744 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: SUSE Linux 10.1 & MySQL 5.0.18 > Reporter: Michael Imhof > Assignee: Adam Heath > Priority: Minor > Fix For: SVN trunk > > Attachments: patch744.txt > > > public String toString() { > StringBuffer cp = new StringBuffer(1024); > int cnt = _elements.size(); > if (cnt >= 1) { > cp.append(((File) (_elements.get(0))).getPath()); > appendPath(cp, ((File) (_elements.get(0))).getPath()); > } > for (int i = 1; i < cnt; i++) { > cp.append(File.pathSeparatorChar); > appendPath(cp, ((File) (_elements.get(0))).getPath()); > } > return cp.toString(); > } > Solution: > ======= > Second appendPath should use counter i: > appendPath(cp, ((File) (_elements.get(i))).getPath()); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacopo Cappellato closed OFBIZ-744. ----------------------------------- Thank you, Adam, is good to know that sometimes older Jira issues are addressed as well! > ClassPath: toString is not working correctly > -------------------------------------------- > > Key: OFBIZ-744 > URL: https://issues.apache.org/jira/browse/OFBIZ-744 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: SUSE Linux 10.1 & MySQL 5.0.18 > Reporter: Michael Imhof > Assignee: Adam Heath > Priority: Minor > Fix For: SVN trunk > > Attachments: patch744.txt > > > public String toString() { > StringBuffer cp = new StringBuffer(1024); > int cnt = _elements.size(); > if (cnt >= 1) { > cp.append(((File) (_elements.get(0))).getPath()); > appendPath(cp, ((File) (_elements.get(0))).getPath()); > } > for (int i = 1; i < cnt; i++) { > cp.append(File.pathSeparatorChar); > appendPath(cp, ((File) (_elements.get(0))).getPath()); > } > return cp.toString(); > } > Solution: > ======= > Second appendPath should use counter i: > appendPath(cp, ((File) (_elements.get(i))).getPath()); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |