Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8251561: Fix doclint warnings in the java.xml package
Reviewed-by: lancea, naoto, rriggs, erikj, alanb
  • Loading branch information
JoeWang-Java committed Aug 26, 2020
1 parent 6a50cb6 commit 0cfd010246c1647b13a7496ada710a780ddacfd5
Show file tree
Hide file tree
Showing 44 changed files with 418 additions and 301 deletions.
@@ -298,6 +298,8 @@ define SetupApiDocsGenerationBody
# Create a string like "-Xdoclint:all,-syntax,-html,..."
$1_OPTIONS += -Xdoclint:all,$$(call CommaList, $$(addprefix -, \
$$(JAVADOC_DISABLED_DOCLINT)))
# Ignore the doclint warnings in the W3C DOM package
$1_OPTIONS += -Xdoclint/package:-org.w3c.*

$1_DOC_TITLE := $$($1_LONG_NAME)<br>Version $$(VERSION_SPECIFICATION) API \
Specification
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -36,6 +36,9 @@
public class FactoryConfigurationError extends Error {
private static final long serialVersionUID = -2994412584589975744L;

/**
* The nested exception.
*/
Exception nested;

/**
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -45,11 +45,15 @@
* @since 1.6
*/
public abstract class XMLEventFactory {
protected XMLEventFactory(){}

static final String JAXPFACTORYID = "javax.xml.stream.XMLEventFactory";
static final String DEFAULIMPL = "com.sun.xml.internal.stream.events.XMLEventFactoryImpl";

/**
* Protected constructor to prevent instantiation.
* Use {@link #newFactory()} instead.
*/
protected XMLEventFactory(){}

/**
* Creates a new instance of the {@code XMLEventFactory} builtin
* system-default implementation.
@@ -66,6 +70,8 @@ public static XMLEventFactory newDefaultFactory() {
/**
* Creates a new instance of the factory in exactly the same manner as the
* {@link #newFactory()} method.
*
* @return an instance of the {@code XMLEventFactory}
* @throws FactoryConfigurationError if an instance of this factory cannot be loaded
*/
public static XMLEventFactory newInstance()
@@ -126,6 +132,7 @@ public static XMLEventFactory newInstance()
* Once an application has obtained a reference to a XMLEventFactory it
* can use the factory to configure and obtain stream instances.
*
* @return an instance of the {@code XMLEventFactory}
* @throws FactoryConfigurationError in case of {@linkplain
* java.util.ServiceConfigurationError service configuration error} or if
* the implementation is not available or cannot be instantiated.
@@ -474,9 +481,9 @@ public abstract StartDocument createStartDocument(String encoding,
public abstract EntityReference createEntityReference(String name,
EntityDeclaration declaration);
/**
* Create a comment
* Create a comment.
* @param text The text of the comment
* a Comment event
* @return a Comment event
*/
public abstract Comment createComment(String text);

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -68,7 +68,7 @@ public interface XMLEventReader extends Iterator<Object> {
*
* @return the next XMLEvent
* @see XMLEvent
* @throws XMLStreamException
* @throws XMLStreamException if an error occurs
*/
public XMLEvent peek() throws XMLStreamException;

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -50,13 +50,13 @@ public interface XMLEventWriter extends XMLEventConsumer {

/**
* Writes any cached events to the underlying output mechanism
* @throws XMLStreamException
* @throws XMLStreamException if an error occurs
*/
public void flush() throws XMLStreamException;

/**
* Frees any resources associated with this stream
* @throws XMLStreamException
* @throws XMLStreamException if an error occurs
*/
public void close() throws XMLStreamException;

@@ -180,7 +180,7 @@ public interface XMLEventWriter extends XMLEventConsumer {
* </tbody>
* </table>
* @param event the event to be added
* @throws XMLStreamException
* @throws XMLStreamException if an error occurs
*/
public void add(XMLEvent event) throws XMLStreamException;

@@ -192,15 +192,16 @@ public interface XMLEventWriter extends XMLEventConsumer {
* event reader and call add on each event.
*
* @param reader the event stream to add to the output
* @throws XMLStreamException
* @throws XMLStreamException if an error occurs
*/

public void add(XMLEventReader reader) throws XMLStreamException;

/**
* Gets the prefix the uri is bound to
* @param uri the uri to look up
* @throws XMLStreamException
* @return the prefix
* @throws XMLStreamException if an error occurs
*/
public String getPrefix(String uri) throws XMLStreamException;

@@ -211,7 +212,7 @@ public interface XMLEventWriter extends XMLEventConsumer {
* the prefix is bound in the root scope.
* @param prefix the prefix to bind to the uri
* @param uri the uri to bind to the prefix
* @throws XMLStreamException
* @throws XMLStreamException if an error occurs
*/
public void setPrefix(String prefix, String uri) throws XMLStreamException;

@@ -222,7 +223,7 @@ public interface XMLEventWriter extends XMLEventConsumer {
* If this method is called before a START_ELEMENT has been written
* the uri is bound in the root scope.
* @param uri the uri to bind to the default namespace
* @throws XMLStreamException
* @throws XMLStreamException if an error occurs
*/
public void setDefaultNamespace(String uri) throws XMLStreamException;

@@ -234,7 +235,7 @@ public interface XMLEventWriter extends XMLEventConsumer {
* the context passed to the method as the root context for resolving
* namespaces.
* @param context the namespace context to use for this writer
* @throws XMLStreamException
* @throws XMLStreamException if an error occurs
*/
public void setNamespaceContext(NamespaceContext context)
throws XMLStreamException;

0 comments on commit 0cfd010

Please sign in to comment.