Update of
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/typehandler
In directory james.mmbase.org:/tmp/cvs-serv650
Modified Files:
NodeHandler.java
Log Message:
Generics
See also:
http://cvs.mmbase.org/viewcvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/typehandler
Index: NodeHandler.java
===================================================================
RCS file:
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/typehandler/NodeHandler.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- NodeHandler.java 12 Jan 2009 12:48:20 -0000 1.40
+++ NodeHandler.java 17 Feb 2009 11:07:37 -0000 1.41
@@ -33,7 +33,7 @@
* @author Gerard van de Looi
* @author Michiel Meeuwissen
* @since MMBase-1.6
- * @version $Id: NodeHandler.java,v 1.40 2009/01/12 12:48:20 michiel Exp $
+ * @version $Id: NodeHandler.java,v 1.41 2009/02/17 11:07:37 michiel Exp $
*/
public class NodeHandler extends AbstractTypeHandler {
@@ -48,10 +48,8 @@
super(tag);
}
- protected class IgnoreCaseComparator implements Comparator {
- public int compare(Object o1, Object o2) {
- String s1 = (String)o1;
- String s2 = (String)o2;
+ protected class IgnoreCaseComparator implements Comparator<String> {
+ public int compare(String s1, String s2) {
return s1.toUpperCase().compareTo(s2.toUpperCase());
}
}
@@ -110,7 +108,7 @@
NodeIterator nodes =
tag.getCloudVar().getNodeManager(field.getGUIType()).getList(null, null,
null).nodeIterator();
- SortedMap sortedGUIs = new TreeMap(new IgnoreCaseComparator());
+ SortedMap<String, String> sortedGUIs = new TreeMap<String,
String>(new IgnoreCaseComparator());
// If this is the 'builder' field of the reldef builder, we need
to filter
// as we are only interested in insrel-derived builders.
@@ -126,10 +124,7 @@
sortedGUIs.put(n.getFunctionValue("gui", args).toString(),
"" + n.getNumber());
}
}
- Iterator i = sortedGUIs.entrySet().iterator();
- while(i.hasNext()) {
- Map.Entry gui = (Map.Entry) i.next();
-
+ for (Map.Entry<String, String> gui : sortedGUIs.entrySet()) {
// we have a match on the number!
buffer.append(" <option ");
if(gui.getValue().equals(value)) {
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs