Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0002943 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] Z. Others | minor | always | 2008-04-28 22:37 | 2008-06-12 09:43 | |||
Reporter | user71 | View Status | public | |||||
Assigned To | user71 | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 2.40alpha-r2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | ||||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0002943: Code-Cleanup: explicit enumeration -> enhanced for-loops | |||||||
Description | A lot of code uses explicit Enumerations to iterate of i.e. the elements of a Vector. This could be converted to enhanced for-loops as they are shorter and easier to read. Example for iterating over String stored in a vector: Instead of: for (Enumeration<String> e = report.xmlDocument. xmlTemplate.configuration.hashtable.vecKeys. elements();e.hasMoreElements() ;) { String id = e.nextElement(); Use: for (String id : report.xmlDocument. xmlTemplate.configuration.hashtable.vecKeys) { The enhanced-for loops are functionwise identical but a lot shorter. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0003645) user71 2008-04-28 22:46 edited on: 2008-06-12 09:26 |
Logged In: YES user_id=418007 Originator: YES In revision r3876 at lot of the explicit Enumeration usage is converted for ehanced for-loops. The remaining ones iterate of untyped or <Object> Collections and are not converted. |
(0006532) user71 2005-06-01 00:00 edited on: 2008-06-12 09:43 |
This bug was originally reported in SourceForge bug tracker and then migrated to Mantis. You can see the original bug report in: https://sourceforge.net/support/tracker.php?aid=1953658 [^] |
Copyright © 2000 - 2009 MantisBT Group |