2016-03-18 Andrew John Hughes * java/util/Collections.java: (EMPTY_SET): Suppress warnings generated by this legacy raw type. (EMPTY_LIST): Likewise. (EMPTY_MAP): Likewise. (compare(T, T, Comparator): Suppress warning generated by casting to Comparable. (binarySearch(List, Comparator)): Remove unneeded casts. (reverse(List)): Suppress warnings when casting to ListIterator. Cast is necessary as lists are modified. (reverseOrder(Comparator)): Return reverseOrder() rather than rcInstance. (reverseOrder()): Create appropriately typed ReverseComparator rather than using set instance. (rcInstance): Removed. (ReverseComparator.compare(T,T)): Suppress warnings from casting to Comparable. (rotate(List,int)): Suppress warnings when casting to List. Cast is necessary to modify list. (shuffle(List,Random)): Likewise. (disjoint(Collection,Collection)): Remove unnecessary casting. (sort(List,Comparator)): Suppress warnings when casting the returned array. Arrays of a generic type can not be created. (swap(List,int,int)): Suppress warnings when casting list to List. This is necessary to use the set method. (entrySet().SynchronizedMapEntry): Type should not have its own type parameters which hide those of the map. (entrySet().SynchronizedSet.iterator()): Remove type parameters from SynchronizedMapEntry creation. (UnmodifiableList.list): Retain input type parameter so as to avoid casting. (UnmodifiableList.UnmodifiableList): Remove cast. (UnmodifiableList.li): Retain input type parameter so as to avoid casting. (UnmodifiableListIterator(ListIterator)): Likewise. (UnmodifiableMap(Map)): Suppress warnings from casting down to Map. (UnmodifiableMap.entrySet()): Remove type parameters from UnmodifiableEntrySet creation. (UnmodifiableMap.UnmodifiableEntrySet): Remove type parameters and make instance-specific so we can use the UnmodifiableMap's type parameters. (UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableMapEntry): Likewise. (UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableMapEntry.e): Retain input type parameters so as to avoid casting. (UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableMapEntry.UnmodifiableMapEntry(Map.Entry)): Likewise. (UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableEntrySet(Set)): Likewise. (UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableIterator.next()): Remove type parameters from UnmodifiableMapEntry creation. (UnmodifiableMap.toArray()): Likewise and improve method structure. (UnmodifiableMap.toArray(S[])): Remove type parameters from UnmodifiableMapEntry and suppress warnings from casting array members. (UnmodifiableSortedMap.sm): Retain input type parameters so as to avoid casting. (UnmodifiableSortedMap.UnmodifiableSortedMap(SortedMap)): Remove cast. (CheckedList.addAll(int,Collection)): Replace iterator with for-each loop, removing the need for casting. (CheckedMap.entrySet()): Remove type parameters from CheckedEntrySet creation and klass argument. (CheckedMap.CheckedEntrySet): Don't create additional type parameters, use those of the containing map as a instance class, not a static class. (keyType): Type should be K to match enclosing CheckedMap. (valueType): Type should be V to match enclosing CheckedMap. (CheckedMap.CheckedEntrySet.CheckedEntrySet(Set,Class,Class)): Suppress warnings when casting Map.Entry class. (CheckedMap.CheckedEntrySet.iterator()): Make return type Map.Entry and create corresponding CheckedIterator instance. (CheckedMap.CheckedEntrySet.CheckedIterator.next()): Likewise with Map.Entry instance. (CheckedMap.CheckedEntrySet.CheckedIterator.Map.Entry.getKey()): Make return type K. (CheckedMap.CheckedEntrySet.CheckedIterator.Map.Entry.getValue()): Make return type V. (CheckedMap.CheckedEntrySet.CheckedIterator.Map.Entry.setValue(Object)): Likewise. (CheckedMap.putAll(Map)): Use for-each loop instead of Iterator, avoiding casting. 2016-01-04 Andrew John Hughes Cleanup warnings in gnu.xml.transform.* and gnu.xml.util.*. * gnu/xml/transform/AbstractNumberNode.java: (format(String,int[])): Add type parameters to lists and remove unnecessary casts. * gnu/xml/transform/ApplyTemplatesNode.java: Add type parameters to sortKeys and withParams. (ApplyTemplatesNode(Expr,QName,List,List,boolean)): Add type parameters to arguments. (clone(Stylesheet)): Add type parameters to lists and remove unnecessary casts. (doApply(Stylesheet,QName,Node,int,int,Node,Node)): Use a for-each loop rather than an Iterator. Remove unnecessary cast. (references(QName)): Likewise. * gnu/xml/transform/CallTemplateNode.java: Add type parameter to withParams. (CallTemplateNote(QName,List)): Add type parameters to List argument. (clone(Stylesheet)): Add type parameters to lists and remove unnecessary casts. (doApply(Stylesheet,QName,Node,int,int,Node,Node)): Use a for-each loop rather than an Iterator. Remove unnecessary cast. (references(QName)): Likewise. * gnu/xml/transform/CopyNode.java: (addAttributeSet(Stylesheet,QName,Node,int,int, Node,Node,String)): Replace Iterator usage with for-each loop. * gnu/xml/transform/CopyOfNode.java: (doApply(Stylesheet,QName,Node,int,int,Node,Node)): Likewise. Add type parameter to ns. * gnu/xml/transform/CurrentFunction.java: (evaluate(List)): Suppress warnings from method prescribed by javax.xml.xpath.XPathFunction. (setArguments(List)): Add type parameter to argument. * gnu/xml/transform/DocumentFunction.java: Add type parameters to args and values. (evaluate(List)): Suppress warnings from method prescribed by javax.xml.xpath.XPathFunction. (setArguments(List)): Add type parameter to argument. (evaluate(Node,int,int)): Add type arguments and remove unnecessary casts. Use a for-each loop rather than an Iterator. (document(String,String)): Add type parameters to return type and set creation. (clone(Object)): Add type parameter and remove unnecessary cast. (references(QName)): Likewise. * gnu/xml/transform/ElementAvailableFunction.java: Add type parameter to args, elements and in static initializer. (evaluate(List)): Suppress warnings from method prescribed by javax.xml.xpath.XPathFunction. (setArguments(List)): Add type parameter to argument. (evaluate(Node,int,int)): Remove unnecessary cast. (clone(Object)): Add type parameter and remove unnecessary cast. (references(QName)): Likewise. * gnu/xml/transform/ElementNode.java: Add type parameter to elementExcludeResultPrefixes. (EleemntNode(TemplateNode,TemplateNode,String,Node)): Add type parameters to collection creation. (addAttributeSet(Stylesheet,QName,Node,int,int, Node,Node,String)): Use a for-each loop rather than an Iterator. * gnu/xml/transform/FormatNumberFunction.java: Add type parameter to args. (evaluate(List)): Suppress warnings from method prescribed by javax.xml.xpath.XPathFunction. (setArguments(List)): Add type parameter to argument. (evaluate(Node,int,int)): Add type arguments and remove unnecessary casts. Use a for-each loop rather than an Iterator. (clone(Object)): Add type parameter and remove unnecessary cast. (references(QName)): Likewise. * gnu/xml/transform/FunctionAvailableFunction.java: Add type parameters to xsltFunctions, xpathFunctions and args and in static initializer. (evaluate(Node,int,int)): Remove unnecessary cast. (clone(Object)): Add type parameter and remove unnecessary cast. (references(QName)): Likewise. * gnu/xml/transform/GenerateIdFunction.java: Add type parameter to args. (evaluate(List)): Suppress warnings from method prescribed by javax.xml.xpath.XPathFunction. (setArguments(List)): Add type parameter to argument. (evaluate(Node,int,int)): Add type arguments and remove unnecessary casts. (clone(Object)): Add type parameter and remove unnecessary cast. (references(QName)): Likewise. * gnu/xml/transform/KeyFunction.java: Add type parameter to args. (evaluate(List)): Suppress warnings from method (setArguments(List)): Add type parameter to argument. (matches(Node)): Add type parameter. (evaluate(Node,int,int)): Add type arguments and remove unnecessary casts. Use a for-each loop rather than an Iterator. (addKeyNodes(Node,Collection,String,Collection)): Add type parameters. (addKeyNodesIfMatch(Node,Collection,String,Collection)): Likewise. Use a for-each loop rather than an Iterator. (clone(Object)): Add type parameter and remove unnecessary cast. (references(QName)): Likewise. * gnu/xml/transform/LiteralNode.java: Add type parameter to elementExcludeResultPrefixes. (LiteralNode(Node)): Add type parameters. * gnu/xml/transform/NamespaceProxy.java: (getPrefixes(String)): Add type parameter. * gnu/xml/transform/NodeNumberNode.java: (Stylesheet,Node,int,int): Add type parameters. Remove redundant casts. * gnu/xml/transform/SAXSerializer.java: Add type parameters to namespaces. (isDefined(String,String)): Add type parameters. Use a for-each loop rather than an Iterator. (define(String,String)): Likewise. Remove redundant cast. (undefine(String,String)): Add type parameters. Use a for-each loop rather than an Iterator. * gnu/xml/transform/StreamSerializer.java: Add type parameters to HTML_BOOLEAN_ATTRIBUTES, HTML_URIS, namespaces and cdataSectionElements. Use type parameter in the static initialiser. (StreamSerializer(int,String,String)): Add type parameter. (setCdataSectionElements(Collection)): Likewise. (isDefined(String,String)): Add type parameters. Use a for-each loop rather than an Iterator. Remove redundant cast. (pushNamespaceContext()): Add type parameters. (define(String,String)): Likewise. Remove redundant cast. (isHTMLBoolean(Attr,String)): Likewise. * gnu/xml/transform/SystemPropertyFunction.java: Add type parameter to args. (evaluate(List)): Suppress warnings from method prescribed by javax.xml.xpath.XPathFunction. (setArguments(List)): Add type parameter to argument. (evaluate(Node,int,int)): Add type parameters and remove unnecessary casts. (clone(Object)): Likewise. (references(QName)): Likewise. * gnu/xml/transform/Template.java: Implement Comparable