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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0002943
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Z. Othersminoralways2008-04-28 22:372008-06-12 09:43
Reporteruser71View Statuspublic 
Assigned Touser71 
PrioritynormalResolutionfixedFixed in Version2.40alpha-r2
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Merge Request Status
Review Assigned To
OBNetwork customerNo
Web browser
ModulesCore
Support ticket
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0002943: Code-Cleanup: explicit enumeration -> enhanced for-loops

DescriptionA 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.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(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 [^]

- Issue History
Date Modified Username Field Change


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker