I have some files changed, and I doubt to commit or not. I started
changing Dictionary to Map, because Dictionary has a few problems:
- it is an abstract class, but not comprehensive enough for what I
needed. (it lacks methods like putAll(Map) )
- casting it to Hashtable defeats all the purpose of its use.
Map is java2. Now we are requesting java2, and turbine also. Map is an
interface, and it has more complete abstraction.
I started changes in PortletConfig, and they went to Config, and then to
other files.
Once I started to change, the changes propagated to about 20 files. If I
commit, maybe some user code will need to be changed too.
The way to change is simple:
(change imports if you do not import java.util.*)
Dictionary --> Map
Dictionary a = new Hashtable() ---> Map a = new Hastable()
Enumeration en = x.elements() --> Iterator en = x.values().iterator()
Enumeration en = x.keys() ---> Iterator en = x.keySet().iterator()
Enumeration.hasMoreElements() ---> Iterator.hasNext()
Enumeration.nextElement() ---> Iterator.next()
Do you think I should commit?
There are still plenty of Dictionaries used everywhere, and changing is
tricky, as you have to change clases inheriting or using them.
Note: after commit, it should probably be needed a build.sh clean, as
interfaces do change.
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/[email protected]/>
List Help?: [EMAIL PROTECTED]