summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup warnings in java.util.Collections.HEADmasterAndrew John Hughes2016-03-182-81/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2016-03-18 Andrew John Hughes <gnu_andrew@member.fsf.org> Cleanup warnings in java.util.Collections. * 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<Object>. 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<T>. (rotate(List,int)): Suppress warnings when casting to List<Object>. 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<Object>. 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<K,V>. (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<K,V> 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.
* Merge branch 'master' of ↵Andrew John Hughes2016-02-160-0/+0
|\ | | | | | | ssh://casa.fuseyism.com/home/andrew/projects/classpath/classpath
| * Merge branch 'master' of ../classpathAndrew John Hughes2015-10-148-3/+1562
| |\ | | | | | | | | | | | | Conflicts: ChangeLog
| * | Make gjdoc depend on CREATE_WRAPPERS and remove unneeded Automake 1.11 ↵Andrew John Hughes2015-08-203-18/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dependencies. 2015-08-07 Uros Bizjak <ubizjak@gmail.com> * configure.ac: (tools/gjdoc): Depend on CREATE_WRAPPERS. * tools/Makefile.am: Remove unneeded dependencies for Automake 1.11.
| * | Revert undocumented changes accidentally included with last commit.Andrew John Hughes2015-08-1317-351/+165
| | |
* | | Make gjdoc depend on CREATE_WRAPPERS and remove unneeded Automake 1.11 ↵Andrew John Hughes2016-02-163-18/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dependencies. 2015-08-07 Uros Bizjak <ubizjak@gmail.com> * configure.ac: (tools/gjdoc): Depend on CREATE_WRAPPERS. * tools/Makefile.am: Remove unneeded dependencies for Automake 1.11.
* | | Revert undocumented changes accidentally included with last commit.Andrew John Hughes2016-02-1617-351/+165
| | |
* | | Cleanup warnings in gnu.xml.transform.* and gnu.xml.util.*.Andrew John Hughes2016-02-1632-323/+554
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2016-01-04 Andrew John Hughes <gnu_andrew@member.fsf.org> 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<Template>. (compareTo(Template)): Update type of argument from Object to Template, and remove unnecessary check/cast. * gnu/xml/transform/TransformerFactoryImpl.java: (getAssociatedStylesheet(Source,String,String,String)): Add type parameters and remove unnecessary cast. Use a for-each loop rather than an Iterator. (parseParameters(String)): Add type parameters. * gnu/xml/transform/TransformerImpl.java: (transform(Source,Result)): Add type parameters. (writeStreamResult(Node,StreamResult,int,String)): Likewise. (reindent(Document,Node,int)): Likewise and remove unnecessary casts. (convertCdataSectionElements(Document,Node,List)): Likewise. * gnu/xml/transform/TransformerOutputProperties.java: (TransformerOutputProperties(Stylesheet)): Add type parameters and remove redundant casts. (apply()): Add type parameter. * gnu/xml/transform/UnparsedEntityUriFunction.java: (evaluate(List)): Suppress warnings from method prescribed by javax.xml.xpath.XPathFunction. * gnu/xml/transform/ValueOfNode.java: (doApply(Stylesheet,QNae,Node,int,int,Node,Node)): Avoid unchecked cast by retrieving objects and then casting them to Node after instanceof test. * gnu/xml/transform/XSLComparator.java: Remove unneeded Iterator import. * gnu/xml/util/DomParser.java: (callEnd(Node)): Add type parameter. * gnu/xml/util/Resolver.java: Replace untyped Dictionary with typed Map. (addDirectoryMapping(Map,String,File)): Likewise. (Resolver(Map)): Likewise. (resolveEntity(String,String)): Remove redundant cast. * gnu/xml/util/SAXNullTransformerFactory.java: Add type parameters to params. * gnu/xml/util/XCat.java: (normalizePublicId(boolean,String)): Remove unused variable token. (Catalog): Add type parameters to publicIds, publicDelegations, systemIds, systemRewrites, systemDelegations, uris, uriRewrites, uriDelegations, doctypes and next. (Catalog.mapURI(String,Hashtable,Hashtable,Hashtable)): Add type parameters and remove redundant casts. (Catalog.getExternalSubset(String)): Remove redundant cast. (Catalog.checkDelegations(Hashtable,String,String,String)): Add type parameters and remove redundant casts. (Loader): Add type parameteres to externals & bases. (Loader.absolutize(String)): Remove redundant cast. (Loader.startDocument()): Add type parameter. (Loader.externalEntityDecl(String,String,String)): Likewise. (Loader.startEntity(String)): Remove redundant cast. (Loader.endEntity(String)): Likewise. (Loader.startElement(String,String,String,Attributes)): Remove redundant casts and add type parameters. * gnu/xml/util/XMLWriter.java: Add type parameter to space. (startElement(String,String,String,Attributes): Remove redundant cast.
* | | Add remaining javax.lang.model.util classes for Java 7.Andrew John Hughes2015-12-2216-13/+1001
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2015-11-26 Andrew John Hughes <gnu_andrew@member.fsf.org> * javax/lang/model/util/AbstractAnnotationValueVisitor6.java: Fix missing brace in Javadoc. * javax/lang/model/util/AbstractAnnotationValueVisitor7.java: New abstract class. (AbstractAnnotationValueVisitor7()): Implemented. * javax/lang/model/util/AbstractElementVisitor7.java, New abstract class. (AbstractElementVisitor7()): Implemented. * javax/lang/model/util/AbstractTypeVisitor6.java: Fix missing brace in Javadoc. * javax/lang/model/util/AbstractTypeVisitor7.java: New abstract class. (AbstractTypeVisitor7()): Implemented. (visitUnion(UnionType,P)): Likewise. * javax/lang/model/util/ElementKindVisitor6.java: (visitVariableAsResourceVariable(VariableElement,P)): Should call visitUnknown for version 6. * javax/lang/model/util/ElementKindVisitor7.java: New class. (ElementKindVisitor7()): Implemented. (ElementKindVisitor7(R)): Likewise. (visitVariableAsResourceVariable(VariableElement,P)): Implemented to return the result of defaultAction. * javax/lang/model/util/ElementScanner6.java: Fix missing brace in Javadoc. Add missing @return documentation. (visitVariable(VariableElement,P)): Should call visitUnknown on 6 if the element is a resource variable element. * javax/lang/model/util/ElementScanner7.java, New class. (ElementScanner7()): Implemented. (ElementScanner7(R)): Likewise. (visitVariable(VariableElement,P)): Implemented. * javax/lang/model/util/SimpleAnnotationValueVisitor7.java: New class. (SimpleAnnotationValueVisitor7()): Implemented. (SimpleAnnotationValueVisitor7(R)): Likewise. * javax/lang/model/util/SimpleElementVisitor6.java: (visitVariable(VariableElement,P)): Should call visitUnknown on 6 if the element is a resource variable element. * javax/lang/model/util/SimpleElementVisitor7.java: New class. (SimpleElementVisitor7()): Implemented. (SimpleElementVisitor7(R)): Likewise. (visitVariable(VariableElement,P)): Implemented. * javax/lang/model/util/SimpleTypeVisitor6.java: (SimpleTypeVisitor6): Fix copy-and-paste error in documentation. * javax/lang/model/util/SimpleTypeVisitor7.java: New class. (SimpleTypeVisitor7()): Implemented. (SimpleTypeVisitor7(R)): Likewise. (visitUnion(UnionType,P)): Implemented. * javax/lang/model/util/TypeKindVisitor7.java, New class. (TypeKindVisitor7()): Implemented. (TypeKindVisitor7(R)): Likewise. (visitUnion(UnionType,P)): Implemented. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* | Add remaining javax.lang.model.util classes for Java 6.Andrew John Hughes2015-09-268-3/+1562
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2015-09-26 Andrew John Hughes <gnu_andrew@member.fsf.org> * javax/lang/model/type/WildcardType.java: Remove unneeded import. * javax/lang/model/util/AbstractTypeVisitor6.java: Implemented. (AbstractTypeVisitor6()): Implemented. (visit(TypeMirror)): Likewise. (visit(TypeMirror,P)): Likewise. (visitUnknown(TypeMirror, P)): Likewise. (visitUnion(TypeMirror, P)): Likewise. * javax/lang/model/util/ElementKindVisitor6.java: Implemented. (ElementKindVisitor6): Implemented. (ElementKindVisitor6(R)): Likewise. (visitExecutable(ExecutableElement,P)): Likewise. (visitExecutableAsConstructor(ExecutableElement,P)): Likewise. (visitExecutableAsInstanceInit(ExecutableElement,P)): Likewise. (visitExecutableAsMethod(ExecutableElement,P)): Likewise. (visitExecutableAsStaticInit(ExecutableElement,P)): Likewise. (visitPackage(PackageElement,P)): Likewise. (visitTypeAsAnnotationType(TypeElement,P)): Likewise. (visitTypeAsClass(TypeElement,P)): Likewise. (visitTypeAsEnum(TypeElement,P)): Likewise. (visitTypeAsInterface(TypeElement,P)): Likewise. (visitTypeParameter(TypeParameterElement,P)): Likewise. (visitVariable(VariableElement,P)): Likewise. (visitVariableAsEnumConstant(VariableElement,P)): Likewise. (visitVariableAsExceptionParameter(VariableElement,P)): Likewise. (visitVariableAsField(VariableElement,P)): Likewise. (visitVariableAsLocalVariable(VariableElement,P)): Likewise. (visitVariableAsParameter(VariableElement,P)): Likewise. (visitVariableAsResourceVariable(VariableElement,P)): Likewise. * javax/lang/model/util/SimpleAnnotationValueVisitor6.java: (DEFAULT_VALUE): Added. (SimpleAnnotationValueVisitor6()): Implemented. (SimpleAnnotationValueVisitor6(R)): Likewise. (defaultAction(Object,P)): Likewise. (visitBoolean(boolean,P)): Likewise. (visitByte(byte,P)): Likewise. (visitChar(char,P)): Likewise. (visitDouble(double,P)): Likewise. (visitFloat(float,P)): Likewise. (visitInt(int,P)): Likewise. (visitLong(long,P)): Likewise. (visitShort(short,P)): Likewise. (visitString(String,P)): Likewise. (visitType(TypeMirror,P)): Likewise. (visitEnumConstant(VariableElement,P)): Likewise. (visitAnnotation(AnnotationMirror,P)): Likewise. (visitArray(List,P)): Likewise. * javax/lang/model/util/SimpleElementVisitor6.java: Fix missing brace in Javadoc. Add missing @return documentation. * javax/lang/model/util/SimpleTypeVisitor6.java: (DEFAULT_VALUE): Added. (SimpleTypeVisitor6()): Implemented. (SimpleTypeVisitor6(R)): Likewise. (defaultAction(TypeMirror,P)): Likewise. (visitPrimitive(PrimitiveType,P)): Likewise. (visitNull(NullType,P)): Likewise. (visitArray(ArrayType,P)): Likewise. (visitDeclared(DeclaredType,P)): Likewise. (visitError(ErrorType,P)): Likewise. (visitTypeVariable(TypeVariable,P)): Likewise. (visitWildcard(WildcardType,P)): Likewise. (visitExecutable(ExecutableType,P)): Likewise. (visitNoType(NoType,P)): Likewise. * javax/lang/model/util/TypeKindVisitor6.java: (TypeKindVisitor6()): Implemented. (TypeKindVisitor6(R)): Likewise. (visitNoType(NoType,P)): Likewise. (visitNoTypeAsNone(NoType,P)): Likewise. (visitNoTypeAsPackage(NoType,P)): Likewise. (visitNoTypeAsVoid(NoType,P)): Likewise. (visitPrimitive(PrimitiveType,P)): Likewise. (visitPrimitiveAsBoolean(PrimitiveType,P)): Likewise. (visitPrimitiveAsByte(PrimitiveType,P)): Likewise. (visitPrimitiveAsChar(PrimitiveType,P)): Likewise. (visitPrimitiveAsDouble(PrimitiveType,P)): Likewise. (visitPrimitiveAsFloat(PrimitiveType,P)): Likewise. (visitPrimitiveAsint(PrimitiveType,P)): Likewise. (visitPrimitiveAsLong(PrimitiveType,P)): Likewise. (visitPrimitiveAsShort(PrimitiveType,P)): Likewise.
* Mention PR66376.Andrew John Hughes2015-06-1919-165/+356
| | | | | | 2015-06-19 Andrew John Hughes <gnu_andrew@member.fsf.org> * NEWS: Mention PR66376.
* Cleanup warnings in XML parser.Andrew John Hughes2015-04-224-378/+806
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2015-04-18 Andrew John Hughes <gnu_andrew@member.fsf.org> * gnu/xml/stream/SAXParser.java: (getParser()): Add @Override. (getXMLReader()): Likewise. (isNamespaceAware()): Likewise. (isValidating()): Likewise. (setProperty(String,Object): Likewise. (getProperty(String)): Likewise. (isXIncludeAware()): Likewise. (reset()): Likewise. (getFeature(String)): Likewise. (setFeature(String,boolean)): Likewise. (setEntityResolver(EntityResolver)): Likewise. (getEntityResolver()): Likewise. (setDTDHandler(DTDHandler)): Likewise. (getDTDHandler()): Likewise. (setContentHandler(ContentHandler)): Likewise. (getContentHandler()): Likewise. (setErrorHandler(ErrorHandler)): Likewise. (getErrorHandler()): Likewise. (parse(InputSource)): Likewise. Add type parameters to collection usage. Add default cases in switch statements. Check in is not null before attempting to call close(). Remove superfluous else block. (isIgnorableWhitespace(XMLParser,char,boolean)): Remove exception declaration which is never thrown. Rename 'reader' to 'r' to avoid shadowing. Fix ContentModel type reference to refer to new enum. (parse(String)): Add @Override. (getIndex(String)): Likewise. (getIndex(String,String)): Likewise. (getLength()): Likewise. (getLocalName(int)): Likewise. (getQName(int)): Likewise. (getType(int)): Likewise. (getType(String)): Likewise. (getType(String,String)): Likewise. (getURI(int)): Likewise. (getValue(int)): Likewise. (getValue(String)): Likewise. (getValue(String,String)): Likewise. (isDeclared(int)): Likewise. (isDeclared(String)): Likewise. (isDeclared(Stirng,String)): Likewise. (isSpecified(int)): Likewise. (isSpecified(String)): Likewise. (isSpecified(String,String)): Likewise. (getColumnNumber()): Likewise. (getLineNumber()): Likewise. (getPublicId()): Likewise. (getSystemId()): Likewise. (getEncoding()): Likewise. (getXMLVersion()): Likewise. (resolveEntity(String,String,String,String)): Likewise. Avoid shadowing of baseURI. (resolveAsXMLEventReader(String)): Remove unused method (resolveAsXMLStreamReader(String)): Likewise. (report(String,String,Object,Location)): Add @Override. (main(String[])): Add type parameter to Class instance. * gnu/xml/stream/XMLParser.java: Add type parameters to all collection class instances and use interfaces as types rather than specific implementations. Switch from StringBuffer to StringBuilder for internal string buffering. (XMLParser(InputStream, String, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, XMLReporter, XMLResolver)): Add type parameters to collection initialisation. (XMLParser(Reader, String, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, XMLReporter, XMLResolver)): Likewise. (getNamespaceURI(String)): Add @Override and type parameters. (getPrefix(String)): Likewise. (getPrefixes(String)): Likewise. (close()): Add @Override. (getNamespaceContext()): Likewise. (getAttributeCount()): Likewise. (getAttributeLocalName(int)): Likewise and remove unneeded casting and variable creation. (getAttributeNamespace(int)): Add @Override and remove unneeded variable creation. (getAttributePrefix(int)): Add @Override and remove unneeded casting and variable creation. (getAttributeName(int)): Add @Override and remove unneeded casting. (getAttributeType(int)): Add @Override and remove unneeded casting and variable creation. (getAttributeValue(int)): Likewise. (getAttributeValue(String,String)): Add @Override. Add for-each loop and remove unneeded casting. (getCharacterEncodingScheme()): Add @Override. (getElementText()): Likewise. Add Location instance to XMLStreamException being thrown. Handle other values of XMLStreamConstants as specified in method specification. (getEncoding()): Add @Override. (getEventType()): Likewise. (getLocalName()): Likewise. (getLocation()): Likewise. (getName()): Likewise. (getNamespaceCount()): Likewise. Avoid use of isEmpty() so Deque interface can be used for namespaces. Avoid superfluous variable creation. (getNamespacePrefix(int)): Add @Override and remove redundant casting. (getNamespaceURI()): Add @Override. (getNamespaceURI(int)): Likewise. Remove redundant casting. (getPIData()): Add @Override. (getPITarget()): Likewise. (getPrefix()): Likewise. (getProperty(String)): Likewise. (getText()): Likewise. (getTextCharacters()): Likewise. (getTextCharacters(int,char[],int,int)): Likewise. (getTextLength()): Likewise. (getTextStart()): Likewise. (getVersion(): Likewise. (hasName()): Likewise. (hasText()): Likewise. (isAttributeSpecified(int)): Likewise. Avoid redundant casting and variable creation. (isCharacters()): Add @Override. (isEndElement()): Likewise. (isStandalone()): Likewise. (isStartElement()): Likewise. (isWhiteSpace()): Likewise. (nextTag()): Likewise. (require(int,String,String)): Likewise. (standaloneSet()): Likewise. (hasNext()): Likewise. (next()): Likewise. Avoid use of isEmpty() so Deque interface can be used for namespaces) bases, startEntityStack, endEntityStack and stack. Avoid unnecessary casting. (getCurrentElement()): Remove redundant cast. (getXMLBase()): Avoid unnecessary casting and use for-each loops. (pushInput(String,String,boolean,boolean)): Likewise and drop IOException as one is not thrown. (pushInput(String,ExternalIds,boolean,boolean)): Rename ids to exIDs to avoid shadowing. Use for-each loop and avoid unnecessary casting. (pushInput(Input)): Rename input to in to avoid shadowing. (popInput()): Remove unnecessary casting. (readTextDecl()): Remove redundant cast. (readDoctypeDecl()): Rename ids to exIDs to avoid shadowing. Remove redundant else block. (readMarkupDecl(boolean)): Add default case to switch statement. (readElements(CPStringBuilder)): Mark fall-through in a way the compiler can interpret. (readAttDef(String)): Use for-each loops and interfaces for collection types. Add type parameters and remove redundant casts. (readAttType(CPStringBuilder,Set)): Use Set with type parameter instead of raw HashSet. Remove redundant else block. (readEnumeration(boolean,CPStringBuilder,Set)): Use Set with type parameter rather than raw HashSet. (readNotationType(CPStringBuilder,Set)): Likewise. (readDefault(String,String,String,String,Set)): Likewise. Remove unused defaultType variable. (readEntityDecl(boolean)): Rename ids to exIDs to avoid shadowing. (readNotationDecl(boolean)): Likewise. (readExternalIds(boolean,boolean)): Likewise. (readStartElement()): Add type parameters and for-each loops, removing redundant casts. Add default cases to switch statements. (attributeSpecified(String)): Use for-each loop and avoid redundant casts. (readAttribute(String)): Suppress warning about null pointer as an exception is thrown via the error method. Use interface types and type parameters for collections. (addNamespace(Attribute)): Use interface types and type parameters for collections. (readEndElement()): Remove redundant cast. (endElementValidationHook()): Avoid isEmpty() method so Deque interface can be used for stack. Remove redundant cast. (readCharData(String)): Avoid redundant cast. (expandEntity(String,boolean,boolean)): Rename ids to exIDs to avoid shadowing. (literalReadCh(boolean)): Avoid redundant cast. (readLiteral(int,boolean)): Likewise. (normalize(StringBuilder)): Make static and use StringBuilder rather than StringBuffer. Rename buf to buffer to avoid shadowing. (normalizeCRLF(StringBuilder)): Likewise. (expandPEReference()): Call readNmtoken with StringBuilder, not StringBuffer. (readNmtoken(boolean,StringBuilder)): Use StringBuilder rather than StringBuffer. Rename buf to buffer to avoid shadowing. (isNameStartCharacter(int,boolean)): Remove unneeded else block. (isNameCharacter(int,boolean)): Likewise. (intern(String)): Make package-private to allow access from inner class. (error(String)): Make static. (error(String,Object)): Likewise. Avoid unnecessary cast to Character as toString is available from Object. (validateStartElement(String)): Remove unneeded prefix from constants now they are part of an enum. Drop unneeded cast. Add default case to switch statement. (validateEndElement()): Likewise. (validatePCData(String)): Remove unneeded prefix from constants now they are part of an enum. Add default case to switch statement. (validateElementContent(ElementContentModel, List)): Use interface type with parameter for collection. Rename buf to buffer to avoid shadowing. Add type parameters. (createRegularExpression(ElementContentModel)): Rename buf to buffer to avoid shadowing. Use type parameters and avoid redundant casting. (validateDoctype()): Add type parameters and avoid redundant casting. Rename ids to exIDs to avoid shadowing. (Attribute.equals(Object)): Add @Override. Use isNamespaceAware() and isXML11() rather than trying to access private variables of outer class. Remove redundant else block. (Attribute.hashCode()): Implemented to match equals method. (Attribute.toString()): Add @Override. Rename buf to buffer to avoid shadowing. (Doctype): Rename externalEntities to externalEntitiesSet to avoid shadowing. (Doctype.addElementDecl(String,String,ContentModel)): Use getInputSize() rather than trying to access private variables of outer class. (Doctype.addAttributeDecl(String,String,AttributeDecl)): Add type parameters and remove redundant casts. (Doctype.addEntityDecl(String,ExternalIds,boolean)): Rename ids to exIDs to avoid shadowing. (Doctype.addNotationDecl(String,ExternalIds,boolean)): Likewise. (Doctype.getElementModel(String)): Remove redundant cast. (Doctype.getAttributeDecl(String,String)): Add type parameters and remove redundant casts. (Doctype.isAttributeDeclared(String,String)): Likewise. (Doctype.attlistIterator(String)): Likewise. (Doctype.entityIterator()): Add type parameter. (Doctype.getNotation(String)): Remove redundant cast. (Doctype.getComment(String)): Likewise. (Doctype.getPI(String)): Likewise. (Doctype.entryIterator()): Add type parameter. (ContentModel): Make static. (ContentModel.EMPTY): Removed. (ContentModel.ANY): Likewise. (ContentModel.ELEMENT): Likewise. (ContentModel.MIXED): Likewise. (ContentModel.Type): Introduce enum type with values EMPTY, ANY, ELEMENT and MIXED to replace integer constants. (ContentModel.type): Change type to ContentModel.Type. (EmptyContentModel): Make static. (EmptyContentModel.EmptyContentModel()): Initialise using enum constant. (AnyContentModel): Make static. (AnyContentModel.AnyContentModel()): Initialise using enum constant. (ElementContentModel): Make static. (ElementContentModel.ElementContentModel()): Initialise using enum constant. Add type parameters. (ContentParticle): Make static. (MixedContentModel): Likewise. (MixedContentModel.MixedContentModel()): Initialise using enum constant. Add type parameters. (AttributeDecl): Make static. (AttributeDecl.AttributeDecl(String,String,int,String,Set, boolean)): Use Set with type parameter instead of raw HashSet. (getCharacterOffset()): Add @Override. (getColumnNumber()): Likewise. (getLineNumber()): Likewise. (getPublicId()): Likewise. (getSystemId()): Likewise. (isNamespaceAware()): New package-private accessor for inner classes. (isXML11()): Likewise. (getInputSize()): Likewise. * javax/xml/parsers/SAXParser.java: (reset()): Fix documentation to refer to Java version rather than JAXP version. (getSchema()): Likewise. Suppress warnings about making this a static method. (isXIncludeAware()): Likewise.
* Allow setDName to throw an IOException so tools build again.Andrew John Hughes2015-03-221-1/+2
| | | | | | | | 2015-03-22 Andrew John Hughes <gnu_andrew@member.fsf.org> * tools/gnu/classpath/tools/keytool/SelfCertCmd.java: (setDName(String,X500Principal)): Allow IOException to be thrown.
* Cleanup the majority of the warnings in the gnu.java.security, ↵Andrew John Hughes2015-03-11188-895/+2349
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | java.security, javax.security and gnu.javax.security classes. 2015-03-11 Andrew John Hughes <gnu_andrew@member.fsf.org> * configure.ac: (ECJ_WARNINGS): Turn off parameter assignment, autoboxing and overridding without a super method call warnings for now. * gnu/java/security/OID.java: (OID(int[],boolean)): Remove unnecessary cast on clone() call. (getIDs()): Likewise. (getDER()): Likewise. (clone()): Add @Override. (toString()): Add @Override. Remove unncessary else clause. (hashCode()): Add @Override. (equals(Object)): Likewise. (compareTo(OID)): Likewise. * gnu/java/security/PolicyFile.java: (getPermissions(CodeSource)): Add @Override. (refresh()): Likewise and on anonymous inner class run() method. (toString()): Add @Override. (parse(URL)): Throw exception if p is null, and suppress associated warning, as exception is thrown via error method. Add default empty case to switch method. Call error method with the exception, not the result of its toString() method. Remove unneeded else block. (expand(String)): Avoid shadowing the prop variable. (error(URL,StreamTokenizer,Throwable)): Add new variant that allows the cause to be included. * gnu/java/security/Properties.java: (init()): Avoid unnecessary casts. (handleBooleanProperty(String)): Make static. * gnu/java/security/action/GetPropertyAction.java: (run()): Add @Override. * gnu/java/security/action/GetSecurityPropertyAction.java: (run()): Add @Override. * gnu/java/security/ber/BERReader.java: (read()): Add @Override. Remove unnecessary else clause. * gnu/java/security/ber/BERValue.java: (getLength()): Add @Override. * gnu/java/security/der/BitString.java: (toByteArray()): Remove unnecessary cast on clone() call. (getShiftedByteArray()): Likewise. (toBooleanArray()): Likewise. (clone(): Add @Override. (hashCode()): Likewise. (equals(Object)): Likewise. (toString()): Likewise. * gnu/java/security/der/DERReader.java: (makeTime(int,byte[])): Make static. Mark fall-through cases in switch statement. Add default case which throws an exception. * gnu/java/security/der/DERValue.java: (DERValue(int,int,Object,byte[])): Remove unnecessary cast on clone() call. (getValueAs(int)): Avoid shadowing of encoded variable. (getEncoded()): Remove unnecessary cast on clone() call. (toString()): Add @Override. * gnu/java/security/hash/BaseHash.java: (name()): Add @Override. (hashSize()): Likewise. (blockSize()): Likewise. (update(byte)): Likewise. (update(byte[])): Likewise. (update(byte[],int,int)): Likewise. (digest()): Likewise. (reset()): Likewise. (clone()): Likewise. (selfTest()): Likewise. * gnu/java/security/hash/Haval.java: (Haval(Haval)): Remove unnecessary cast on clone() call. (clone()): Add @Override. (transform(byte[],int)): Likewise. (padBuffer()): Likewise. (getResult()): Likewise. (resetContext()): Likewise. (selfTest()): Likewise. (tailorDigestBits()): Add empty default case to switch statement. (FF5(int,int,int,int,int,int,int,int,int,int)): Make static. (f1(int,int,int,int,int,int,int)): Likewise. (f2(int,int,int,int,int,int,int)): Likewise. (f3(int,int,int,int,int,int,int)): Likewise. (f4(int,int,int,int,int,int,int)): Likewise. (f5(int,int,int,int,int,int,int)): Likewise. * gnu/java/security/hash/MD2.java: (MD2(MD2)): Remove unnecessary casts on clone() call. (clone()): Add @Override. (getResult()): Likewise. (resetContext()): Likewise. (selfTest())): Likewise. (padBuffer()): Likewise. (transform(byte[],int)): LIkewise. * gnu/java/security/hash/MD4.java: (MD4(MD4)): Remove unncessary casts on clone() call. (clone()): Add @Override. (getResult()): Likewise. (resetContext()): Likewise. (selfTest())): Likewise. Avoid shadowing d variable. (padBuffer()): Likewise. (transform(byte[],int)): LIkewise. * gnu/java/security/hash/MD5.java: (MD5(MD5)): Remove unnecessary casts on clone() call. (clone()): Add @Override. (transform(byte[],int)): LIkewise. (padBuffer()): Likewise. (getResult()): Likewise. (resetContext()): Likewise. (selfTest())): Likewise. * gnu/java/security/hash/RipeMD128.java: (RipeMD128(RipeMD128)): Remove unnecessary casts on clone() call. (clone()): Add @Override. (transform(byte[],int)): LIkewise. (padBuffer()): Likewise. (getResult()): Likewise. (resetContext()): Likewise. (selfTest())): Likewise. * gnu/java/security/hash/RipeMD160.java: (RipeMD160(RipeMD160)): Remove unnecessary casts on clone() call. (clone()): Add @Override. (transform(byte[],int)): LIkewise. (padBuffer()): Likewise. (getResult()): Likewise. (resetContext()): Likewise. (selfTest())): Likewise. * gnu/java/security/hash/Sha160.java: (Sha160(Sha160)): Remove unnecessary casts on clone() call. (clone()): Add @Override. (transform(byte[],int)): LIkewise. (padBuffer()): Likewise. (getResult()): Likewise. (resetContext()): Likewise. (selfTest())): Likewise. * gnu/java/security/hash/Sha256.java: (Sha256(Sha256)): Remove unnecessary casts on clone() call. (clone()): Add @Override. (transform(byte[],int)): LIkewise. (padBuffer()): Likewise. (getResult()): Likewise. (resetContext()): Likewise. (selfTest())): Likewise. * gnu/java/security/hash/Sha384.java: (Sha384(Sha384)): Remove unnecessary casts on clone() call. (clone()): Add @Override. (transform(byte[],int)): LIkewise. (padBuffer()): Likewise. (getResult()): Likewise. (resetContext()): Likewise. (selfTest())): Likewise. * gnu/java/security/hash/Sha512.java: (Sha512(Sha512)): Remove unnecessary casts on clone() call. (clone()): Add @Override. (transform(byte[],int)): LIkewise. (padBuffer()): Likewise. (getResult()): Likewise. (resetContext()): Likewise. (selfTest())): Likewise. * gnu/java/security/hash/Tiger.java: (Tiger(Tiger)): Remove unnecessary casts on clone() call. (clone()): Add @Override. (selfTest())): Likewise. (padBuffer()): Likewise. (getResult()): Likewise. (resetContext()): Likewise. (transform(byte[],int)): LIkewise. * gnu/java/security/hash/Whirlpool.java, (Whirlpool(Whirlpool)): Remove unnecessary casts on clone() call. (clone()): Add @Override. (transform(byte[],int)): LIkewise. (padBuffer()): Likewise. (getResult()): Likewise. (resetContext()): Likewise. (selfTest())): Likewise. * gnu/java/security/jce/hash/MessageDigestAdapter.java: (clone()): Add @Override. (engineGetDigestLength()): Likewise. (engineUpdate(byte)): Likewise. (engineUpdate(byte[],int,int)): Likewise. (engineDigest()): Likewise. (engineDigest(byte[],int,int)): Likewise. (engineReset()): Likewise. * gnu/java/security/jce/sig/DSSKeyPairGeneratorSpi.java: (initialize(int,SecureRandom)): Add @Override. (initialize(AlgorithmParameterSpec,SecureRandom)): Likewise. * gnu/java/security/jce/sig/DSSParametersGenerator.java: (engineInit(int,SecureRandom)): Add @Override. (engineInit(AlgorithmParameterSpec,SecureRandom)): Likewise. (engineGenerateParameters()): Likewise. * gnu/java/security/jce/sig/EncodedKeyFactory.java: (decodeDSSPublicKey(DSAPublicKeySpec)): Make static. (decodeRSAPublicKey(RSAPublicKeySpec)): Likewise. (decodeDHPublicKey(DHPublicKeySpec)): Likewise. (decodeDHPublicKey(byte[]]): Likewise. (decodeDSSPrivateKey(DSAPrivateKeySpec)): Likewise. (decodeRSAPrivateKey(RSAPrivateCrtKeySpec)): Likewise. (decodeDHPrivateKey(DHPrivateKeySpec)): Likewise. (decodeDHPrivateKey(byte[])): Likewise. * gnu/java/security/jce/sig/KeyPairGeneratorAdapter.java: (initialize(int,SecureRandom)): Add Override. (initialize(AlgorithmParameterSpec,SecureRandom)): Likewise. (generateKeyPair()): Likewise. (localiseName(String)): Uncomment conversion. * gnu/java/security/jce/sig/RSAKeyPairGeneratorSpi.java: (initialize(int,SecureRandom)): Add Override. (initialize(AlgorithmParameterSpec,SecureRandom)): Likewise. * gnu/java/security/jce/sig/SignatureAdapter.java: Drop unneeded import of BaseSignature. (clone()): Add @Override. (engineInitVerify(PublicKey)): Reference VERIFIER_KEY via interface ISignature where it is defined. (engineInitSign(PrivateKey)): Likewise for SIGNER_KEY. (engineInitSign(PrivateKey,SecureRandom)): Likewise for SIGNER_KEY and SOURCE_OF_RANDOMNESS. * gnu/java/security/key/KeyPairCodecFactory.java: (getInstance(String,int)): Add default case which returns null. (getInstance(Key)): Likewise and fix typo in documentation. * gnu/java/security/key/dss/DSSKey.java: (getParams()): Add @Override. (getAlgorithm()): Likewise. (getEncoded()): Likewise. (getFormat()): LIkewise. (equals(Object)): Likewise. (hashCode()): Add implementation using java.util.Objects.hash (toString()): Remove unneeded cast. * gnu/java/security/key/dss/DSSKeyPairGenerator.java: (setup(MAp)): Remove unnecessary else clause. (generate()): Remove left-over debug statement. * gnu/java/security/key/dss/DSSKeyPairRawCodec.java: (getFormatID()): Add @Override. (encodePublicKey(PublicKey)): Likewise. (decodePublicKey(byte[])): Likewise. (encodePrivateKey(PrivateKey)): Likewise. (decodePrivateKey(byte[])): Likewise. * gnu/java/security/key/dss/DSSKeyPairX509Codec.java: (getFormatID()): Add @Override. (encodePublicKey(PublicKey)): Likewise. (encodePrivateKey(PrivateKey)): Likewise. (decodePublicKey(byte[])): Likewise. (decodePrivateKey(byte[])): Likewise. * gnu/java/security/key/dss/DSSPrivateKey.java: Drop unneeded reference to PrivateKey. (getX()): Add @Override. (getEncoded(int)): Likewise. (equals(Object)): Likewise. (hashCode()): Implemented. (toString()): Add @Override and remove unneeded cast. * gnu/java/security/key/dss/DSSPublicKey.java: Drop unneeded reference to PublicKey. (getY()): Add @Override. (getEncoded(int)): Likewise. (equals(Object)): Likewise. (hashCode()): Implemented. (toString()): Add @Override and remove unneeded cast. * gnu/java/security/key/rsa/GnuRSAKey.java: (getModulus()): Add @Override. (getAlgorithm()): Likewise. (getEncoded()): Likewise. (getFormat()): Likewise. (equals(Object)): Likewise. (hashCode()): Implemented using java.util.Objects.hash (toString()): Add @Override and remove unneeded cast. * gnu/java/security/key/rsa/GnuRSAPrivateKey.java: Drop unneeded reference to PrivateKey. (getPrimeP()): Add @Override. (getPrimeQ()): Likewise. (getPrimeExponentP()): Likewise. (getPrimeExponentQ()): Likewise. (getCrtCoefficient()): Likewise. (getPrivateExponent()): Likewise. (getEncoded(int)): Likewise. (equals(Object)): Likewise. (hashCode()): Implemented using java.util.Objects.hash. (toString()): Add @Override and remove unneeded cast. * gnu/java/security/key/rsa/GnuRSAPublicKey.java: Drop unneeded reference to PublicKey. (getEncoded()): Add @Override. (equals(Object)): Likewise. (hashCode()): Implemented. (toString()): Add @Override and remove unneeded cast. * gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java: (getFormatID()): Add @Override. (encodePublicKey(PublicKey)): Likewise. (encodePrivateKey(PrivateKey)): Likewise. (decodePublicKey(byte[])): Likewise. (decodePrivateKey(byte[])): Likewise. * gnu/java/security/key/rsa/RSAKeyPairRawCodec.java: (getFormatID()): Add @Override. (encodePublicKey(PublicKey)): Likewise. (decodePublicKey(byte[])): Likewise. (encodePrivateKey(PrivateKey)): Likewise. (decodePrivateKey(byte[])): Likewise. * gnu/java/security/pkcs/PKCS7SignedData.java: (PKCS7SignedData(BERReader)): Refer to constants by the interface where they are defined. Rename crls to avoid shadowing the class variable. * gnu/java/security/pkcs/SignerInfo.java: (SignerInfo(BERReader)): Refer to constants by the interface where they are defined. * gnu/java/security/prng/BasePRNG.java: (addRandomBytes(byte[])): Add @Override. (addRandomBytes(byte[],int,int)): Likewise. Rename buffer to buf to avoid shadowing. (clone()): Remove unnecessary cast and this references. * gnu/java/security/prng/MDGenerator.java: Remove unneeded reference to Cloneable. * gnu/java/security/prng/RandomEvent.java: (RandomEvent(Object,byte,byte,byte[])): Remove unnecessary cast. * gnu/java/security/provider/DefaultPolicy.java: (getPermissions(CodeSource)): Add @Override. (refresh()): Likewise. * gnu/java/security/provider/Gnu.java: (Gnu()): Add @Override to run implementation in anonymous inner class. * gnu/java/security/provider/PKIXCertPathValidatorImpl.java: (engineValidate(CertPath,CertPathParameters)): Add @Override. Remove unneeded cast and else clause. (checkExplicitPolicy(int,List)): Make static. * gnu/java/security/provider/X509CertificateFactory.java: (generateCert(InputStream)): Make static. Remove unnecessary else clause. (generateCRL(InputStream)): Likewise. * gnu/java/security/sig/SignatureCodecFactory.java: (getInstance(String,int)): Add default case to switch statement. * gnu/java/security/sig/dss/DSSSignature.java: (encodeSignature(BigInteger,BigInteger)): Make static. (decodeSignature(Object)): Likewise. * gnu/java/security/sig/dss/DSSSignatureRawCodec.java: (getFormatID()): Add @Override. (encodeSignature(Object)): Likewise. (decodeSignature(byte[])): Likewise. * gnu/java/security/sig/dss/DSSSignatureX509Codec.java: (getFormatID()): Add @Override. (encodeSignature(Object)): Likewise. (decodeSignature(byte[])): Likewise. * gnu/java/security/sig/rsa/EMSA_PKCS1_V1_5.java: (clone()): Add @Override. * gnu/java/security/sig/rsa/EMSA_PSS.java: (clone()): Add @Override. * gnu/java/security/sig/rsa/RSA.java: (RSADP(RSAPrivateKey, BigInteger)): Suppress null warning as r is always non-null if rsaBlinding is true. * gnu/java/security/sig/rsa/RSAPKCS1V1_5Signature.java: (clone()): Add @Override. (setupForVerification(PublicKey)): Likewise. (setupForSigning(PrivateKey)): Likewise. (generateSignature()): Likewise. (verifySignature(Object)): Likewise. * gnu/java/security/sig/rsa/RSAPKCS1V1_5SignatureRawCodec.java: (getFormatID()): Add @Override. (encodeSignature(Object)): Likewise. (decodeSignature(byte[])): Likewise. * gnu/java/security/sig/rsa/RSAPKCS1V1_5SignatureX509Codec.java: (getFormatID()): Add @Override. (encodeSignature(Object)): Likewise. (decodeSignature(byte[])): Likewise. * gnu/java/security/sig/rsa/RSAPSSSignature.java: (clone()): Add @Override. (setupForVerification(PublicKey)): Likewise. Remove unnecessary cast. (setupForSigning(PrivateKey)): Likewise. (generateSignature()): Add @Override. (verifySignature(Object)): Likewise. * gnu/java/security/sig/rsa/RSAPSSSignatureRawCodec.java: (getFormatID()): Add @Override. (encodeSignature(Object)): Likewise. (decodeSignature(byte[])): Likewise. * gnu/java/security/util/ByteArray.java: (toString()): Add @Override. * gnu/java/security/util/ByteBufferOutputStream.java: (toString()): Add @Override. * gnu/java/security/util/ExpirableObject.java: (destroy()): Add @Override. (Destroyer.run()): Likewise. * gnu/java/security/util/FormatUtil.java: (getEncodingName(int)): Add default case for switch statement. (getEncodingShortName(int)): Likewise. * gnu/java/security/util/Sequence.java: (size()): Add @Override. (toArray()): Likewise. Remove unnecessary cast. * gnu/java/security/util/SimpleList.java: (size()): Add @Override. (get(int)): Likewise. (toString()): Likewise. * gnu/java/security/util/Util.java: (toBase64(byte[])): Add default case to switch statement which does nothing. Remove unnecessary else clause. * gnu/java/security/x509/PolicyNodeImpl.java: (addExpectedPolicy(String)): Rename variable to expectedPolicy to avoid shadowing policy variable. (addAllPolicyQualifiers(Collection)): Rename variable to policyQualifiers to avoid shadowing qualifiers variable. Rewrite collection check to catch ClassCastException as, if it.next() returns normally, it will always be an instance of PolicyQualifierInfo. (toString()): Add @Override. * gnu/java/security/x509/X500DistinguishedName.java: (X500DistinguishedName(String)): Throw IOException rather than catching it as calling methods in X509CRLSelector implementations, addIssuerName(String), expect an IOException to be thrown if there is a parsing error. (getName()): Add @Override. (hashCode()): Likewise. (equals(Object)): Likewise. (toString()): Likewise. (getDer()): Remove unnecessary casts. (readAttributeType(Reader)): Make static. * gnu/java/security/x509/X509CRL.java: (equals(Object)): Add @Override. (hashCode()): Likewise. (getEncoded()): Remove unnecessary cast. (getIssuerX500Principal()): Add @Override. (getTBSCertList()): Remove unnecessary cast. (getSignature()): Likewise. (getSigAlgParams()): Likewise. (hasUnsupportedCriticalExtension()): Add @Override. (getCriticialExtensionOIDs()): Likewise. (getNonCriticalExtensionOIDs()): Likewise. (getExtensionValue(String)): Likewise. (isRevoked(Certificate)): Likewise. Remove unnecessary cast. (parse(InputStream)): Remove unnecessary cast. * gnu/java/security/x509/X509CRLEntry.java: (getEncoded()): Remove unncessary cast. (hasUnsupportedCriticalExtension()): Add @Override. (getCriticialExtensionOIDs()): Likewise. (getNonCriticalExtensionOIDs()): Likewise. (getExtensionValue(String)): Likewise. * gnu/java/security/x509/X509CRLSelectorImpl.java: (addIssuerName(String)): Throw IOException as specified. * gnu/java/security/x509/X509CertPath.java: (getCertificates()): Add @Override. (getEncoded()): Likewise. Remove unnecessary casts. (getEncodings()): Add @Override. (parse(InputStream, String)): Rename path to parsedPath to avoid shadowing. * gnu/java/security/x509/X509CertSelectorImpl.java: (addIssuerName(String)): Throw IOException as specified. * gnu/java/security/x509/X509Certificate.java: Remove unneeded Serializable reference. (checkValidity()): Add @Override. (checkValidity(Date)): Likewise. (getVersion()): Likewise. (getSerialNumber()): Likewise. (getIssuerDN()): Likewise. (getIssuerX500Principal()): Likewise. (getSubjectDN()): Likewise. (getSubjectX500Principal()): Likewise. (getNotBefore()): Likewise. (getNotAfter()): Likewise. (getTBSCertificate()): Likewise. Remove unnecessary cast. (getSignature()): Likewise. (getSigAlgName()): Add @Override. (getSigAlgOID()): Likewise. (getSigAlgParams()): Likewise. Remove unnecessary cast. (getIssuerUniqueID()): Add @Override. (getSubjectUniqueID()): Likewise. (getKeyUsage()): Likewise. (getExtendedKeyUsage()): Likewise. (getBasicConstraints()): Likewise. (getSubjectAlternativeNames()): Likewise. Make conversion from int to Integer explicit. (getIssuerAlternativeNames()): Likewise. (hasUnsupportedCriticalExtension()): Add @Override. (getCriticialExtensionOIDs()): Likewise. (getNonCriticalExtensionOIDs()): Likewise. (getExtensionValue(String)): Likewise. (getEncoded()): Likewise. Remove unnecessary cast. (verify(PublicKey)): Add @Override. (verify(PublicKey, String)): Likewise. (toString()): Likewise. (getPublicKey()): Likewise. (parse(InputStream)): Rename encoded to enc to avoid shadowing. Avoid unnecessary cast. * gnu/java/security/x509/ext/AuthorityKeyIdentifier.java: (toString()): Add @Override. * gnu/java/security/x509/ext/BasicConstraints.java: (getEncoded()): Add @Override. Remove unncessary casts. (toString()): Add @Override. * gnu/java/security/x509/ext/CRLNumber.java: (getEncoded()): Add @Override. Remove unncessary casts. (toString()): Add @Override. * gnu/java/security/x509/ext/CertificatePolicies.java: (CertificatePolicies(List,Map)): Swap empty for-loop for a while loop. (getEncoded()): Add @Override. Remove unnecessary cast. (toString()): Add @Override. * gnu/java/security/x509/ext/ExtendedKeyUsage.java: (toString()): Add @Override. * gnu/java/security/x509/ext/Extension.java: (Extension(byte[])): Remove unnecessary cast. (getEncoded()): Likewise. (toString()): Add @Override. (Value.Value(byte[])): Remove unnecessary cast. (Value.getEncoded()): Likewise. (hashCode()): Add @Override. (equals(Object)): Likewise. (toString()): Likewise. * gnu/java/security/x509/ext/GeneralName.java: (Kind.forTag(int)): Add default case. (Kind): Remove unnecessary ; on closing brace. (GeneralName(Kind,byte[])): Remove unnecessary cast. (name()): Likewise. (encoded()): Check for null rather than catching exception. Remove unnecessary cast. (equals(Object)): Add @Override. Avoid unnecessary method call. (hashCode()): Implemented using java.util.Objects.hash. (toString()): Add @Override. * gnu/java/security/x509/ext/GeneralNames.java: (toString()): Add @Override. * gnu/java/security/x509/ext/GeneralSubtree.java: (toString()): Add @Override. * gnu/java/security/x509/ext/IssuerAlternativeNames.java: (toString()): Add @Override. * gnu/java/security/x509/ext/KeyUsage.java: (toString()): Add @Override. * gnu/java/security/x509/ext/NameConstraints.java: (toString()): Add @Override. * gnu/java/security/x509/ext/PolicyConstraint.java: (toString()): Add @Override. * gnu/java/security/x509/ext/PolicyMappings.java: (toString()): Add @Override. * gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java: (toString()): Add @Override. * gnu/java/security/x509/ext/ReasonCode.java: (toString()): Add @Override. * gnu/java/security/x509/ext/SubjectAlternativeNames.java: (toString()): Add @Override. * gnu/java/security/x509/ext/SubjectKeyIdentifier.java: (getKeyIdentifier()): Remove unnecessary cast. (toString()): Add @Override. * gnu/javax/security/auth/Password.java: (doDestroy): Add @Override. Remove unneeded else block. (isDestroyed): Add @Override. * gnu/javax/security/auth/callback/AWTCallbackHandler.java: (handleChoice(ChoiceCallback)): Add @Override. (handleConfirmation(ConfirmationCallback)): Likewise. (handleLanguage(LanguageCallback)): Likewise. (handleName(NameCallback)): Likewise. (handlePassword(PasswordCallback)): Likewise. (handleTextInput(TextInputCallback)): Likewise. (handleTextOutput(TextOutputCallback)): Likewise. (actionPerformed(ActionEvent)): Likewise. (windowClosing(WindowEvent)): Likewise. (windowOpened(WindowEvent)): Likewise. (windowClosed(WindowEvent)): Likewise. (windowIconified(WindowEvent)): Likewise. (windowDeiconified(WindowEvent)): Likewise. (windowActivated(WindowEvent)): Likewise. (windowDeactivated(WindowEvent)): Likewise. * gnu/javax/security/auth/callback/AbstractCallbackHandler.java: (AbstractCallbackHandler(String)): Reference getBundle by class where it is implemented (ResourceBundle). (handle(Callback[])): Add @Override. (handleChoice(ChoiceCallback)): Allow and document an UnsupportedCallbackException being thrown. (handleConfirmation(ConfirmationCallback)): Likewise. (handleLanguage(LanguageCallback)): Likewise. (handleName(NameCallback)): Likewise. (handlePassword(PasswordCallback)): Likewise. (handleTextInput(TextInputCallback)): Likewise. (handleTextOutput(TextOutputCallback)): Likewise. (handleOther(Callback)): Suppress warnings resulting from unused variables, unthrown exceptions and lack of IOException being thrown. They are necessary for subclasses. * gnu/javax/security/auth/callback/ConsoleCallbackHandler.java: (handleChoice(ChoiceCallback)): Add @Override. Drop unnecessary cast. (handleConfirmation(ConfirmationCallback)): Add @Override. (handleLanguage(LanguageCallback)): Likewise. (handleName(NameCallback)): Likewise. (handlePassword(PasswordCallback)): Likewise. (handleTextInput(TextInputCallback)): Likewise. (handleTextOutput(TextOutputCallback)): Likewise. * gnu/javax/security/auth/callback/DefaultCallbackHandler.java: (handleChoice(ChoiceCallback)): Add @Override. (handleConfirmation(ConfirmationCallback)): Likewise. (handleLanguage(LanguageCallback)): Likewise. (handleName(NameCallback)): Likewise. (handlePassword(PasswordCallback)): Likewise. (handleTextInput(TextInputCallback)): Likewise. (handleTextOutput(TextOutputCallback)): Likewise. * gnu/javax/security/auth/callback/GnuCallbacks.java: (GnuCallbacks()): Add @Override to run() implementation in anonymous inner class. * gnu/javax/security/auth/callback/SwingCallbackHandler.java: (handleChoice(ChoiceCallback)): Add @Override to method and methods of anonymous inner classes. Refer to constants using interface where they appear. (handleConfirmation(ConfirmationCallback)): Add @Override to method and methods of anonymous inner class. Declare UnsupportedCallbackException as thrown and add default cases and fall-through markers to switch statements. (handleLanguage(LanguageCallback)): Add @Override. Remove unused variable defaultIndex. (handleName(NameCallback)): Add @Override to method and method of anonymous inner class. (handlePassword(PasswordCallback)): Likewise. (handleTextInput(TextInputCallback)): Likewise. Refer to constants using interface where they appear. (handleTextOutput(TextOutputCallback)): Likewise. Declare UnsupportedCallbackException as thrown and add default case to switch statement. (waitForInput(JDialog, Callback)): Make static. * gnu/javax/security/auth/login/ConfigFileParser.java: (initParser(Reader)): Don't declare IOException as thrown as one is never thrown. (expandParamValue(String)): Make static. * gnu/javax/security/auth/login/GnuConfiguration.java: (getAppConfigurationEntry(String)): Add @Override. (refresh()): Likewise. (getInputStreamFromURL(String)): Make static. (parseConfig(InputStream)): Remove unneeded variable. (getUserName()): Make static. (getConfigFromUserName(File,String)): Likewise. * java/security/AccessControlContext.java: (equals(Object)): Add @Override. (hashCode()): Likewise. * java/security/AlgorithmParameters.java: (toString()): Add @Override. * java/security/AllPermission.java: (AllPermission(String,String)): Suppress warning about actions variable being unused. (implies(Permission)): Add @Override. (equals(Object)): Likewise. (hashCode()): Likewise. (getActions()): Likewise. (newPermissionCollection()): Likewise. (AllPermissionCollection()): Add public constructor to avoid generating a synthetic accessor method. * java/security/BasicPermission.java: Remove unneeded Serializable reference. (BasicPermission(String,String)): Suppress warnings about actions variable being unused. (getActions()): Add @Override. (newPermissionCollection()): Likewise. * java/security/Certificate.java: Mark with @Deprecated. Fix typo in documentation. * java/security/DigestInputStream.java: (read()): Add @Override. (read(byte[],int,int)): Likewise. (toString()): Likewise. * java/security/DigestOutputStream.java: (write(int)): Add @Override. (write(byte[],int,int)): Likewise. (toString()): Likewise. * java/security/DummyKeyPairGenerator.java: (clone()): Add @Override. (initialize(int,SecureRandom)): Likewise. (initialize(AlgorithmParameterSpec,SecureRandom)): Likewise. (generateKeyPair()): Likewise. * java/security/DummyMessageDigest.java: (clone()): Add @Override. (engineDigest()): Likewise. (engineDigest(byte[],int,int)): Likewise. (engineGetDigestLength()): Likewise. (engineReset()): Likewise. (engineUpdate(byte)): Likewise. (engineUpdate(byte[],int,int)): Likewise. * java/security/Identity.java: Mark as @Deprecated. Fix typo in documentation. (getName()): Add @Override. (equals(Object)): Likewise. (toString()): Likewise. (toString(boolean)): Remove unnecessary else clause. (hashCode()): Add @Override. * java/security/IdentityScope.java: Mark as @Deprecated. (toString()): Add @Override. * java/security/IntersectingDomainCombiner.java: (combine(ProtectionDomain[],ProtectionDomain[])): Add @Override. * java/security/KeyPairGenerator.java: (generateKeyPair()): Add @Override. * java/security/KeyPairGeneratorSpi.java: (initialize(AlgorithmParameterSpec,SecureRandom)): Suppress warning about making this method static. Intended to be overridden by subclasses. (clone()): Add @Override. * java/security/KeyStore.java: (getInstance(String,Provider)): Fix typo in documentation. (getDefaultType()): Add @Override to run() in anonymous inner class. * java/security/MessageDigest.java: (toString()): Add @Override. (clone()): Likewise. * java/security/MessageDigestSpi.java: (engineGetDigestLength()): Suppress warning about making this method static. Intended to be overridden by subclasses. (clone()): Add @Override. * java/security/Permission.java: (checkGuard(Object)): Add @Override. (equals(Object)): Likewise. (hashCode()): Likewise. (newPermissionCollection()): Likewise. (toString()): Likewise. * java/security/PermissionCollection.java: (toString()): Add @Override. * java/security/Permissions.java: Remove unneeded Serializable reference. (elements()): Add @Override to hasMoreElements and nextElement methods in anonymous inner class. (PermissionsHash.PermissionsHash()): Add explicit constructor to avoid a synthetic accessor method. (add(Permission)): Mark synchronized. (implies(Permission)): Likewise. * java/security/Policy.java: (implies(ProtectionDomain,Permission)): Remove unnecessary cast. * java/security/Principal.java: (equals(Object)): Add @Override. (toString()): Likewise. (hashCode()): Likewise. * java/security/PrivilegedActionException.java: (getCause()): Add @Override. (toString()): Removed; pointless as it just calls superclass version. * java/security/ProtectionDomain.java: (ProtectionDomain(CodeSource,PermissionCollection, ClassLoader,Principal[],boolean)): Remove unnecessary cast. (getPrincipals()): Add @Override. (toString()): Likewise. * java/security/Provider.java: Remove unneeded Serializable reference. (put(Object,Object)): Add @Override. Suppress warnings about overridding a synchronized method as all collection modifications are made in synchronized superclass method. (get(Object)): Likewise. (remove(Object)): Likewise. (clear()): Likewise. (toString()): Add @Override. Suppress warning about overridding a synchronized method as the collection isn't used. (toCanonicalKey(Object)): Make static. * java/security/SecureClassLoader.java: (getPermissions(CodeSource)): Suppress warning about making this method static; may potentially be overridden by subclasses. Avoid unnecessary variable policy. * java/security/SecureRandom.java: (setSeed(byte[])): Make synchronized to prevent concurrent access to secureRandomSpi. (setSeed(long)): Add @Override and make synchronized. (nextBytes(byte[])): Likewise. (next(int)): Likewise. (generateSeed(byte[])): Make synchronized. * java/security/Security.java: (getAlgorithmProperty(String,String)): Add @Deprecated. (getProvider(String)): Remove unnecessary else clause. (getAlgorithm(String)): Use provs instead of providers to avoid shadowing class variable. (provides(Provider,String,String,String,String)): Set serviceDotAlgorithm to the empty string to avoid null pointer issues. * java/security/SecurityPermission.java: (SecurityPermission(String,String)): Suppress warning due to nothing being done with actions. * java/security/Signature.java: (sign()): Remove unnecessary else clause. (sign(byte[],int,int)): Likewise. (verify(byte[])): Likewise. (toString()): Mark @Override. (setParameter(String,Object)): Add @Deprecated. (getParameter(String)): Likewise. (clone()): Add @Override. * java/security/SignatureSpi.java: (engineSetParameter(String,Object)): Add @Deprecated. (engineSetParameter(AlgorithmParameterSpec)): Suppress warnings about unused variables, unthrown exceptions and ability to be a static method. Subclasses override this. (engineGetParameters()): Suppress warnings about making this method static. (engineGetParameter(String)): Add @Deprecated. * java/security/SignedObject.java: (getSignature()): Remove unnecessary cast. (readObject(ObjectInputStream)): Likewise x 2. * java/security/Signer.java: Mark as @Deprecated. (toString()): Add @Override. * java/security/UnresolvedPermission.java: (getUnresolvedCerts()): Remove unnecessaary cast. (UnresolvedPermissionCollection.elements()): Add @Override to hasMoreElements and nextElement. * java/security/acl/Acl.java: (toString()): Add @Override. * java/security/acl/AclEntry.java: (setPrincipal(Principal)): Fix formatting of documentation. (addPermission(Permission)): Likewise. (removePermission(Permission)): Likewise. (checkPermission(Permission)): Likewise. (toString()): Add @Override. * java/security/acl/Permission.java: (equals(Object)): Add @Override. (toString()): Likewise. * java/security/cert/CRL.java: (toString()): Add @Override. * java/security/cert/CertPath.java: (equals(Object)): Add @Override. (hashCode()): Likewise. (toString()): Likewise. * java/security/cert/CertPathBuilderException.java: (CertPathBuilderException(Throwable)): Just call superclass constructor. (CertPathBuilderException(String,Throwable)): Likewise. (getMessage()): Removed; provided by superclass. (getCause()): Likewise. (toString()): Likewise. (printStackTrace()): Likewise. (printStackTrace(PrintStream)): Likewise. (printStackTrace(PrintWriter)): Likewise. * java/security/cert/CertPathValidatorException.java: (CertPathValidatorException(String,Throwable)): Just call superclass with both arguments, rather than initCause. (getMessage()): Removed; provided by superclass. (getCause()): Likewise. (toString()): Likewise. (printStackTrace()): Likewise. (printStackTrace(PrintStream)): Likewise. (printStackTrace(PrintWriter)): Likewise. * java/security/cert/CertStoreException.java: (CertStoreException(Throwable)): Just call superclass constructor. (CertStoreException(String,Throwable)): Likewise. (getMessage()): Removed; provided by superclass. (getCause()): Likewise. (toString()): Likewise. (printStackTrace()): Likewise. (printStackTrace(PrintStream)): Likewise. (printStackTrace(PrintWriter)): Likewise. * java/security/cert/CertStoreSpi.java: (CertStoreSpi(CertStoreParameters)): Suppress warnings about exception not being thrown. Present for subclasses. * java/security/cert/Certificate.java: (equals(Object)): Add @Override. (hashCode()): Likewise. (toString()): Likewise. * java/security/cert/CertificateFactorySpi.java: (engineGenerateCertPath(InputStream)): Suppress warnings about unused arguments, exceptions not being thrown and method can be static. Provided for subclass implementations. (engineGenerateCertPath(InputStream,String)): Likewise. (engineGenerateCertPath(List)): Likewise. (engineGetCertPathEncodings()): Likewise. * java/security/cert/CollectionCertStoreParameters.java: (toString()): Add @Override. * java/security/cert/LDAPCertStoreParameters.java: (clone()): Add @Override. (toString()): Likewise. * java/security/cert/PKIXBuilderParameters.java: (toString()): Likewise. * java/security/cert/PKIXCertPathBuilderResult.java: (getCertPath()): Add @Override. (toString()): Likewise. * java/security/cert/PKIXCertPathChecker.java: (clone()): Add @Override. * java/security/cert/PKIXCertPathValidatorResult.java: (clone()): Add @Override. (toString()): Likewise. * java/security/cert/PKIXParameters.java: (clone()): Add @Overrride. (toString()): Likewise. * java/security/cert/PolicyQualifierInfo.java: (PolicyQualifierInfo(byte[])): Remove unnecessary cast. (getEncoded()): Likewise. (toString()): Add @Override. * java/security/cert/TrustAnchor.java: (TrustAnchor(X509Certificate,byte[])): Remove unnecessary cast. (TrustAnchor(String,PublicKey,byte[])): Document exceptions. Catch IOException and throw as IllegalArgumentException. Remove unnecessary casts. (toString()): Add @Override. * java/security/cert/X509CRL.java: (equals(Object)): Add @Override. (hashCode()): Likewise. (getIssuerX500Principal()): Suppress warning about making this static. Should be overridden by subclasses. * java/security/cert/X509CRLEntry.java: (equals(Object):: Add @Override. (hashCode()): Likewise. (toString()): Likewise. * java/security/cert/X509CRLSelector.java: Remove unneeded Cloneable reference. (getIssuerNames()): Remove unneeded else block. (toString()): Add @Override. (match(CRL)): Likewise. (clone()): LIkewise. * java/security/cert/X509CertSelector.java: Remove unneeded Cloneable reference. (makeName(int,String)): Re-use earlier result of Kind.forTag(id). Add default case. (clone()): Add @Override. (getAuthorityKeyIdentifier()): Remove unneeded else block and cast. (getCertificateValid()): Remove unneeded else block. (getExtendedKeyUsage()): Likewise. (getIssuerAsBytes()): Likewise. (getIssuerAsString()): Likewise. (getKeyUsage()): Likewise and remove unneeded cast. (getNameConstraints()): Likewise. (getPathToNames()): Explicitly convert int to Integer. (getPrivateKeyValid()): Suppress static method warning. Method is deliberately useless. (getSubjectAlternativeNames()): Explicitly convert int to Integer. (getSubjectAsBytes()): Remove unneeded else block. (getSubjectAsString()): Likewise. (getSubjectKeyIdentifier()): Likewise and remove unneeded cast. (match(Certificate)): Add @Override. Rename cert to other to avoid shadowing. (setNameConstraints(byte[])): Remove unnecessary cast. Suppress warnings about NameConstraints instance being unused. (setPrivateKeyValid()): Suppress unused variable warning. Method is deliberately useless. (setSubjectPublicKey(PublicKey)): Remove unneeded cast. (toString()): Add @Override. * java/security/cert/X509Certificate.java: (getExtendedKeyUsage()): Suppress unthrown exception warning and static method suggestion. Overridden by subclasses. (getSubjectAlternativeNames()): Likewise. (getIssuerAlternativeNames()): Likewise. (getSubjectX500Principal()): Suppress static method suggestion. Overridden by subclasses. (getIssuerX500Principal()): Likewise. * java/security/spec/DSAParameterSpec.java: (getP()): Add @Override. (getQ()): Likewise. (getG()): Likewise. * java/security/spec/PKCS8EncodedKeySpec.java: (getEncoded()): Add @Override. (getFormat()): Likewise. * java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java: (RSAMultiPrimePrivateCrtKeySpec(BigInteger,BigInteger,BigInteger, BigInteger,BigInteger,BigInteger,BigInteger,BigInteger, RSAOtherPrimeInfo[])): Remove unneeded else block. * java/security/spec/X509EncodedKeySpec.java: (getEncoded()): Add @Override. (getFormat()): Likewise. * javax/security/auth/Policy.java: Add @Deprecated. * javax/security/auth/PrivateCredentialPermission.java: Remove unneeded Serializable reference. (equals(Object)): Add @Override. Rename principals to thisPrincipals to avoid shadowing. (getActions()): Add @Override. (hashCode()): Likewise. (implies(Permission)): Likewise. Rename principals to thisPrincipals to avoid shadowing. (newPermissionCollection()): Add @Override to method and anonymous inner class implementations of equals(Object) & hashCode(). * javax/security/auth/SubjectDomainCombiner.java: (combine(ProtectionDomain[],ProtectionDomain[])): Add @Override. * javax/security/auth/callback/ConfirmationCallback.java: (setOptions(String[],int)): Move reference to options.length to after options null check. * javax/security/auth/kerberos/KerberosKey.java: Remove unneeded Serializable reference. (getAlgorithm()): Add @Override. (getFormat()): Likewise. (getEncoded()): Likewise and remove unnecessary cast. (destroy()): Add @Override. (isDestroyed()): Likewise. (toString()): Likewise. * javax/security/auth/kerberos/KerberosPrincipal.java: (getName()): Add @Override. (hashCode()): Likewise. (equals(Object)): Likewise. (toString()): Likewise. * javax/security/auth/kerberos/KerberosTicket.java: (asn1Encoding): Remove @SuppressWarnings. (KerberosTicket(byte[],KerberosPrincipal,KerberosPrincipal, byte[],int,boolean[],Date,Date,Date,Date,InetAddress[])): Remove unnecessary cast. Remove duplicate assignment to flags. (destroy()): Add @Override. (isDestroyed()): Likewise. (isCurrent()): Likewise. (refresh()): Likewise. (getFlags()): Remove unnecessary cast. (getEncoded()): Likewise. (toString()): Add @Override. * javax/security/auth/kerberos/KeyImpl.java: Remove unneeded Serializable reference. (KeyImpl(byte[],int)): Remove unnecessary cast. (getAlgorithm()): Add @Override. (getEncoded()): Likewise. (getFormat()): Likewise. (toString()): Likewise. * javax/security/auth/login/AppConfigurationEntry.java: (toString()): Add @Override. (LoginModuleControlFlag.toString()): Likewise. * javax/security/auth/login/Configuration.java: (getConfig()): Use GetSecurityPropertyAction rather than a bespoke PrivilegedAction implementation. * javax/security/auth/login/LoginContext.java: (LoginContext(String,Subject,CallbackHandler,Configuration)): Rename entries to appEntries to avoid shadowing. (lookupModule(AppConfigurationEntry,Subject,Map)): Rename subject to subj to avoid shadowing. Check module is null rather than cause is non-null. * javax/security/auth/login/NullConfiguration.java: (getAppConfigurationEntry(String)): Add @Override. (refresh()): Likewise. * javax/security/auth/x500/X500Principal.java: (hashCode()): Add @Override. (equals(Object)): Likewise. (getEncoded()): Remove unnecessary cast. (getName()): Add @Override. (toString()): Likewise. (readAttributeType(Reader)): Make static. (parseDer(InputStream)): Rename encoded to encodedStream to avoid shadowing. * javax/security/auth/x500/X500PrivateCredential.java: (destroy()): Add @Override. (isDestroyed()): Likewise. * javax/security/cert/Certificate.java: (equals(Object)): Add @Override. (hashCode()): Likewise. (toString()): Likewise. * javax/security/cert/X509CertBridge.java: (getEncoded()): Add @Override. (verify(PublicKey)): Likewise. (verify(PublicKey,String)): Likewise. (toString()): Likewise. (getPublicKey()): Likewise. (checkValidity()): Likewise. (checkValidity(Date)): Likewise. (getVersion()): Likewise. (getSerialNumber()): Likewise. (getIssuerDN()): Likewise. (getSubjectDN()): Likewise. (getNotBefore()): Likewise. (getNotAfter()): Likewise. (getSigAlgName()): Likewise. (getSigAlgOID()): Likewise. (getSigAlgParams()): Likewise. * javax/security/sasl/Sasl.java: (createSaslClient(String[],String,String,String,Map,CallbackHandler)): Remove unnecessary else clause and pointless result assignment. (createSaslServer(String,String,String,Map,CallbackHandler)): Likewise. * javax/security/sasl/SaslException.java: Remove unneeded Serializable reference. (SaslException(String,Throwable)): Add cause to superclass call. (getCause()): Add @Override. (printStackTrace()): Removed; provided by superclass. (printStackTrace(PrintStream)): Likewise. (printStackTrace(PrintWriter)): Likewise. (initCause(Throwable)): Call superclass version, then sync the local copy. (toString()): Add @Override.
* PR64902: Keys returned by KeyPairGenerator don't use standardised algorithm ↵Andrew John Hughes2015-02-1011-201/+497
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | names PR64904: KeyPairGenerator.genKeyPair() fails if not explicitly initialised 2015-02-02 Andrew John Hughes <gnu_andrew@member.fsf.org> PR classpath/64902 PR classpath/64904 * NEWS: Updated. * gnu/java/security/jce/sig/KeyPairGeneratorAdapter.java: (KeyPairGeneratorAdapter(String)): Filter incoming generator names so all standardised names are handled (e.g. the DiffieHellman alias for DH. (generateKeyPair()): Check whether the generator has been initialized and initialize it with defaults if not. (getAlgorithm()): Return the standardised name, not the internal one. (localiseName(String)): Convert requested standardised name to the internal equivalent. * gnu/java/security/key/IKeyPairGenerator.java: (isInitialized()): New method to check whether the generator has been initialized. (getDefaultKeySize()): Return the default key size used by the generator. * gnu/java/security/key/dss/DSSKey.java: (getAlgorithm()): Return standard "DSA" rather than "dsa". * gnu/java/security/key/dss/DSSKeyPairGenerator.java: (initialized): Flag to indicate whether the generator has been initialized or not. (initLock): Lock to prevent multiple concurrent initializations. (setup(Map)): Wrap initialization in a lock and set initialized flag when done. (isInitialized()): Returns the value of the initialized flag. (getDefaultKeySize()): Returns the default key size. * gnu/java/security/key/rsa/GnuRSAKey.java: (getAlgorithm()): Return standard "RSA" rather than "rsa". * gnu/java/security/key/rsa/RSAKeyPairGenerator.java: (initialized): Flag to indicate whether the generator has been initialized or not. (initLock): Lock to prevent multiple concurrent initializations. (setup(Map)): Wrap initialization in a lock and set initialized flag when done. (isInitialized()): Returns the value of the initialized flag. (getDefaultKeySize()): Returns the default key size. * gnu/javax/crypto/key/dh/GnuDHKey.java: (getAlgorithm()): Return standard "DH" rather than "dh". * gnu/javax/crypto/key/dh/GnuDHKeyPairGenerator.java: (initialized): Flag to indicate whether the generator has been initialized or not. (initLock): Lock to prevent multiple concurrent initializations. (setup(Map)): Wrap initialization in a lock and set initialized flag when done. (isInitialized()): Returns the value of the initialized flag. (getDefaultKeySize()): Returns the default key size. * gnu/javax/crypto/key/srp6/SRPKeyPairGenerator.java: (initialized): Flag to indicate whether the generator has been initialized or not. (initLock): Lock to prevent multiple concurrent initializations. (setup(Map)): Wrap initialization in a lock and set initialized flag when done. (isInitialized()): Returns the value of the initialized flag. (getDefaultKeySize()): Returns the default key size.
* PR64881: KeyPairGenerator.genKeyPair() ends up calling the default ↵Andrew John Hughes2015-02-023-18/+59
| | | | | | | | | | | | | | | | | generateKeyPair method which returns a DSA generator 2015-01-30 Andrew John Hughes <gnu_andrew@member.fsf.org> PR classpath/64881 * NEWS: Updated. * java/security/KeyPairGenerator.java: (genKeyPair()): Document properly. Call original method, generateKeyPair(). (generateKeyPair()): Document properly. Use provider and algorithm values if set rather than just defaulting to GNU and DSA. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Implement java.util.Objects.Andrew John Hughes2015-01-073-0/+317
| | | | | | | | | | | | | | | | | | 2015-01-06 Andrew John Hughes <gnu_andrew@member.fsf.org> * NEWS: Updated. * java/util/Objects.java: New class. (compareTo(T,T,Comparator)): Implemented. (deepEquals(Object,Object)): Likewise. (equals(Object,Object)): Likewise. (hash(Object...)): Likewise. (hashCode(Object)): Likewise. (requireNonNull(T)): Likewise. (requireNonNull(T,String)): Likewise. (toString(Object)): Likewise. (toString(Object,String)): Likewise. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* PR64176: Week of year field during end of year transition is incorrectAndrew John Hughes2014-12-223-11/+92
| | | | | | | | | | | | | | | | 2014-12-15 Andrew John Hughes <gnu_andrew@member.fsf.org> PR classpath/64176 * NEWS: Updated. * java/util/GregorianCalendar.java: (computeFields()): Handle the week that runs over the end of the year and the beginning of the next one, so that it is numbered the same in both years. (getBaseWeekOfYear(int,int,int)): Broken out of computeFields to avoid code duplication. (getRelativeWeekday(int)): Likewise. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* PR64109: Missing symbol in libjavautil.soAndrew John Hughes2014-11-283-0/+10
| | | | | | | | | | | 2014-11-28 Andrew John Hughes <gnu_andrew@member.fsf.org> PR classpath/64109 * NEWS: Updated. * native/jni/java-util/Makefile.am: Link against jcl library. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Add 0.99 release to web site.Andrew John Hughes2014-10-144-4/+198
| | | | | | | | | | | | | 2014-09-15 Guillermo Rodriguez <guille.rodriguez@gmail.com> * doc/www.gnu.org/announce/20120307.wml: Add 0.99 release announcement. * doc/www.gnu.org/downloads/downloads.wml: List 0.99. Move to 0.98 to previous releases. * doc/www.gnu.org/newsitems.txt: Add 0.99 news item. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Allow warnings from the Java compiler to be turned on and off.Andrew John Hughes2014-10-136-6/+97
| | | | | | | | | | | | | | | | | | | 2014-10-13 Andrew John Hughes <gnu_andrew@member.fsf.org> * configure.ac: Add --enable-warnings so warnings can be turned on and off. Invoke IT_USING_ECJ during compiler checks. * examples/Makefile.am: Split options for GCJ, javac and ecj. * lib/Makefile.am: Likewise. * m4/acinclude.m4: (IT_USING_ECJ): New macro taken from IcedTea to detect the use of ecj. * tools/Makefile.am: Split options for GCJ, javac and ecj. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Implement AbstractAnnotationValueVisitor6.Andrew John Hughes2014-10-133-0/+140
| | | | | | | | | | | | | | | 2014-05-04 Andrew John Hughes <gnu_andrew@member.fsf.org> * javax/lang/model/util/AbstractAnnotationValueVisitor6.java: New abstract class. (AbstractAnnotationValueVisitor6()): Implemented. (visit(AnnotationValue)): Likewise. (visit(AnnotationValue, P)): Likewise. (visitUnknown(AnnotationValue, P)): Likewise. * javax/lang/model/util/AbstractElementVisitor6.java: (visitUnknown(Element,P)): Add missing Override annotation. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Fix majority of warnings in gnu.java.security.* and java.security.*.Andrew John Hughes2014-10-13159-1134/+1766
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also fixes PR58688 as a consequence. 2014-10-09 Andrew John Hughes <gnu_andrew@member.fsf.org> * NEWS: Updated. * gnu/java/security/util/IntegerUtil.java: Removed. Methods are available in java.lang.Integer. * gnu/java/security/Engine.java: Add missing type parameters to Class, Constructor and Enumeration. * gnu/java/security/OID.java: Add type parameter to Comparable implementation. (compareTo(OID)): Changed from compareTo(Object). Remove now redundant cast. * gnu/java/security/Properties.java: Add type parameters to HashMap. (getProperty(String)): Remove redundant cast. (init()): Use generic implementation of PrivilegedAction. Add properties in a for-each loop to get correct types. * gnu/java/security/action/SetAccessibleAction.java: Use generic implementation of PrivilegedAction. * gnu/java/security/ber/BEREncodingException.java: Add explicit serialVersionUID. * gnu/java/security/der/BitString.java: Add type parameter to Comparable implementation. (compareTo(BitString)): Changed from compareTo(Object). Remove now redundant cast. * gnu/java/security/der/DEREncodingException.java: Add explicit serialVersionUID. * gnu/java/security/der/DERWriter.java: (write(OutputStream,DERValue)): Cast List and Set to correct generic versions. (writeSequence(OutputStream,List)): Add type parameters. Drop now redundant cast. (writeSet(OutputStream,Set)): Likewise. * gnu/java/security/hash/HashFactory.java: (getNames()): Add type parameters. * gnu/java/security/hash/Whirlpool.java: Drop unused byte array. * gnu/java/security/jce/prng/HavalRandomSpi.java: Add explicit serialVersionUID. * gnu/java/security/jce/prng/MD2RandomSpi.java: Likewise. * gnu/java/security/jce/prng/MD4RandomSpi.java: Likewise. * gnu/java/security/jce/prng/MD5RandomSpi.java: Likewise. * gnu/java/security/jce/prng/RipeMD128RandomSpi.java: Likewise. * gnu/java/security/jce/prng/RipeMD160RandomSpi.java: Likewise. * gnu/java/security/jce/prng/SecureRandomAdapter.java: Likewise. Drop unused mdName variable. Remove redundant casts. Add Override annotation to interface implementation. * gnu/java/security/jce/prng/Sha160RandomSpi.java: Add explicit serialVersionUID. * gnu/java/security/jce/prng/Sha256RandomSpi.java: Likewise. * gnu/java/security/jce/prng/Sha384RandomSpi.java: Likewise. * gnu/java/security/jce/prng/Sha512RandomSpi.java: Likewise. * gnu/java/security/jce/prng/TigerRandomSpi.java: Likewise. * gnu/java/security/jce/prng/WhirlpoolRandomSpi.java: Likewise. * gnu/java/security/jce/sig/DSSKeyFactory.java: Add Override annotation to interface implementation. (engineGetKeySpec(Key,Class)): Update return type. Use keySpec.cast to cast newly created instances to the correct type. * gnu/java/security/jce/sig/DSSKeyPairGeneratorSpi.java: Add missing type parameters and Override annotations. * gnu/java/security/jce/sig/DSSParameters.java: Add Override annotation to interface implementation. (engineGetParameterSpec(Class)): Update return type. Use paramSpec.cast to cast new instances to correct type. (engineGetEncoded()): Add missing type parameter to list. * gnu/java/security/jce/sig/EncodedKeyFactory.java: Add type parameters and Override annotations. (engineGetKeySpec(Key,Class)): Update return type. Use keySpec.cast to cast new instances to correct type. * gnu/java/security/jce/sig/RSAKeyFactory.java: Add @Override annotation. Drop unused variables. (engineGetKeySpec(Key,Class)): Update return type. Use keySpec.cast to cast new instances to correct type. * gnu/java/security/jce/sig/RSAKeyPairGeneratorSpi.java: Add type parameters. * gnu/java/security/jce/sig/SignatureAdapter.java: Add type parameters and Override annotation. * gnu/java/security/key/IKeyPairGenerator.java: (setup(Map)): Add type parameters. * gnu/java/security/key/KeyPairCodecFactory.java: Add type parameters. * gnu/java/security/key/KeyPairGeneratorFactory.java: Likewise. * gnu/java/security/key/dss/DSSKey.java: Add explicit serialVersionUID. * gnu/java/security/key/dss/DSSKeyPairGenerator.java: Add type parameters and Override annotations. * gnu/java/security/key/dss/DSSKeyPairPKCS8Codec.java: Likewise. * gnu/java/security/key/dss/DSSKeyPairX509Codec.java: Add type parameters. * gnu/java/security/key/dss/DSSPrivateKey.java: Add explicit serialVersionUID. * gnu/java/security/key/dss/DSSPublicKey.java: Likewise. * gnu/java/security/key/rsa/GnuRSAKey.java: Likewise. * gnu/java/security/key/rsa/GnuRSAPrivateKey.java: Likewise. * gnu/java/security/key/rsa/GnuRSAPublicKey.java: Likewise. * gnu/java/security/key/rsa/RSAKeyPairGenerator.java: Add Override annotations and type parameters. * gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java: Add missing type parameters on ArrayList instances. * gnu/java/security/key/rsa/RSAKeyPairX509Codec.java: Add Override annotations and type parameters. * gnu/java/security/pkcs/PKCS7SignedData.java: (PKCS7SignedData(BERReader)): Add a type parameter to the algId list and ensure all additions are homogenous. Add other missing type parameters. (PKCS7SignedData(Set,PKCS7Data,Certificate[],X509CRL[],Set)): Add missing type parameters. (getDigestAlgorithms()): Do a deep copy of the set. (getSignerInfos()): Add type parameters. (encode(OutputStream)): Likewise. * gnu/java/security/pkcs/SignerInfo.java: Drop unused variable, count. Add type parameters. (encode(OutputStream)): Include derAuthenticatedAttributes and derUnauthenticatedAttributes in signerInfo. * gnu/java/security/prng/BasePRNG.java: Add type parameters and Override annotations. * gnu/java/security/prng/IRandom.java: Add type parameters. * gnu/java/security/prng/LimitReachedException.java: Add explicit serialVersionUID. * gnu/java/security/prng/MDGenerator.java: Add type parameters and Override annotations. * gnu/java/security/prng/PRNGFactory.java: Add missing type parameters. * gnu/java/security/prng/RandomEvent.java: Add explicit serialVersionUID. * gnu/java/security/provider/CollectionCertStoreImpl.java: Add Override annotation and missing type parameters. * gnu/java/security/provider/Gnu.java: Add explicit serialVersionUID. Parameterise implementation of PrivilegedAction. * gnu/java/security/provider/PKIXCertPathValidatorImpl.java: Add missing type parameters. Remove unused qualifierInfos variable. * gnu/java/security/provider/X509CertificateFactory.java: Add Override annotations and type parameters. * gnu/java/security/sig/BaseSignature.java: Likewise. * gnu/java/security/sig/ISignature.java: Add type parameters. * gnu/java/security/sig/SignatureCodecFactory.java: Likewise. * gnu/java/security/sig/SignatureFactory.java: Likewise. * gnu/java/security/sig/dss/DSSSignature.java: Add Override annotations and type parameters. * gnu/java/security/sig/dss/DSSSignatureX509Codec.java: Add type parameter to ArrayList instance. * gnu/java/security/sig/rsa/EMSA_PKCS1_V1_5.java: Remove unused hLen variable. * gnu/java/security/sig/rsa/RSASignatureFactory.java: Add type parameters. * gnu/java/security/util/PRNG.java: (getInstance()): Move initialisation code to shared method, initialiseDelegate. (nextBytes(byte[],int,int)): Call out to initialiseDelegate to re-initialise. (initialiseDelegate(IRandom)): New common method for shared code. * gnu/java/security/util/Sequence.java: Add Override annotation and type parameters. * gnu/java/security/util/SimpleList.java: Add type parameters. * gnu/java/security/x509/GnuPKIExtension.java: Likewise. * gnu/java/security/x509/PolicyNodeImpl.java: Add type parameters and Override annotations. (addAllPolicyQualifiers(Collection)): Qualify reference to addAll. * gnu/java/security/x509/X500DistinguishedName.java: Add type parameters. * gnu/java/security/x509/X509CRL.java: Remove unused variable algParams. Add type parameters and Override annotations. * gnu/java/security/x509/X509CRLEntry.java: Add type parameters and Override annotations. * gnu/java/security/x509/X509CRLSelectorImpl.java: Likewise. * gnu/java/security/x509/X509CertPath.java: Add type parameters. (pkcsEncoded): Renamed from pkcs_encoded. (pkiEncoded): Renamed from pki_encoded. * gnu/java/security/x509/X509CertSelectorImpl.java: Add type parameters and Override annotations. * gnu/java/security/x509/X509Certificate.java: Likewise. * gnu/java/security/x509/ext/BasicConstraints.java: Add type parameters. * gnu/java/security/x509/ext/CertificatePolicies.java: Likewise. * gnu/java/security/x509/ext/PolicyMappings.java: Likewise. * gnu/javax/crypto/cipher/IBlockCipher.java: Add type parameters. * gnu/javax/crypto/jce/prng/FortunaImpl.java: (engineSetSeed(byte[])): Add cast for singletonMap invocation. * gnu/javax/crypto/key/dh/DHKeyPairPKCS8Codec.java: Add type parameters. * gnu/javax/crypto/key/dh/DHKeyPairX509Codec.java: Likewise. * gnu/javax/crypto/mac/IMac.java: Likewise. * gnu/javax/crypto/mode/BaseMode.java: Add Override annotations and type parameters. * gnu/javax/crypto/mode/EAX.java: Add Override annotations, type parameters and casts for singletonMap invocations. * gnu/javax/crypto/prng/Fortuna.java: Likewise. * gnu/javax/net/ssl/Session.java: Add Override annotations and type parameters. * gnu/javax/net/ssl/provider/AbstractHandshake.java: Fix type parameters. * gnu/javax/net/ssl/provider/SSLRandom.java: Add Override annotations and type parameters. * gnu/javax/net/ssl/provider/TLSRandom.java: Likewise. (hmacSHA): Renamed from hmac_sha. (hmacMD5): Renamed from hmac_md5. * gnu/javax/net/ssl/provider/Util.java: (transform(Object,Class,String,Object[])): Use a type parameter T rather than Object. * gnu/javax/net/ssl/provider/X509KeyManagerFactory.java: Add type parameters. * gnu/javax/net/ssl/provider/X509TrustManagerFactory.java: Likewise. * gnu/javax/security/auth/callback/AWTCallbackHandler.java: Replace calls to deprecated show() with setVisible(true). (ACTION_NO): Remove unused variable. (ACTION_YES): Likewise. * gnu/javax/security/auth/callback/ConsoleCallbackHandler.java: Add type parameters. * gnu/javax/security/auth/callback/GnuCallbacks.java: Add explicit serialVersionUID. Convert PrivilegedAction implementation to parameterised version. * gnu/javax/security/auth/login/ConfigFileParser.java: Add type parameters. * gnu/javax/security/auth/login/GnuConfiguration.java: Likewise. Fix typo. * java/security/AccessControlContext.java: Add type parameters. * java/security/AllPermission.java: Add Override annotations. (AllPermissionCollection.elements()): Add type parameter to return type and return appropriately typed enumerations. * java/security/BasicPermission.java: Add type parameters and Override annotations. * java/security/CodeSource.java: Likewise. * java/security/DummySignature.java: Add Override annotations. * java/security/Identity.java: Add type parameters. * java/security/IntersectingDomainCombiner.java: Likewise. * java/security/KeyPairGenerator.java: Add Override annotations. * java/security/Permissions.java: Add type parameters and Override annotations. (elements()): Rename main_enum and sub_enum to mainEnum and subEnum respectively. * java/security/Policy.java: Add type parameters. * java/security/SecureRandom.java: Add missing type parameter. Remove unused imports. * java/security/Security.java: Add type parameters. Fix mis-spelling of 'query'. * java/security/SignatureSpi.java: Add Override annotation. * java/security/UnresolvedPermission.java: Add Override annotations and type parameters. (elements()): Rename main_enum and sub_enum to mainEnum and subEnum respectively. * java/security/cert/CertPath.java: Add type parameters. * java/security/cert/CertPathValidator.java: (getDefaultType()): Use GetSecurityPropertyAction rather than implementing PrivilegedAction locally. * java/security/cert/CertStore.java: (getDefaultType()): Use GetSecurityPropertyAction rather than implementing PrivilegedAction locally. * java/security/cert/CollectionCertStoreParameters.java: Add type parameters and Override annotations. * java/security/cert/PKIXParameters.java: Add type parameters. * java/security/cert/X509CRLSelector.java: Add type parameters. (getIssuerNames()): Return a deep copy. * java/security/cert/X509CertSelector.java: Add type parameters. * java/util/Properties.java: Add type parameters. (stringPropertyNames()): Implemented. * javax/naming/directory/BasicAttribute.java: Add Override annotations and missing type parameter. * javax/security/auth/AuthPermission.java: Add explicit serialVersionUID. * javax/security/auth/DestroyFailedException.java: Likewise. * javax/security/auth/PrivateCredentialPermission.java: Add type parameters. (equals(Object)): Use thatPrincipals instead of that_principals. (implies(Permission)): Likewise. (CredOwner): Add explicit serialVersionUID. * javax/security/auth/RefreshFailedException.java: Add explicit serialVersionUID. * javax/security/auth/Subject.java: Add type parameters and Override annotations. * javax/security/auth/SubjectDomainCombiner.java: Add type parameters. * javax/security/auth/callback/ChoiceCallback.java: Add explicit serialVersionUID. * javax/security/auth/callback/ConfirmationCallback.java: Likewise. * javax/security/auth/callback/LanguageCallback.java: Likewise. * javax/security/auth/callback/NameCallback.java: Likewise. * javax/security/auth/callback/PasswordCallback.java: Likewise. * javax/security/auth/callback/TextInputCallback.java: Likewise. * javax/security/auth/callback/TextOutputCallback.java: Likewise. * javax/security/auth/callback/UnsupportedCallbackException.java: Likewise. * javax/security/auth/kerberos/DelegationPermission.java: Re-enable explicit serialVersionUID. Add Override annotations and type parameters. * javax/security/auth/kerberos/KerberosPrincipal.java: Re-enable explicit serialVersionUID. * javax/security/auth/kerberos/KerberosTicket.java: Suppress warning about unused asn1Encoding variable. * javax/security/auth/kerberos/KeyImpl.java: Re-enable explicit serialVersionUID. * javax/security/auth/kerberos/ServicePermission.java: Re-enable explicit serialVersionUID. Add Override annotations and type parameters. * javax/security/auth/login/AppConfigurationEntry.java: Add type parameters. * javax/security/auth/login/Configuration.java: Likewise. * javax/security/auth/login/LoginContext.java: Likewise. * javax/security/auth/x500/X500Principal.java: Likewise. (fixed): Remove unused variable. * javax/security/cert/CertificateEncodingException.java: Add explicit serialVersionUID. * javax/security/cert/CertificateException.java: Likewise. * javax/security/cert/CertificateExpiredException.java: Likewise. * javax/security/cert/CertificateNotYetValidException.java: Likewise. * javax/security/cert/CertificateParsingException.java: Likewise. * javax/security/sasl/AuthenticationException.java: Likewise. * javax/security/sasl/RealmCallback.java: Likewise. * javax/security/sasl/RealmChoiceCallback.java: Likewise. * javax/security/sasl/Sasl.java: Add type parameters. * tools/gnu/classpath/tools/jarsigner/SFHelper.java: Likewise. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Add missing IOException constructors.Andrew John Hughes2014-05-072-0/+32
| | | | | | | | | | 2014-05-07 Andrew John Hughes <gnu_andrew@member.fsf.org> * java/io/IOException.java: (IOException(String,Throwable)): Add missing constructor. (IOException(Throwable)): Likewise. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Remove obsolete Solaris 9 support.Andrew John Hughes2014-04-303-7/+9
| | | | | | | | | | | 2014-04-30 Andrew John Hughes <gnu_andrew@member.fsf.org> * configure.ac: Remove check for sys/loadavg.h used by Solaris 9. * native/jni/java-lang/gnu_java_lang_management_VMOperatingSystemMXBeanImpl.c: Remove Solaris 9 ifdef and update copyright header. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Add file changes for last commitAndrew John Hughes2014-04-302-6/+8
| | | | Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Use correct inclusion method, allowing builds with FreeType >=2.5.3.Andrew John Hughes2014-04-301-0/+7
| | | | | | | | | | | 2014-04-20 Andrew John Hughes <gnu_andrew@member.fsf.org> * native/jni/gtk-peer/gnu_java_awt_peer_gtk_FreetypeGlyphVector.c: Use correct inclusion method, allowing builds with >=2.5.3. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c: Likewise. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Fix issues with parallel make.Andrew John Hughes2014-04-202-7/+17
| | | | | | | | | | | | | | | | 2014-04-14 Andrew John Hughes <gnu_andrew@member.fsf.org> Fix issues with parallel make. * lib/Makefile.am: (.PHONY): Remove genclasses; no longer phony. (classes): Remove. (genclasses): Touch genclasses to mark completion. (gen-xpath-parser): Touch gen-xpath-parser to mark completion. (compile-classes): Depend on genclasses directly. (CLEANFILES): Remove gen-xpath-parser and genclasses. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Update javax.lang.model, javax.lang.model.element and javax.lang.model.type ↵Andrew John Hughes2013-09-0416-26/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | packages to 1.7. 2013-09-04 Andrew John Hughes <gnu_andrew@member.fsf.org> * javax/lang/model/SourceVersion.java: (RELEASE_7): New enum value. * javax/lang/model/UnknownEntityException.java: New exception class. (UnknownEntityException(String)): New constructor. * javax/lang/model/element/ElementKind.java: (RESOURCE_VARIABLE): New enum value. * javax/lang/model/element/ExecutableElement.java: Extend mixin interface Parameterizable. * javax/lang/model/element/PackageElement.java: Extend mixin interface QualifiedNameable. * javax/lang/model/element/Parameterizable.java: New interface. (getTypeParameters()): New method. * javax/lang/model/element/QualifiedNameable.java: New interface. (getQualifiedName()): New method. * javax/lang/model/element/TypeElement.java: Extend mixin interfaces Parameterizable and QualifiedNameable. * javax/lang/model/element/UnknownAnnotationValueException.java: Extend UnknownEntityException instead of RuntimeException. (UnknownAnnotationValueException(AnnotationValue,Object)): Call superclass with error message. * javax/lang/model/element/UnknownElementException.java: Extend UnknownEntityException instead of RuntimeException. (UnknownElementException(Element,Object)): End sentence with a full stop, not a comma. * javax/lang/model/type/MirroredTypeException.java: Extend MirroredTypesException instead of RuntimeException. (mirror): Removed. (MirroredTypeException(TypeMIrror)): Store mirror using list in superclass rather than a local variable. (getTypeMirror()): Return first (and only) element from getTypeMirrors(). * javax/lang/model/type/TypeKind.java: (UNION): New enum value. * javax/lang/model/type/TypeVisitor.java: (visitUnion(UnionType,P)): New method. * javax/lang/model/type/UnionType.java: New interface. (getAlternatives()): New method. * javax/lang/model/type/UnknownTypeException.java, Extend UnknownEntityException instead of RuntimeException. (UnknownTypeException(TypeMirror,Object)): Call superclass with error message. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Fix bad use of gccoptlist in cp-tools.texinfo.Andrew John Hughes2013-08-072-1/+6
| | | | | | | | | 2013-08-07 Andrew John Hughes <gnu_andrew@member.fsf.org> * doc/cp-tools.texinfo: Fix bad use of gccoptlist. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Merge branch 'master' of ../classpathAndrew John Hughes2013-08-072-5/+332
|\ | | | | | | | | Conflicts: ChangeLog
| * Add methods for Iterables to ElementFilter.Andrew John Hughes2013-08-062-5/+332
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2013-07-03 Andrew John Hughes <gnu_andrew@member.fsf.org> * javax/lang/model/util/ElementFilter.java: (typesIn(Iterable)): Implemented. (constructorsIn(Iterable)): Likewise. (fieldsIn(Iterable)): Likewise. (methodsIn(Iterable)): Likewise. (packagesIn(Iterable)): Likewise. (FilteredList(Iterable,ElementKind...)): Fix documentation. (FilteredIterator): Make non-final so it can be subclassed. (FilteredIterator.kinds): Make protected, allowing access form subclass. (FilteredList): New class. (FilteredList.elements): The filtered Iterable. (FilteredList.kinds): The kinds to allow. (FilteredList.FilteredList(Iterable,ElementKind...)): New constructor. (FilteredList.listIterator(int)): New method. (FilteredList.size()): Likewise. (FilteredListIterator): New class. (FilteredListIterator.listIterator): The underlying iterator. (FilteredListIterator.index): The position. (FilteredListIterator.cache): The cache of elements. (FilteredListIterator.FilteredListIterator(iterator, index,kinds)): New constructor. (FilteredListIterator.next()): New method. (FilteredListIterator.add(E)): Likewise. (FilteredListIterator.hasPrevious()): Likewise. (FilteredListIterator.previous()): Likewise. (FilteredListIterator.nextIndex()): Likewise. (FilteredListIterator.previousIndex()): Likewise. (FilteredListIterator.set(E)): Likewise.
* | Mention PR57070 being fixed in NEWS.Andrew John Hughes2013-07-102-0/+5
| | | | | | | | | | | | | | | | 2013-07-10 Andrew John Hughes <gnu_andrew@member.fsf.org> * NEWS: Mention PR57070. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* | Make resources for AicasGraphicsBenchmark example work within the examples zip.Andrew John Hughes2013-06-062-2/+8
| | | | | | | | | | | | | | | | | | | | 2013-06-06 Andrew John Hughes <gnu_andrew@member.fsf.org> * examples/gnu/classpath/examples/awt/AicasGraphicsBenchmark.java: (AicasGraphicsBenchmark()): Use absolute paths to resources so they work within the zip file. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* | Allow builds with -Werror with GLib >= 2.32.Andrew John Hughes2013-06-063-0/+12
|/ | | | | | | | | | | 2013-06-06 Andrew John Hughes <gnu_andrew@member.fsf.org> * native/jni/gstreamer-peer/gst_classpath_src.c: Define GLIB_DISABLE_DEPRECATION_WARNINGS so the use of GStaticRecMutex in GStreamer still works. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c: (init_glib_threads(JNIEnv,jint,jobject)): Only call g_thread_init on GLib < 2.32.
* Fix missing bracket.Andrew John Hughes2013-06-042-1/+6
| | | | | | | | | 2013-06-04 Andrew John Hughes <gnu_andrew@member.fsf.org> * gnu/java/security/PolicyFile.java: (parse(URL)): Fix missing bracket. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Fix warnings in gnu.java.security.PolicyFileAndrew John Hughes2013-05-312-34/+46
| | | | | | | | | | | | | | | | | 2013-05-26 Andrew John Hughes <gnu_andrew@member.fsf.org> * gnu/java/security/PolicyFile.java: (fs): Remove unnecessary cast. (DEFAULT_POLICY): Likewise. (DEFAULT_USER_POLICY): Likewise. (cs2pc): Add type parameters. (PolicyFile): Likewise. (getPermissions(CodeSource)): Use for-each loops and remove unnecessary casts. (refresh()): Add missing type parameters. (parse(URL)): Likewise and remove unnecessary casts. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Fix warnings in gnu.java.net classes.Andrew John Hughes2013-05-264-11/+26
| | | | | | | | | | | | | | | | | | | | | 2013-05-26 Andrew John Hughes <gnu_andrew@member.fsf.org> * gnu/java/net/loader/JarURLLoader.java: (indexSet): Add type parameter. (JarURLLoader(URLClassLoader,URLStreamHandlerCache, URLStreamHandlerFactory,URL,URL,Set)): Add type parameter to Set. * gnu/java/net/loader/URLLoader.java: (getClass(String)): Add type parameter to return type. * gnu/java/net/protocol/http/HTTPConnection.java: (run()): Remove redundant cast. (get(String,int,boolean,int,int)): Add type parameter to ListIterator and drop cast. (removeOldest()): Remove redundant cast. (getSocket()): Add type parameter to Iterator and drop cast. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Use notifyAll, not notify, in VMProcess.Andrew John Hughes2013-05-263-3/+15
| | | | | | | | | | | | | | | 2013-05-26 Andrew John Hughes <gnu_andrew@member.fsf.org> * THANKYOU: List Carl Ritson. 2013-04-25 Carl Ritson <C.G.Ritson@kent.ac.uk> * vm/reference/java/lang/VMProcess.java, (ProcessThread.run()): Use notifyAll not notify. (ProcessThread.spawn()): Likewise. (VMProcess(String[],String[],File,boolean)): Likewise. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Fix warnings in TreeMap and TreeSet.Andrew John Hughes2013-05-263-134/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2013-02-17 Andrew John Hughes <gnu_andrew@member.fsf.org> Fix warnings. * java/util/TreeMap.java: (nil): Add type parameters. (root): Likewise. (left): Don't set to nil here. (right): Likewise. (parent): Likewise. (Node(K,V,int)): Set left, right and parent here using correctly typed nil. (TreeMap()): Cast Comparator with type parameters. (TreeMap(Map)): Likewise. (TreeMap(SortedMap)): Remove unused variable. Use for-each loop and typed nil. (clone()): Separate cast and cloning. Add type parameters to node and cnode. (containsKey(Object)): Cast key. (containsvalue()): Add type parameters to node. (get(Object)): Cast key. (headMap(K,boolean)): Likewise. (put(K,V)): Cast nil before assigning to parent. Add type parameters to n. (putAll(Map)): Rewrite using for-each loop. (remove(Object)): Cast key. (tailMap(K,boolean)): Likewise. (values()): Add type parameter to iterator. (compare(K,K)): Suppress warnings. (fabricateTree(int)): Use typed nil. Add type parameters to root, row, parent, last, left, right and next. (firstNode()): Add type parameters to node. (highestLessThan(K,boolean)): Use typed nil. (insertFixup(Node)): Add type parameters to uncle. (lastNode()): Add type parameters to node. (lowestGreaterThan(K,boolean,boolean)): Use typed nil. (predecessor(Node)): Add type parameters to parent. (putFromObjStream(ObjectInputStream,int,V)): Pass value with type rather than using String. Add type parameter to node. (putKeysLinear(Iterator,int,V)): Pass in value rather than using empty string. (readObject(ObjectInputStream)): Call putFromObjStream with null rather than true. (removeNode(Node)): Add type parameters to parent. (rotateLeft(Node)): Add type parameters to child. (rotateRight(Node)): Likewise. (writeObject(ObjectOutputStream)): Add type parameters to node. (TreeIterator): Add type parameter. (TreeIterator.last): Likewise. (TreeIterator.next): Likewise. (TreeIterator.max): Likewise. (TreeIterator.TreeIterator(int)): Cast nil. (TreeIterator.TreeIterator(int,Node,Node)): Add type parameters. (TreeIterator.next()): Suppress warnings and cast to correct type. (descendingMap()): Add type parameters. (clear()): Add type parameters to next, max and current. (SubMap.containsKey(Object)): Fix casting of key. (SubMap.containsValue(Object)): Add type parameters to node and max. (SubMap.get(Object)): Fix casting of key. (SubMap.remove(Object)): Likewise. (SubMap.size()): Add type parameters to node and max. (SubMap.values()): Add type parameter to AbstractCollection, first, max and TreeIterator. (SubMap.KeySet.iterator()): Add type parameters to first and max. (SubMap.KeySet.contains(Object)): Fix casting of key. (SubMap.KeySet.remove(Object)): Likewise. (SubMap.NavigableKeySet.descendingSet()): Add type parameter to DescendingSet. (SubMap.EntrySet.iterator()): Add type parameters to first and max. (SubMap.EntrySet.contains(Object)): Fix casting of entry. (SubMap.EntrySet.remove(Object)): Likewise. (SubMap.NavigableEntrySet.descendingSet()): Add type parameter to DescendingSet. (SubMap.NavigableEntrySet.tailSet(Entry,boolean)): Return entry set, not key set. (DescendingMap.headMap(DK,boolean)): Add type parameters. (DescendingMap.subMap(DK,boolean,DK,boolean)): Likewise. (DescendingMap.tailMap(Dk,boolean)): Likewise. (DescendingMap.values()): Add type parameter to AbstractCollection. (KeySet.iterator()): Add type parameter to TreeIterator. (KeySet.remove(Object)): Fix casting of key. (NavigableKeySet.headSet(D,boolean)): Add type parameter. (NavigableKeySet.subSet(D,boolean,D,boolean)): Likewise. (NavigableKeySet.tailSet(D,boolean)): Likewise. (NavigableKeySet.toArray()): Suppress warnings on cast. (NavigableKeySet.toArray(T[])): Likewise. (EntrySet.iterator()): Add type parameter to TreeIterator. (EntrySet.contains(Object)): Fix casting of entry. (EntrySet.remove(Object)): Likewise. (NavigableEntrySet.descendingSet()): Add type parameter to DescendingSet. (NavigableEntrySet.tailSet(Entry,boolean)): Return entry set, not key set. * java/util/TreeSet.java: (TreeSet(SortedSet)): Explicitly pass empty String to putKeysLinear as it no longer defaults to this. (readObject(ObjectInputStream)): Pass empty String rather than false, which will in turn make "" == null return false in putFromObjStream. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Check for gettext m4 macros in autogen.shPekka Enberg2013-03-122-0/+12
| | | | | | | | | | | | | | | | | | If gettext-devel package is not installed on Fedora, autogen.sh fails as follows: [penberg@tux classpath]$ sh autogen.sh configure.ac:505: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but not m4_defun'd m4/iconv.m4:11: AM_ICONV_LINKFLAGS_BODY is expanded from... m4/iconv.m4:22: AM_ICONV_LINK is expanded from... m4/iconv.m4:77: AM_ICONV is expanded from... Make the script more user fiendly by explicitly checking for the presence of gettext.m4 in the system. Cc: Andrew John Hughes <gnu_andrew@member.fsf.org> Cc: Brian Jones <cbjones1@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
* Add autogen-generated files to gitignorePekka Enberg2013-03-112-0/+6
| | | | | | | Make sure "git status" does not show up files after autogen.sh has been run. Signed-off-by: Pekka Enberg <penberg@kernel.org>
* Fix warnings in gnu.classpath.* code (mainly the JDWP implementation).Andrew John Hughes2013-03-0545-212/+422
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2013-03-04 Andrew John Hughes <gnu_andrew@member.fsf.org> * gnu/classpath/Pair.java: (equals(Object)): Cast to Pair<?,?> not Pair<A,B> as we don't know that the objects held by the pair are of the same type. * gnu/classpath/ServiceProviderLoadingAction.java: (run()): Suppress warning as we check the loaded class is an instance of P. * gnu/classpath/jdwp/Jdwp.java: (_properties): Add type parameters. (notify(Event[])): Likewise. (_processConfigury(String)): Likewise. * gnu/classpath/jdwp/event/ClassPrepareEvent.java: (_class): Add type parameter. (ClassPrepareEvent(Thread,class,int)): Likewise. * gnu/classpath/jdwp/event/ClassUnloadEvent.java: (writeData(DataOutputStream)): Don't store result of getDefault() call as unused. Retain for side-effects. * gnu/classpath/jdwp/event/EventManager.java: (_requests): Add type parameters. (EventManager()): Likewise & use Byte.valueOf rather than new. (getEventRequests(Event)): Likewise and remove unneeded cast. (requestEvent(EventRequest)): Add type parameters, remove unneeded cast and use Integer.valueOf rather than new. (deleteRequest(byte,int)): Add type parameters, use valueOf methods instead of constructors and drop unneeded cast. (clearRequests(byte)): Add type parameters and use Byte.valueOf. (getRequest(byte,int)): Likewise and drop unused cast and use Integer.valueOf. (getRequests(byte)): Add type parameters and use Byte.valueOf. * gnu/classpath/jdwp/event/EventRequest.java: (_filters): Add type parameter. (EventRequest(byte,byte)): Likewise. (EventRequest(int,byte,byte)): Likewise. (addFilter(IEventFilter)): Likewise. (getFilters()): Likewise. (matches(Event)): Likewise and remove unneeded cast. * gnu/classpath/jdwp/event/ExceptionEvent.java: (_klass): Add type parameter. (ExceptionEvent(Throwable,Thread,Location,Location, Class,Object)): Likewise. * gnu/classpath/jdwp/event/filters/ClassMatchFilter.java: (matches(Event)): Add type parameter. * gnu/classpath/jdwp/event/filters/ClassOnlyFilter.java: (matches(Event)): Add type parameters. * gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java: (matches(Event)): Add type parameter. * gnu/classpath/jdwp/event/filters/FieldOnlyFilter.java: (FieldOnlyFilter(ReferenceTypeId,ReferenceTypeId)): Avoid throwing a NullPointerException by using new constructors for InvalidClassException and InvalidFieldException. * gnu/classpath/jdwp/exception/InvalidClassException.java: (InvalidClassException()): New constructor for when there is no ID (i.e. null was passed). * gnu/classpath/jdwp/exception/InvalidFieldException.java (InvalidFieldException()): New constructor for when there is no ID (i.e. null was passed). * gnu/classpath/jdwp/id/ClassLoaderId.java: (typeClass): Add type parameter. * gnu/classpath/jdwp/id/ClassObjectId.java, (typeClass): Add type parameter. (getClassObject()): Add type parameters. * gnu/classpath/jdwp/id/JdwpId.java: (_reference): Add type parameter. (getReference()): Likewise. (setReference(SoftReference)): Likewise. * gnu/classpath/jdwp/id/NullObjectId.java: (typeClass): Add type parameter. (NullObjectId()): Change type parameter to same used by superclass. * gnu/classpath/jdwp/id/ObjectId.java: (typeClass): Add type parameter. * gnu/classpath/jdwp/id/ReferenceTypeId.java: (getType()): Add type parameters. * gnu/classpath/jdwp/id/StringId.java, * gnu/classpath/jdwp/id/ThreadGroupId.java, * gnu/classpath/jdwp/id/ThreadId.java: (typeClass): Add type parameter. * gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java: (executeGetvalues(ByteBuffer,DataOutputStream)): Add type parameter. (executeSetValues(ByteBuffer,DataOutputStream)): Likewise. * gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java: (executeNewInstance(ByteBuffer,DataOutputStream)): Add type parameters. * gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java: (executeVisibleClasses(ByteBuffer,DataOutputStream)): Add type parameters. Hide warnings from VM layer for now. * gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java: (executeReflectedType(ByteBuffer,DataOutputStream)): Add type parameter. * gnu/classpath/jdwp/processor/ClassTypeCommandSet.java: (executeSuperclass(ByteBuffer,DataOutputStream)): Add type parameter. (executeSetValues(ByteBuffer,DataOutputStream)): Call readReferenceTypeId only for side effect of changing the ByteBuffer. Result not needed. (invokeMethod(ByteBuffer)): Add type parameter. * gnu/classpath/jdwp/processor/MethodCommandSet.java: (executeLineTable(ByteBuffer,DataOutputStream)): Add type parameter. (executeVariableTable(ByteBuffer,DataOutputStream)): Likewise. (executeByteCodes(ByteBuffer,DataOutputStream)): Likewise. * gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java: (executeReferenceType(ByteBuffer,DataOutputStream)): Add type parameter. (executeInvokeMethod(ByteBuffer,DataOutputStream)): Likewise. * gnu/classpath/jdwp/processor/PacketProcessor.java: Add type parameter to implemented interface. (run()): Change return type to match type parameter. * gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java: (executeClassLoader(ByteBuffer,DataOutputStream)): Add type parameter. (executeModifiers(ByteBuffer,DataOutputStream)): Likewise. (executeFields(ByteBuffer,DataOutputStream)): Likewise. (executeMethods(ByteBuffer,DataOutputStream)): Likewise. (executeGetValues(ByteBuffer,DataOutputStream)): Likewise. (executeSourceFile(ByteBuffer,DataOutputStream)): Likewise. (executeNestedTypes(ByteBuffer,DataOutputStream)): Add type parameters. (executeStatus(ByteBuffer,DataOutputStream)): Add type parameter. (executeInterfaces(ByteBuffer,DataOutputStream)): Add type parameters. (executeClassObject(ByteBuffer,DataOutputStream)): Add type parameter. * gnu/classpath/jdwp/processor/StackFrameCommandSet.java: (runCommand(ByteBuffer,DataOutputStream,byte)): Remove unused keepRunning variable. * gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java: (executeFrames(ByteBuffer,DataOutputStream)): Add type parameter, suppressing warnings from VM layer until fixed. Remove unnecessary cast. * gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java: (executeClassesBySignature(ByteBuffer,DataOutputStream)): Add type parameters, suppressing warnings from VM layer. (executeAllClasses(ByteBuffer,DataOutputStream)): Likewise. (executeRedefineClasses(ByteBuffer,DataOutputStream)): Add type parameter. * gnu/classpath/jdwp/transport/ITransport.java: (configure(HashMap)): Add type parameters. * gnu/classpath/jdwp/transport/JdwpConnection.java: (_commandQueue): Add type parameter. (JdwpConnection(ThreadGroup,ITransport)): Likewise. (getPacket()): Remove unnecessary cast. * gnu/classpath/jdwp/transport/JdwpPacket.java: (fromBytes(byte[])): Add type parameter. * gnu/classpath/jdwp/transport/SocketTransport.java: (configure(HashMap)): Add type parameters. Remove unnecessary cast. * gnu/classpath/jdwp/transport/TransportFactory.java: (clazz): Add type parameter. (TransportMethod(String,Class)): Likewise. (newInstance(HashMap)): Add type parameters. Remove unnecessary cast. * gnu/classpath/jdwp/util/Location.java: (Location(ByteBuffer)): Don't store return value of first bb.get() call as unneeded. Add type parameter. * gnu/classpath/jdwp/util/Signature.java: (computeClassSignature(Class)): Add type parameter. (_computeSignature(Class,Class[])): Likewise. (_addToSignature(CPStringBuilder,Class)): Likewise. * gnu/classpath/jdwp/value/Value.java: (getUntaggedObject(ByteBuffer,Class)): Add type parameter. * gnu/classpath/jdwp/value/ValueFactory.java: (createFromUntagged(ByteBuffer,Class)): Add type parameter. (getTagForClass(Class)): Likewise. (createFromObject(Object,Class)): Likewise. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Implement javax.tools.ToolProvider using ecj. Cleanup and make more use of ↵Andrew John Hughes2013-02-267-76/+361
| | | | | | Classpath logging mechanism. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Implement AbstractProcessor, adding annotations and an interface it depends on.Andrew John Hughes2013-02-227-2/+473
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2013-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org> * javax/annotation/processing/AbstractProcessor.java: New class added. (processingEnv): Added. (initialized): Likewise. (AbstractProcessor()): Implemented. (getCompletions(Element,AnnotationMirror,ExecutableElement, String)): Likewise. (getSupportedAnnotationTypes()):Likewise. (getSupportedOptions()): Likewise. (getSupportedSourceVersion()): Likewise. (init(ProcessingEnvironment)): Likewise. (isInitialized()): Likewise. (process(Set,RoundEnvironment)): Likewise. * javax/annotation/processing/Completion.java: New interface added. (getValue()): Added. (getMessage()): Likewise. * javax/annotation/processing/Processor.java: (getCompletions(Element,AnnotationMirror,ExecutableElement, String)): Added. * javax/annotation/processing/SupportedAnnotationTypes.java: New annotation added. (value()): Added. * javax/annotation/processing/SupportedOptions.java: New annotation added. (value()): Added. * javax/annotation/processing/SupportedSourceVersion.java: Reference AbstractProcessor in documentation. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Add missing methods in javax.lang.model.SourceVersion.Andrew John Hughes2013-02-182-0/+71
| | | | | | | | | | | 2013-02-18 Andrew John Hughes <gnu_andrew@member.fsf.org> * javax/lang/model/SourceVersion.java, (KEYWORDS): Add array containing language keywords. (isKeyword(CharSequence)): Implemented. (isName(CharSequence)): Likewise. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Add ElementVisitor implementations and JavaFileManager forwarder.Andrew John Hughes2013-02-188-1/+875
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2013-02-18 Andrew John Hughes <gnu_andrew@member.fsf.org> * javax/annotation/processing/SupportedSourceVersion.java: Implemented. (value()): Implemented. * javax/lang/model/element/ElementVisitor.java: Fix typo: "implementators" should be "implementors". * javax/lang/model/element/UnknownElementException.java: (UnknownElementException(Element,Object)): Set message using superclass constructor. * javax/lang/model/util/AbstractElementVisitor6.java: Implemented. (AbstractElementVisitor6()): Implemented. (visit(Element)): Likewise. (visit(Element,P)): Likewise. (visitUnknown(Element,P)): Likewise. * javax/lang/model/util/ElementScanner6.java: Implemented. (ElementScanner6()): Implemented. (ElementScanner6(R)): Likewise. (scan(Element)): Likewise. (scan(Element, P)): Likewise. (scan(Iterable, P)): Likewise. (visitExecutable(ExecutableElement, P)): Likewise. (visitPackage(PackageElement, P)): Likewise. (visitType(TypeElement, P)): Likewise. (visitTypeParameter(TypeElement, P)): Likewise. (visitVariable(VariableElement, P)): Likewise. * javax/lang/model/util/SimpleElementVisitor6.java, Implemented. (DEFAULT_VALUE): Added. (SimpleElementVisitor6()): Implemented. (SimpleElementVisitor6(R)): Likewise. (defaultAction(Element, P)): Likewise. (visitExecutable(ExecutableElement, P)): Likewise. (visitPackage(PackageElement, P)): Likewise. (visitType(TypeElement, P)): Likewise. (visitTypeParameter(TypeElement, P)): Likewise. (visitVariable(VariableElement, P)): Likewise. * javax/tools/ForwardingJavaFileManager.java: Implemented. (fileManager): Added. (ForwardingJavaFileManager(M)): Implemented. (close()): Likewise. (flush()): Likewise. (getClassLoader(JavaFileManager.Location)): Likewise. (getFileForInput(JavaFileManager.Location, String, String)): Likewise. (getFileForOutput(JavaFileManager.Location, String, String, FileObject)): Likewise. (getJavaFileForInput(JavaFileManager.Location, String, JavaFileObject.Kind)): Likewise. (getJavaFileForOutput(JavaFileManager.Location, String, JavaFileObject.Kind, FileObject)): Likewise. (handleOption(String,Iterator)): Likewise. (hasLocation(JavaFileManager.Location)): Likewise. (inferBinaryName(JavaFileManager.Location, JavaFileObject)): Likewise. (isSameFile(FileObject, FileObject)): Likewise. (isSupportedOption(String)): Likewise. (list(JavaFileManager.Location, String, Set, boolean)): Likewise. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
* Merge branch 'compiler-support'Andrew John Hughes2013-02-0383-220/+7879
|\ | | | | | | | | | | | | Conflicts: ChangeLog Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
| * Add remaining Set filters to ElementFilter.compiler-supportAndrew John Hughes2013-02-032-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | 2013-02-03 Andrew John Hughes <gnu_andrew@member.fsf.org> * javax/lang/model/util/ElementFilter.java: (constructorsIn(Set)): Implemented. (fieldsIn(Set)): Likewise. (methodsIn(Set)): Likewise. (packagesIn(Set)): Likewise. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
| * Document ElementKind fields and add missing methods.Andrew John Hughes2013-02-012-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2013-02-01 Andrew John Hughes <gnu_andrew@member.fsf.org> * javax/lang/model/element/ElementKind.java: (ANNOTATION_TYPE): Documented. (CLASS): Likewise. (CONSTRUCTOR): Likewise. (ENUM): Likewise. (ENUM_CONSTANT): Likewise. (EXCEPTION_PARAMETER): Likewise. (FIELD): Likewise. (INSTANCE_INIT): Likewise. (INTERFACE): Likewise. (LOCAL_VARIABLE): Likewise. (METHOD): Likewise. (OTHER): Likewise. (PACKAGE): Likewise. (PARAMETER): Likewise. (STATIC_INIT): Likewise. (TYPE_PARAMETER): Likewise. (isClass()): Implemented. (isField()): Likewise. (isInterface()): Likewise. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>