This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Since the JDK 5 enhanced for loop does not support a raw Iterator (or Enumeration), it is often convenient to have a wrapper which lets them be used in such loops. Very simple.
Created attachment 35767 [details] Proposed patch
Please review.
Planning for Monday. No comments?
My obvious comment is to put one of those methods into Enumerations class, but I am sure it is going to be rejected...
iterable(Enumeration) could go into Enumerations. On the other hand, this would separate it from iterable(Iterator) which it is clearly related to. Same tradeoff as for checkedEnumerationByFilter in the past - while it deals with Enumeration's, it's a direct analogue of non-Enumeration methods which are in NbCollections. I think it's slightly more natural to put it into NbCollections, but thanks for reminding me: I can put a @see into Enumerations as before, in case people go looking there first.
1.38 ant/nbproject/project.xml 1.31 ant/src-bridge/org/apache/tools/ant/module/bridge/impl/NbBuildLogger.java 1.37 core/startup/src/org/netbeans/core/startup/NbInstaller.java 1.11 openide/fs/nbproject/project.xml 1.10 openide/fs/src/org/openide/filesystems/AbstractFileSystem.java 1.20 openide/util/apichanges.xml 1.23 openide/util/nbproject/project.properties 1.7 openide/util/src/org/openide/util/Enumerations.java 1.21 openide/util/src/org/openide/util/NbBundle.java 1.5 openide/util/src/org/openide/util/NbCollections.java 1.4 openide/util/test/unit/src/org/openide/util/NbCollectionsTest.java