From b7cb36b2305a894355c092ebb698fcdd50b1d67d Mon Sep 17 00:00:00 2001 From: Kurt Schwehr Date: Wed, 20 Oct 2021 11:28:35 -0700 Subject: [PATCH] codespell --- CHANGES.txt | 4 +-- .../org/jdom2/contrib/beans/DateUtils.java | 2 +- .../org/jdom2/contrib/ids/IdAttribute.java | 7 ++--- .../contrib/input/LineNumberSAXHandler.java | 2 +- .../contrib/input/scanner/ElementScanner.java | 2 +- .../contrib/input/scanner/XPathMatcher.java | 4 +-- .../jdom2/contrib/perf/SavingVerifier.java | 2 +- .../java/org/jdom2/contrib/schema/Schema.java | 16 +++++------ .../contrib/verifier/VerifierBuilder.java | 6 ++-- .../xpath/java/JavaXPathExpression.java | 2 +- .../jdom2/contrib/xpath/xalan/JDOM2DTM.java | 2 +- core/src/java/org/jdom2/AttributeList.java | 2 +- core/src/java/org/jdom2/CDATA.java | 2 +- core/src/java/org/jdom2/CloneBase.java | 4 +-- .../java/org/jdom2/DescendantIterator.java | 2 +- core/src/java/org/jdom2/Document.java | 6 ++-- core/src/java/org/jdom2/Element.java | 10 +++---- core/src/java/org/jdom2/JDOMFactory.java | 2 +- core/src/java/org/jdom2/Namespace.java | 2 +- core/src/java/org/jdom2/Verifier.java | 4 +-- .../java/org/jdom2/filter/ContentFilter.java | 14 +++++----- core/src/java/org/jdom2/filter/Filter.java | 2 +- core/src/java/org/jdom2/input/SAXBuilder.java | 2 +- .../java/org/jdom2/input/sax/SAXEngine.java | 6 ++-- .../java/org/jdom2/input/sax/SAXHandler.java | 6 ++-- .../jdom2/input/sax/XMLReaderSAX2Factory.java | 4 +-- .../java/org/jdom2/output/DOMOutputter.java | 2 +- core/src/java/org/jdom2/output/Format.java | 12 ++++---- .../org/jdom2/output/StAXEventOutputter.java | 2 +- .../org/jdom2/output/StAXStreamOutputter.java | 2 +- .../java/org/jdom2/output/XMLOutputter.java | 4 +-- .../org/jdom2/output/support/FormatStack.java | 2 +- .../output/support/SAXOutputProcessor.java | 6 ++-- .../output/support/StAXStreamProcessor.java | 4 +-- .../output/support/XMLOutputProcessor.java | 4 +-- .../java/org/jdom2/transform/JDOMSource.java | 2 +- core/src/java/org/jdom2/xpath/XPath.java | 2 +- .../java/org/jdom2/xpath/XPathBuilder.java | 2 +- .../src/java/org/jdom2/xpath/XPathHelper.java | 4 +-- .../org/jdom2/xpath/jaxen/JaxenCompiled.java | 2 +- test/src/java/org/jdom2/TestStringBin.java | 2 +- .../org/jdom2/test/cases/TestAttribute.java | 10 +++---- .../jdom2/test/cases/TestAttributeList.java | 4 +-- .../java/org/jdom2/test/cases/TestCDATA.java | 4 +-- .../org/jdom2/test/cases/TestContentList.java | 2 +- .../org/jdom2/test/cases/TestElement.java | 8 +++--- .../test/cases/TestElementFilterList.java | 2 +- .../org/jdom2/test/cases/TestEntityRef.java | 4 +-- .../org/jdom2/test/cases/TestVerifier.java | 20 ++++++------- .../test/cases/filter/AbstractTestFilter.java | 4 +-- .../test/cases/input/TestSAXBuilder.java | 2 +- .../test/cases/input/TestSAXHandler.java | 6 ++-- .../test/cases/output/TestDOMOutputter.java | 4 +-- .../test/cases/output/TestSAXOutputter.java | 2 +- .../xpath/AbstractTestXPathCompiled.java | 28 +++++++++---------- .../org/jdom2/test/util/AbstractTestList.java | 4 +-- 56 files changed, 136 insertions(+), 137 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 140850823..328505613 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -525,7 +525,7 @@ Added JDOM_FEATURE constants to JDOMSource and JDOMResult which can be used with TransformerFactory.getFeature() to determine if the transformer natively supports JDOM. -Moved the printing of the line seperator after the doctype up to +Moved the printing of the line separator after the doctype up to output(Document, Writer). This allows someone who doesn't want a newline after the decl to kludge it away. @@ -1052,7 +1052,7 @@ uses an Iterator. Should lighten the burden on outputting large documents. Added CVS Id variable to the top of each file for better tracking. -Changed pi.getValue("nonexistant") to return null instead of "". Also made it +Changed pi.getValue("nonexistent") to return null instead of "". Also made it so that any parse error aborts and clears the parse results. Created a new implementations of clone() without any constructor calls. diff --git a/contrib/src/java/org/jdom2/contrib/beans/DateUtils.java b/contrib/src/java/org/jdom2/contrib/beans/DateUtils.java index ba0e2366b..6dffc0ec3 100644 --- a/contrib/src/java/org/jdom2/contrib/beans/DateUtils.java +++ b/contrib/src/java/org/jdom2/contrib/beans/DateUtils.java @@ -103,7 +103,7 @@ public static Date parseDate(String s) { return new Date(Long.parseLong(s)); } catch (NumberFormatException nfe) { - // Getting rediculous now... + // Getting ridiculous now... } ISO8601 iso = parseISO8601(s); diff --git a/contrib/src/java/org/jdom2/contrib/ids/IdAttribute.java b/contrib/src/java/org/jdom2/contrib/ids/IdAttribute.java index ff3e54d11..a321b947e 100644 --- a/contrib/src/java/org/jdom2/contrib/ids/IdAttribute.java +++ b/contrib/src/java/org/jdom2/contrib/ids/IdAttribute.java @@ -103,7 +103,7 @@ protected Attribute setParent(Element parent) { if (this.getAttributeType() == Attribute.ID_TYPE) { Document doc; - // Udpate the owning document's lookup table. + // Update the owning document's lookup table. if (oldParent != null) { doc = oldParent.getDocument(); if (doc instanceof IdDocument) { @@ -125,7 +125,7 @@ public Attribute setValue(String value) { super.setValue(value); if (this.getAttributeType() == Attribute.ID_TYPE) { - // Udpate the owning document's lookup table. + // Update the owning document's lookup table. Document doc = this.getDocument(); if (doc instanceof IdDocument) { ((IdDocument)doc).removeId(oldValue); @@ -142,7 +142,7 @@ public Attribute setAttributeType(AttributeType type) { if (type != oldType) { super.setAttributeType(type); - // Udpate the owning document's lookup table. + // Update the owning document's lookup table. Document doc = this.getDocument(); if (doc instanceof IdDocument) { if (oldType == Attribute.ID_TYPE) { @@ -156,4 +156,3 @@ public Attribute setAttributeType(AttributeType type) { return this; } } - diff --git a/contrib/src/java/org/jdom2/contrib/input/LineNumberSAXHandler.java b/contrib/src/java/org/jdom2/contrib/input/LineNumberSAXHandler.java index 342a7e315..547115337 100644 --- a/contrib/src/java/org/jdom2/contrib/input/LineNumberSAXHandler.java +++ b/contrib/src/java/org/jdom2/contrib/input/LineNumberSAXHandler.java @@ -66,7 +66,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT import org.jdom2.input.sax.SAXHandlerFactory; /** - * This builder works in parallell with {@link LineNumberElement} + * This builder works in parallel with {@link LineNumberElement} * to provide each element with information on its beginning and * ending line number in the corresponding source. * This only works for SAX parsers that supply that information, and diff --git a/contrib/src/java/org/jdom2/contrib/input/scanner/ElementScanner.java b/contrib/src/java/org/jdom2/contrib/input/scanner/ElementScanner.java index 0e2f6aff8..970bb89ad 100644 --- a/contrib/src/java/org/jdom2/contrib/input/scanner/ElementScanner.java +++ b/contrib/src/java/org/jdom2/contrib/input/scanner/ElementScanner.java @@ -325,7 +325,7 @@ public void setValidation(boolean validate) { } /** - * Specifies whether or not the parser should elminate whitespace + * Specifies whether or not the parser should eliminate whitespace * in element content (sometimes known as "ignorable whitespace") * when building the document. Only whitespace which is contained * within element content that has an element only content model diff --git a/contrib/src/java/org/jdom2/contrib/input/scanner/XPathMatcher.java b/contrib/src/java/org/jdom2/contrib/input/scanner/XPathMatcher.java index 9fdc15893..7ff6761bd 100644 --- a/contrib/src/java/org/jdom2/contrib/input/scanner/XPathMatcher.java +++ b/contrib/src/java/org/jdom2/contrib/input/scanner/XPathMatcher.java @@ -104,7 +104,7 @@ public abstract class XPathMatcher { "org.jdom2.contrib.input.scanner.JakartaRegExpXPathMatcher"; /** - * The constructor to instanciate a new XPathMatcher concrete + * The constructor to instantiate a new XPathMatcher concrete * implementation. * * @see #newXPathMatcher @@ -225,7 +225,7 @@ protected static String getPathPatternAsRE(String expr) // It the expression ends with a square backet, a test part is // present. => Strip it! // Note: Any other sub-expression between square backet is view as - // a RE alphabet definition and proccessed. OK, that's not + // a RE alphabet definition and processed. OK, that's not // XPath compliant but that's very convenient! String path = (expr.endsWith("]"))? expr.substring(0, expr.lastIndexOf('[')): expr; diff --git a/contrib/src/java/org/jdom2/contrib/perf/SavingVerifier.java b/contrib/src/java/org/jdom2/contrib/perf/SavingVerifier.java index 27631829d..f38fa67c6 100644 --- a/contrib/src/java/org/jdom2/contrib/perf/SavingVerifier.java +++ b/contrib/src/java/org/jdom2/contrib/perf/SavingVerifier.java @@ -140,7 +140,7 @@ public static final void closeWriters() throws IOException { } /** - * Ensure instantation cannot occur. + * Ensure instantiation cannot occur. */ private SavingVerifier() { } diff --git a/contrib/src/java/org/jdom2/contrib/schema/Schema.java b/contrib/src/java/org/jdom2/contrib/schema/Schema.java index d42d7a5ad..0de18d8c1 100644 --- a/contrib/src/java/org/jdom2/contrib/schema/Schema.java +++ b/contrib/src/java/org/jdom2/contrib/schema/Schema.java @@ -169,7 +169,7 @@ public class Schema { * @param type the schema type. * * @throws JDOMException if the schema document can not be - * parsed according to the specfied type. + * parsed according to the specified type. * @throws IOException if an I/O error occurred while reading * the schema document. */ @@ -304,7 +304,7 @@ public List validate(Element element) throws JDOMException { * @return the compiled schema. * * @throws JDOMException if the schema document can not be - * parsed according to the specfied type. + * parsed according to the specified type. * @throws IOException if an I/O error occurred while reading * the schema document. */ @@ -327,7 +327,7 @@ public static Schema parse(String uri, Type type) * @return the compiled schema. * * @throws JDOMException if the schema document can not be - * parsed according to the specfied type. + * parsed according to the specified type. * @throws IOException if an I/O error occurred while reading * the schema document. */ @@ -353,7 +353,7 @@ public static Schema parse(InputStream byteStream, Type type, String uri) * @return the compiled schema. * * @throws JDOMException if the schema document can not be - * parsed according to the specfied type. + * parsed according to the specified type. * @throws IOException if an I/O error occurred while reading * the schema document. */ @@ -376,7 +376,7 @@ public static Schema parse(Reader reader, Type type, String uri) * @return the compiled schema. * * @throws JDOMException if the schema document can not be - * parsed according to the specfied type. + * parsed according to the specified type. * @throws IOException if an I/O error occurred while reading * the schema document. */ @@ -393,14 +393,14 @@ public static Schema parse(File file, Type type) * according to the specified schema type and returns a compiled * schema object. * - * @param source the SAX inout source to read the schema + * @param source the SAX input source to read the schema * definition from. * @param type the schema type. * * @return the compiled schema. * * @throws JDOMException if the schema document can not be - * parsed according to the specfied type. + * parsed according to the specified type. * @throws IOException if an I/O error occurred while reading * the schema document. */ @@ -452,7 +452,7 @@ public List getErrors() { } /** - * Returns the JDOM node currently being ouputted by + * Returns the JDOM node currently being outputted by * SAXOuputter. * * @return the current JDOM node. diff --git a/contrib/src/java/org/jdom2/contrib/verifier/VerifierBuilder.java b/contrib/src/java/org/jdom2/contrib/verifier/VerifierBuilder.java index 8f6f9ba7a..13fea650e 100644 --- a/contrib/src/java/org/jdom2/contrib/verifier/VerifierBuilder.java +++ b/contrib/src/java/org/jdom2/contrib/verifier/VerifierBuilder.java @@ -73,7 +73,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT final public class VerifierBuilder { /** - * Ensure instantation cannot occur. + * Ensure instantiation cannot occur. */ private VerifierBuilder() { } @@ -297,7 +297,7 @@ public static boolean isXMLNameCharacter(final char c) { // remove check for || c == ':' // JDOM Attributes and Elements cannot start with ':' since JDOM - // seperates the prefix from the name. + // separates the prefix from the name. // we do not want ':' in the bitmask, instead we add it later. return (isXMLLetter(c) || isXMLDigit(c) || c == '.' || c == '-' @@ -320,7 +320,7 @@ public static boolean isXMLNameStartCharacter(final char c) { // remove check for || c == ':' // JDOM Attributes and Elements cannot start with ':' since JDOM - // seperates the prefix from the name. + // separates the prefix from the name. // we do not want ':' in the bitmask, instead we add it later. return (isXMLLetter(c) || c == '_'); diff --git a/contrib/src/java/org/jdom2/contrib/xpath/java/JavaXPathExpression.java b/contrib/src/java/org/jdom2/contrib/xpath/java/JavaXPathExpression.java index 421ef7f4f..f6fd508db 100644 --- a/contrib/src/java/org/jdom2/contrib/xpath/java/JavaXPathExpression.java +++ b/contrib/src/java/org/jdom2/contrib/xpath/java/JavaXPathExpression.java @@ -202,7 +202,7 @@ private Object wrapContext(Object context) { case Text: return DOM.wrap((Text)context); } - throw new IllegalStateException("Should never break out of swich"); + throw new IllegalStateException("Should never break out of switch"); } else if (context instanceof Attribute) { return DOM.wrap((Attribute)context); } else if (context instanceof Document) { diff --git a/contrib/src/java/org/jdom2/contrib/xpath/xalan/JDOM2DTM.java b/contrib/src/java/org/jdom2/contrib/xpath/xalan/JDOM2DTM.java index 569e3d057..b7b2d4a26 100644 --- a/contrib/src/java/org/jdom2/contrib/xpath/xalan/JDOM2DTM.java +++ b/contrib/src/java/org/jdom2/contrib/xpath/xalan/JDOM2DTM.java @@ -131,7 +131,7 @@ private static final int getType(NamespaceAware nsa) { } else if (nsa instanceof NamespacePointer) { return DTM.NAMESPACE_NODE; } - throw new IllegalStateException("Unknonw node type " + nsa); + throw new IllegalStateException("Unknown node type " + nsa); } private NamespaceAware[] i_nodes = new NamespaceAware[1024]; diff --git a/core/src/java/org/jdom2/AttributeList.java b/core/src/java/org/jdom2/AttributeList.java index 55d6b6977..0a406c7e8 100644 --- a/core/src/java/org/jdom2/AttributeList.java +++ b/core/src/java/org/jdom2/AttributeList.java @@ -322,7 +322,7 @@ void clearAndSet(final Collection collection) { final int oldModCount = modCount; // clear the current system - // we need to detatch before we add so that we don't run in to a problem + // we need to detach before we add so that we don't run in to a problem // where an attribute in the to-add list is one that we are 'clearing' // first. while (size > 0) { diff --git a/core/src/java/org/jdom2/CDATA.java b/core/src/java/org/jdom2/CDATA.java index e9c511287..9a8b479e1 100644 --- a/core/src/java/org/jdom2/CDATA.java +++ b/core/src/java/org/jdom2/CDATA.java @@ -160,7 +160,7 @@ public void append(final String str) { } // we have to do late checking since the end of a CDATA section could - // have been created by concating both strings: + // have been created by concatenating both strings: // "]" + "]>" // or // "]]" + ">" diff --git a/core/src/java/org/jdom2/CloneBase.java b/core/src/java/org/jdom2/CloneBase.java index 8dd82fc96..73fa757b4 100644 --- a/core/src/java/org/jdom2/CloneBase.java +++ b/core/src/java/org/jdom2/CloneBase.java @@ -63,7 +63,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT class CloneBase implements Cloneable { /** - * Change the permission of the no-arg constructor from public to protcted. + * Change the permission of the no-arg constructor from public to protected. *

* Otherwise package-private class's constructor is not really public. Changing this to * 'protected' makes this constructor available to all subclasses regardless of the @@ -85,7 +85,7 @@ protected CloneBase() { * All JDOM core classes are Cloneable, and never throw * CloneNotSupportedException. Additionally all Cloneable JDOM classes * return the correct type of instance from this method and there is no - * need to cast the result (co-variant return vaue). + * need to cast the result (co-variant return value). *

* Subclasses of this should still call super.clone() in their clone method. */ diff --git a/core/src/java/org/jdom2/DescendantIterator.java b/core/src/java/org/jdom2/DescendantIterator.java index c5fb9eaff..021364383 100644 --- a/core/src/java/org/jdom2/DescendantIterator.java +++ b/core/src/java/org/jdom2/DescendantIterator.java @@ -191,7 +191,7 @@ public void remove() { // we have a next element, or our next move was up anyway. return; } - // our next move was going to be down, or accross, but those are not + // our next move was going to be down, or across, but those are not // possible any more, need to check up. // our next will be up. while (ssize > 0) { diff --git a/core/src/java/org/jdom2/Document.java b/core/src/java/org/jdom2/Document.java index 6b1ea14fa..42def0497 100644 --- a/core/src/java/org/jdom2/Document.java +++ b/core/src/java/org/jdom2/Document.java @@ -107,7 +107,7 @@ public Document() {} * * @param rootElement Element for document root. * @param docType DocType declaration. - * @param baseURI the URI from which this doucment was loaded. + * @param baseURI the URI from which this document was loaded. * @throws IllegalAddException if the given docType object * is already attached to a document or the given * rootElement already has a parent @@ -555,7 +555,7 @@ public Document setContent(int index, Content child) { } /** - * Replace the child at the given index whith the supplied + * Replace the child at the given index with the supplied * collection. *

* In event of an exception the original content will be unchanged and @@ -688,7 +688,7 @@ public Document clone() { final Document doc = (Document) super.clone(); // The clone has a reference to this object's content list, so - // owerwrite with a empty list + // overwrite with a empty list doc.content = new ContentList(doc); // Add the cloned content to clone diff --git a/core/src/java/org/jdom2/Element.java b/core/src/java/org/jdom2/Element.java index d0d17c296..7a6cf8113 100644 --- a/core/src/java/org/jdom2/Element.java +++ b/core/src/java/org/jdom2/Element.java @@ -446,7 +446,7 @@ public List getAdditionalNamespaces() { * (i.e. the text that's left after all references are resolved * and all other markup is stripped out.) * - * @return a concatentation of all text node descendants + * @return a concatenation of all text node descendants */ @Override public String getValue() { @@ -466,7 +466,7 @@ public String getValue() { * "attachments" to a parent element or document. *

* An element is a root element when it has a parent and that parent is a - * Document. In particular, this means that detatched Elements are not + * Document. In particular, this means that detached Elements are not * root elements. * * @return whether this is a root element @@ -876,7 +876,7 @@ public Element setContent(final int index, final Content child) { } /** - * Replace the child at the given index whith the supplied + * Replace the child at the given index with the supplied * collection. *

* In event of an exception the original content will be unchanged and @@ -1454,7 +1454,7 @@ public Element clone() { // clone(). // element.parent = null; - // Reference to content list and attribute lists are copyed by + // Reference to content list and attribute lists are copied by // super.clone() so we set it new lists if the original had lists element.content = new ContentList(element); element.attributes = attributes == null ? null : new AttributeList(element); @@ -1699,7 +1699,7 @@ public boolean removeChildren(final String cname, final Namespace ns) { * most complex rules for the namespaces-in-scope. *

* The scope is built up from a number of sources following the rules of - * XML namespace inheritence as follows: + * XML namespace inheritance as follows: *

    *
  • The {@link Namespace#XML_NAMESPACE} is added *
  • The element's namespace is added (commonly diff --git a/core/src/java/org/jdom2/JDOMFactory.java b/core/src/java/org/jdom2/JDOMFactory.java index 280345a41..4798393dd 100644 --- a/core/src/java/org/jdom2/JDOMFactory.java +++ b/core/src/java/org/jdom2/JDOMFactory.java @@ -343,7 +343,7 @@ public DocType docType(int line, int col, String elementName, * * @param rootElement Element for document root. * @param docType DocType declaration. - * @param baseURI the URI from which this doucment was loaded. + * @param baseURI the URI from which this document was loaded. * @return the created Document instance */ public Document document(Element rootElement, DocType docType, String baseURI); diff --git a/core/src/java/org/jdom2/Namespace.java b/core/src/java/org/jdom2/Namespace.java index 10d37666f..b7a779d71 100644 --- a/core/src/java/org/jdom2/Namespace.java +++ b/core/src/java/org/jdom2/Namespace.java @@ -141,7 +141,7 @@ public static Namespace getNamespace(final String prefix, final String uri) { // 1. avoid having to create a new NamespaceKey for each query. // 2. avoid a 'big' synchronisation bottleneck in the Namespace class. // 3. no-memory-lookup for pre-existing Namespaces... (avoid 'new' and - // most String methods that allocte memory (like trim()) + // most String methods that allocate memory (like trim()) if (uri == null) { if (prefix == null || NS_PREFIX_DEFAULT.equals(prefix)) { diff --git a/core/src/java/org/jdom2/Verifier.java b/core/src/java/org/jdom2/Verifier.java index 9bf6ff957..3319e7f30 100644 --- a/core/src/java/org/jdom2/Verifier.java +++ b/core/src/java/org/jdom2/Verifier.java @@ -348,7 +348,7 @@ private static final byte[] buildBitFlags() { private static final byte MASKXMLLETTERORDIGIT = MASKXMLLETTER | MASKXMLDIGIT; /** - * Ensure instantation cannot occur. + * Ensure instantiation cannot occur. */ private Verifier() { } @@ -1206,7 +1206,7 @@ public static boolean isXMLCombiningChar(final char c) { */ public static boolean isXMLExtender(final char c) { /* - * This function is not accellerated by the bitmask system because + * This function is not accelerated by the bitmask system because * there are no longer any actual calls to it from the JDOM code. * It used to be called by the isXMLNameCharacter() method before * the bitmask optimization. Now the VerifierBuilder code actually diff --git a/core/src/java/org/jdom2/filter/ContentFilter.java b/core/src/java/org/jdom2/filter/ContentFilter.java index 939b43d74..73ae8f817 100644 --- a/core/src/java/org/jdom2/filter/ContentFilter.java +++ b/core/src/java/org/jdom2/filter/ContentFilter.java @@ -189,7 +189,7 @@ public void setElementContent() { } /** - * Set visiblity of Element objects. + * Set visibility of Element objects. * * @param visible whether Elements are visible, true * if yes, false if not @@ -204,7 +204,7 @@ public void setElementVisible(boolean visible) { } /** - * Set visiblity of CDATA objects. + * Set visibility of CDATA objects. * * @param visible whether CDATA nodes are visible, true * if yes, false if not @@ -219,7 +219,7 @@ public void setCDATAVisible(boolean visible) { } /** - * Set visiblity of Text objects. + * Set visibility of Text objects. * * @param visible whether Text nodes are visible, true * if yes, false if not @@ -234,7 +234,7 @@ public void setTextVisible(boolean visible) { } /** - * Set visiblity of Comment objects. + * Set visibility of Comment objects. * * @param visible whether Comments are visible, true * if yes, false if not @@ -249,7 +249,7 @@ public void setCommentVisible(boolean visible) { } /** - * Set visiblity of ProcessingInstruction objects. + * Set visibility of ProcessingInstruction objects. * * @param visible whether ProcessingInstructions are visible, * true if yes, false if not @@ -264,7 +264,7 @@ public void setPIVisible(boolean visible) { } /** - * Set visiblity of EntityRef objects. + * Set visibility of EntityRef objects. * * @param visible whether EntityRefs are visible, true * if yes, false if not @@ -279,7 +279,7 @@ public void setEntityRefVisible(boolean visible) { } /** - * Set visiblity of DocType objects. + * Set visibility of DocType objects. * * @param visible whether the DocType is visible, true * if yes, false if not diff --git a/core/src/java/org/jdom2/filter/Filter.java b/core/src/java/org/jdom2/filter/Filter.java index 278f4b4c0..7b2c43a10 100644 --- a/core/src/java/org/jdom2/filter/Filter.java +++ b/core/src/java/org/jdom2/filter/Filter.java @@ -127,7 +127,7 @@ public interface Filter extends java.io.Serializable { * instance. * @param filter The filter to refine our results with. * @return A Filter that requires content to both match our instance and the - * refining instance, but the generic type of the retuned data is based + * refining instance, but the generic type of the returned data is based * on the refining instance, not this instance. */ public Filter refine(Filter filter); diff --git a/core/src/java/org/jdom2/input/SAXBuilder.java b/core/src/java/org/jdom2/input/SAXBuilder.java index 7d66cd727..ac82f9e1b 100644 --- a/core/src/java/org/jdom2/input/SAXBuilder.java +++ b/core/src/java/org/jdom2/input/SAXBuilder.java @@ -659,7 +659,7 @@ public boolean getIgnoringBoundaryWhitespace() { } /** - * Specifies whether or not the parser should elminate boundary whitespace, + * Specifies whether or not the parser should eliminate boundary whitespace, * a term that indicates whitespace-only text between element tags. This * feature is a lot like * {@link #setIgnoringElementContentWhitespace(boolean)} but this feature is diff --git a/core/src/java/org/jdom2/input/sax/SAXEngine.java b/core/src/java/org/jdom2/input/sax/SAXEngine.java index 15c56a6c6..e7633a5ca 100644 --- a/core/src/java/org/jdom2/input/sax/SAXEngine.java +++ b/core/src/java/org/jdom2/input/sax/SAXEngine.java @@ -124,9 +124,9 @@ public interface SAXEngine { public abstract boolean getIgnoringElementContentWhitespace(); /** - * Returns whether or not the parser will elminate element content + * Returns whether or not the parser will eliminate element content * containing only whitespace. - * + * * @return boolean - whether only whitespace content will be * ignored during build. */ @@ -273,4 +273,4 @@ public abstract Document build(final Reader characterStream, final String system public abstract Document build(final String systemId) throws JDOMException, IOException; -} \ No newline at end of file +} diff --git a/core/src/java/org/jdom2/input/sax/SAXHandler.java b/core/src/java/org/jdom2/input/sax/SAXHandler.java index 56bf84f22..78e358da3 100644 --- a/core/src/java/org/jdom2/input/sax/SAXHandler.java +++ b/core/src/java/org/jdom2/input/sax/SAXHandler.java @@ -309,7 +309,7 @@ public boolean getExpandEntities() { } /** - * Specifies whether or not the parser should elminate whitespace in element + * Specifies whether or not the parser should eliminate whitespace in element * content (sometimes known as "ignorable whitespace") when building the * document. Only whitespace which is contained within element content that * has an element only content model will be eliminated (see XML Rec 3.2.1). @@ -337,7 +337,7 @@ public void setIgnoringBoundaryWhitespace( } /** - * Returns whether or not the parser will elminate element content + * Returns whether or not the parser will eliminate element content * containing only whitespace. * * @return boolean - whether only whitespace content will be @@ -349,7 +349,7 @@ public boolean getIgnoringBoundaryWhitespace() { } /** - * Returns whether or not the parser will elminate whitespace in element + * Returns whether or not the parser will eliminate whitespace in element * content (sometimes known as "ignorable whitespace") when building the * document. * diff --git a/core/src/java/org/jdom2/input/sax/XMLReaderSAX2Factory.java b/core/src/java/org/jdom2/input/sax/XMLReaderSAX2Factory.java index 40edd6585..4b25881a9 100644 --- a/core/src/java/org/jdom2/input/sax/XMLReaderSAX2Factory.java +++ b/core/src/java/org/jdom2/input/sax/XMLReaderSAX2Factory.java @@ -132,8 +132,8 @@ public XMLReader createXMLReader() throws JDOMException { } /** - * Get the SAX Driver class name used to boostrap XMLReaders. - * + * Get the SAX Driver class name used to bootstrap XMLReaders. + * * @return The name of the SAX Driver class (null for SAX2 default class). */ public String getDriverClassName() { diff --git a/core/src/java/org/jdom2/output/DOMOutputter.java b/core/src/java/org/jdom2/output/DOMOutputter.java index a2dcf0ad3..f68fadb19 100644 --- a/core/src/java/org/jdom2/output/DOMOutputter.java +++ b/core/src/java/org/jdom2/output/DOMOutputter.java @@ -126,7 +126,7 @@ public DOMOutputter() { } /** - * This creates a new DOMOutputter which uses the defalt (JAXP) DOM + * This creates a new DOMOutputter which uses the default (JAXP) DOM * implementation but with a custom processor. * * @param processor diff --git a/core/src/java/org/jdom2/output/Format.java b/core/src/java/org/jdom2/output/Format.java index e8d6967c3..afe8d68ec 100644 --- a/core/src/java/org/jdom2/output/Format.java +++ b/core/src/java/org/jdom2/output/Format.java @@ -656,7 +656,7 @@ public EscapeStrategy getEscapeStrategy() { *

    * Note that this only applies to newlines generated by the * outputter. All XML parsers are required to 'normalize' all the - * combinations of line seperators to just '\n'. As a result, if any JDOM + * combinations of line separators to just '\n'. As a result, if any JDOM * component has an end-of-line-like value (e.g. '\r') in it then that value * must be the result of an escaped value in the XML source document * 
 or a value explicitly set with one of the Text @@ -701,7 +701,7 @@ public Format setLineSeparator(String separator) { /** * This will set the newline separator sequence. *

    - * This method differes from {@link #setLineSeparator(String)} slightly in + * This method differs from {@link #setLineSeparator(String)} slightly in * that, to disable end-of-line processing you should call: *

     	 * Format.setLinewSeparator(LineSeparator.NONE);
    @@ -804,7 +804,7 @@ public boolean getExpandEmptyElements() {
     	 * This will set whether JAXP TrAX processing instructions for
     	 * disabling/enabling output escaping are ignored.  Disabling
     	 * output escaping allows using XML text as element content and
    -	 * outputing it verbatim, i.e. as element children would be.
    +	 * outputting it verbatim, i.e. as element children would be.
     	 * 

    * When processed, these processing instructions are removed from * the generated XML text and control whether the element text @@ -822,7 +822,7 @@ public boolean getExpandEmptyElements() { * Default: false.

    * * @param ignoreTrAXEscapingPIs boolean indicating - * whether or not TrAX ouput escaping PIs are ignored. + * whether or not TrAX output escaping PIs are ignored. * * @see javax.xml.transform.Result#PI_ENABLE_OUTPUT_ESCAPING * @see javax.xml.transform.Result#PI_DISABLE_OUTPUT_ESCAPING @@ -835,7 +835,7 @@ public void setIgnoreTrAXEscapingPIs(boolean ignoreTrAXEscapingPIs) { * Returns whether JAXP TrAX processing instructions for * disabling/enabling output escaping are ignored. * - * @return whether or not TrAX ouput escaping PIs are ignored. + * @return whether or not TrAX output escaping PIs are ignored. */ public boolean getIgnoreTrAXEscapingPIs() { return ignoreTrAXEscapingPIs; @@ -1007,7 +1007,7 @@ public Format clone() { * pre-existing whitespace can be trimmed before adding new whitespace. *

    * When an element has a xml:space attribute with the value of "preserve", - * all formating is turned off (actually, the TextMode is set to + * all formatting is turned off (actually, the TextMode is set to * {@link #PRESERVE} until the element and its contents have been printed. * If a nested element contains another xml:space with the value "default" * formatting is turned back on for the child element and then off for the diff --git a/core/src/java/org/jdom2/output/StAXEventOutputter.java b/core/src/java/org/jdom2/output/StAXEventOutputter.java index 42f6675f5..01feb44c3 100644 --- a/core/src/java/org/jdom2/output/StAXEventOutputter.java +++ b/core/src/java/org/jdom2/output/StAXEventOutputter.java @@ -433,7 +433,7 @@ public final void output(CDATA cdata, XMLEventConsumer out) throws XMLStreamExce } /** - * Print out a {@link Text} node. Perfoms the necessary entity + * Print out a {@link Text} node. Performs the necessary entity * escaping and whitespace stripping. * * @param text diff --git a/core/src/java/org/jdom2/output/StAXStreamOutputter.java b/core/src/java/org/jdom2/output/StAXStreamOutputter.java index 8f12d3b3c..9dfb9c741 100644 --- a/core/src/java/org/jdom2/output/StAXStreamOutputter.java +++ b/core/src/java/org/jdom2/output/StAXStreamOutputter.java @@ -393,7 +393,7 @@ public final void output(CDATA cdata, XMLStreamWriter out) throws XMLStreamExcep } /** - * Print out a {@link Text} node. Perfoms the necessary entity + * Print out a {@link Text} node. Performs the necessary entity * escaping and whitespace stripping. * * @param text diff --git a/core/src/java/org/jdom2/output/XMLOutputter.java b/core/src/java/org/jdom2/output/XMLOutputter.java index 4f7af03e2..fa7b0fe51 100644 --- a/core/src/java/org/jdom2/output/XMLOutputter.java +++ b/core/src/java/org/jdom2/output/XMLOutputter.java @@ -494,7 +494,7 @@ public final void output(CDATA cdata, OutputStream out) throws IOException { } /** - * Print out a {@link Text} node. Perfoms the necessary entity + * Print out a {@link Text} node. Performs the necessary entity * escaping and whitespace stripping. * * @param text @@ -942,7 +942,7 @@ public final void output(CDATA cdata, Writer out) throws IOException { } /** - * Print out a {@link Text} node. Perfoms the necessary entity + * Print out a {@link Text} node. Performs the necessary entity * escaping and whitespace stripping. *

    * Note: ensure the character encoding of the diff --git a/core/src/java/org/jdom2/output/support/FormatStack.java b/core/src/java/org/jdom2/output/support/FormatStack.java index e9755da63..318912c62 100644 --- a/core/src/java/org/jdom2/output/support/FormatStack.java +++ b/core/src/java/org/jdom2/output/support/FormatStack.java @@ -65,7 +65,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * complete. *

    * This class is intended as a working-class for in the various outputter - * implementations. It is inly public so that people extending the + * implementations. It is only public so that people extending the * Abstract*Processor classes can take advantage of its functionality. *

    * The value this class adds is: diff --git a/core/src/java/org/jdom2/output/support/SAXOutputProcessor.java b/core/src/java/org/jdom2/output/support/SAXOutputProcessor.java index 245e20f8a..8ff609b32 100644 --- a/core/src/java/org/jdom2/output/support/SAXOutputProcessor.java +++ b/core/src/java/org/jdom2/output/support/SAXOutputProcessor.java @@ -199,7 +199,7 @@ public abstract void process(SAXTarget out, Format format, List list) throws JDOMException; /** - * This will handle printing out a list of nodes thats encapsulated in + * This will handle printing out a list of nodes that is encapsulated in * start/end Document SAX events. This can be useful for printing the * content of an element that contains HTML, like * "<description>JDOM is <b>fun>!</description>". @@ -238,7 +238,7 @@ public abstract void process(SAXTarget out, Format format, CDATA cdata) throws JDOMException; /** - * Print out a {@link Text} node. Perfoms the necessary entity + * Print out a {@link Text} node. Performs the necessary entity * escaping and whitespace stripping. * * @param out @@ -306,4 +306,4 @@ public abstract void process(SAXTarget out, Format format, public abstract void process(SAXTarget out, Format format, EntityRef entity) throws JDOMException; -} \ No newline at end of file +} diff --git a/core/src/java/org/jdom2/output/support/StAXStreamProcessor.java b/core/src/java/org/jdom2/output/support/StAXStreamProcessor.java index 40dbed159..fbd538bae 100644 --- a/core/src/java/org/jdom2/output/support/StAXStreamProcessor.java +++ b/core/src/java/org/jdom2/output/support/StAXStreamProcessor.java @@ -182,7 +182,7 @@ public abstract void process(XMLStreamWriter out, Format format, List{@link Text} node. Perfoms the necessary entity + * Print out a {@link Text} node. Performs the necessary entity * escaping and whitespace stripping. * * @param out @@ -247,4 +247,4 @@ public abstract void process(XMLStreamWriter out, Format format, ProcessingInstr */ public abstract void process(XMLStreamWriter out, Format format, EntityRef entity) throws XMLStreamException; -} \ No newline at end of file +} diff --git a/core/src/java/org/jdom2/output/support/XMLOutputProcessor.java b/core/src/java/org/jdom2/output/support/XMLOutputProcessor.java index 09aa2ff6c..712abb2fc 100644 --- a/core/src/java/org/jdom2/output/support/XMLOutputProcessor.java +++ b/core/src/java/org/jdom2/output/support/XMLOutputProcessor.java @@ -191,7 +191,7 @@ public abstract void process(Writer out, Format format, List public abstract void process(Writer out, Format format, CDATA cdata) throws IOException; /** - * Print out a {@link Text} node. Perfoms the necessary entity + * Print out a {@link Text} node. Performs the necessary entity * escaping and whitespace stripping. * * @param out @@ -256,4 +256,4 @@ public abstract void process(Writer out, Format format, ProcessingInstruction pi */ public abstract void process(Writer out, Format format, EntityRef entity) throws IOException; -} \ No newline at end of file +} diff --git a/core/src/java/org/jdom2/transform/JDOMSource.java b/core/src/java/org/jdom2/transform/JDOMSource.java index 1f8df3280..954495a16 100644 --- a/core/src/java/org/jdom2/transform/JDOMSource.java +++ b/core/src/java/org/jdom2/transform/JDOMSource.java @@ -364,7 +364,7 @@ private XMLReader buildDocumentReader() { * A subclass of the SAX InputSource interface that wraps a JDOM * Document. *

    - * This class is nested in JDOMSource as it is not intented to + * This class is nested in JDOMSource as it is not intended to * be used independently of its friend: DocumentReader. *

    * diff --git a/core/src/java/org/jdom2/xpath/XPath.java b/core/src/java/org/jdom2/xpath/XPath.java index 0b9ed17ac..93a5f21ba 100644 --- a/core/src/java/org/jdom2/xpath/XPath.java +++ b/core/src/java/org/jdom2/xpath/XPath.java @@ -105,7 +105,7 @@ public abstract class XPath implements Serializable { "http://jdom.org/jaxp/xpath/jdom"; /** - * The constructor to instanciate a new XPath concrete + * The constructor to instantiate a new XPath concrete * implementation. * * @see #newInstance diff --git a/core/src/java/org/jdom2/xpath/XPathBuilder.java b/core/src/java/org/jdom2/xpath/XPathBuilder.java index 164e5d10f..bdc8f7f19 100644 --- a/core/src/java/org/jdom2/xpath/XPathBuilder.java +++ b/core/src/java/org/jdom2/xpath/XPathBuilder.java @@ -225,7 +225,7 @@ public boolean setNamespaces(Collection namespaces) { * reference the variable. * * @param qname - * The variable name to get the vaiable value for. + * The variable name to get the variable value for. * @return the variable value, or null if the variable was not defined. * @throws NullPointerException * if the qname is null. diff --git a/core/src/java/org/jdom2/xpath/XPathHelper.java b/core/src/java/org/jdom2/xpath/XPathHelper.java index 11a87c537..57fa6a8f3 100644 --- a/core/src/java/org/jdom2/xpath/XPathHelper.java +++ b/core/src/java/org/jdom2/xpath/XPathHelper.java @@ -102,7 +102,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * a parent Element (although it may have a parent Document). As a result, you * can use Element data that is not attached to a JDOM Document. *

    - * Detatched Attributes, and detached non-Element content are not treated the + * Detached Attributes, and detached non-Element content are not treated the * same. If you try to get an Absolute path to a detached Attribute or * non-Element Content you will get an IllegalArgumentException. On the other * hand it is legal to get the relative XPath for a detached node to itself ( @@ -158,7 +158,7 @@ private static StringBuilder getPositionPath(Object node, List siblings, break; } if (position > 1 || i.hasNext()) { - // the item is not at the first location, ot there are more + // the item is not at the first location, or there are more // locations. in other words, indexing is required. buffer.append('[').append(position).append(']'); } diff --git a/core/src/java/org/jdom2/xpath/jaxen/JaxenCompiled.java b/core/src/java/org/jdom2/xpath/jaxen/JaxenCompiled.java index aa00b4d28..8db3cfc51 100644 --- a/core/src/java/org/jdom2/xpath/jaxen/JaxenCompiled.java +++ b/core/src/java/org/jdom2/xpath/jaxen/JaxenCompiled.java @@ -126,7 +126,7 @@ private static final List unWrap(List results) { *

    * Because of the need to wrap Namespace, we also need to unwrap namespace. * Further, we can't re-use the details from one 'selectNodes' to another - * because the Document tree may have been modfied between, and also, we do + * because the Document tree may have been modified between, and also, we do * not want to be holding on to memory. *

    * Finally, we want to pre-load the NamespaceContext with the namespaces diff --git a/test/src/java/org/jdom2/TestStringBin.java b/test/src/java/org/jdom2/TestStringBin.java index 9a8c10a71..d3fef70f3 100644 --- a/test/src/java/org/jdom2/TestStringBin.java +++ b/test/src/java/org/jdom2/TestStringBin.java @@ -26,7 +26,7 @@ public class TestStringBin { public void testNegativeCapacity() { try { new StringBin(-1); - fail("excpect exception!"); + fail("expected exception!"); } catch (Exception e) { UnitTestUtil.checkException(IllegalArgumentException.class, e); } diff --git a/test/src/java/org/jdom2/test/cases/TestAttribute.java b/test/src/java/org/jdom2/test/cases/TestAttribute.java index bd32d73bc..d4a29e068 100644 --- a/test/src/java/org/jdom2/test/cases/TestAttribute.java +++ b/test/src/java/org/jdom2/test/cases/TestAttribute.java @@ -269,7 +269,7 @@ public void test_TCM__Attribute_setAttributeType_int() { } try { attribute.setAttributeType(attributeType); - fail("set unvalid attribute type: "+ attributeType); + fail("set invalid attribute type: "+ attributeType); } catch(final IllegalDataException ignore) { // is expected @@ -301,7 +301,7 @@ public void test_TCM__boolean_equals_Object() { } /** - * test the convienience method getBooleanValue(); + * test the convenience method getBooleanValue(); */ @Test public void test_TCM__boolean_getBooleanValue() { @@ -353,7 +353,7 @@ public void test_TCM__boolean_getBooleanValue() { } /** - * Test convience method for getting doubles from an Attribute + * Test convenience method for getting doubles from an Attribute */ @Test public void test_TCM__double_getDoubleValue() { @@ -483,7 +483,7 @@ public void test_TCM__int_hashCode() { } /** - * Test the convienience method for returning a long from an Attribute + * Test the convenience method for returning a long from an Attribute */ @Test public void test_TCM__long_getLongValue() { @@ -704,7 +704,7 @@ public void test_TCM__OrgJdomDocument_getDocument() { } /** - * Test that an independantly created Namespace and one + * Test that an independently created Namespace and one * retrieved from an Attribute create with the same namespace * parameters are the same namespace. */ diff --git a/test/src/java/org/jdom2/test/cases/TestAttributeList.java b/test/src/java/org/jdom2/test/cases/TestAttributeList.java index 311564eaa..e5e066c08 100644 --- a/test/src/java/org/jdom2/test/cases/TestAttributeList.java +++ b/test/src/java/org/jdom2/test/cases/TestAttributeList.java @@ -76,7 +76,7 @@ public Attribute[] buildIllegalArgumentContent() { @Before public void detatchAll () { - // make sure all content is detatched before each test. + // make sure all content is detached before each test. for (Attribute c : buildSampleContent()) { c.detach(); } @@ -302,7 +302,7 @@ public void testAlreadyHasParent () { // same will have an attribute with the same name as att. final Element same = new Element("same"); same.setAttribute("att", "val"); - // other will have an attrubute not the same as att. + // other will have an attribute not the same as att. final Element other = new Element("other"); other.setAttribute("diff", "other"); diff --git a/test/src/java/org/jdom2/test/cases/TestCDATA.java b/test/src/java/org/jdom2/test/cases/TestCDATA.java index 29567a568..f3163bb82 100644 --- a/test/src/java/org/jdom2/test/cases/TestCDATA.java +++ b/test/src/java/org/jdom2/test/cases/TestCDATA.java @@ -220,7 +220,7 @@ public void test_TCM__orgJdomText_setText_String() { cdata.setText(text); try { - final String invalidCDATAString = "some valid with an invlaid CDATA section ending ]]>"; + final String invalidCDATAString = "some valid with an invalid CDATA section ending ]]>"; cdata.setText(invalidCDATAString); fail("Comment setText didn't catch invalid CDATA string"); @@ -562,7 +562,7 @@ public void test_TCM___append_Text() { try { - // set text with some special characters which sould result into an exception + // set text with some special characters which should cause an exception final CDATA cdata = new CDATA(specialText); assertEquals("incorrect CDATA text", specialText, cdata.getText()); cdata.append(new Text(specialText)); diff --git a/test/src/java/org/jdom2/test/cases/TestContentList.java b/test/src/java/org/jdom2/test/cases/TestContentList.java index e1f34eee7..f787662d0 100644 --- a/test/src/java/org/jdom2/test/cases/TestContentList.java +++ b/test/src/java/org/jdom2/test/cases/TestContentList.java @@ -61,7 +61,7 @@ public Content[] buildIllegalArgumentContent() { @Before public void detatchAll () { - // make sure all content is detatched before each test. + // make sure all content is detached before each test. for (Content c : buildSampleContent()) { c.detach(); } diff --git a/test/src/java/org/jdom2/test/cases/TestElement.java b/test/src/java/org/jdom2/test/cases/TestElement.java index 457adcbbd..e069f90ed 100644 --- a/test/src/java/org/jdom2/test/cases/TestElement.java +++ b/test/src/java/org/jdom2/test/cases/TestElement.java @@ -1735,7 +1735,7 @@ public void test_TCM__String_getAttributeValue_String_OrgJdomNamespace_String() } /** - * Test the convience method for retrieving child text. + * Test the convenience method for retrieving child text. */ @Test public void test_TCM__String_getChildText_String() { @@ -1748,7 +1748,7 @@ public void test_TCM__String_getChildText_String() { } /** - * Test the convience method for retrieving child text for a child + * Test the convenience method for retrieving child text for a child * retrieved by name and namespace */ @Test @@ -1764,7 +1764,7 @@ public void test_TCM__String_getChildText_String_OrgJdomNamespace() { } /** - * Test the convience method for retrieving trimmed child text. + * Test the convenience method for retrieving trimmed child text. */ @Test public void test_TCM__String_getChildTextTrim_String() { @@ -1777,7 +1777,7 @@ public void test_TCM__String_getChildTextTrim_String() { } /** - * Test the convience method for retrieving trimmed child text for the + * Test the convenience method for retrieving trimmed child text for the * child in the given namespace */ @Test diff --git a/test/src/java/org/jdom2/test/cases/TestElementFilterList.java b/test/src/java/org/jdom2/test/cases/TestElementFilterList.java index 77fdb97f5..ef0728f46 100644 --- a/test/src/java/org/jdom2/test/cases/TestElementFilterList.java +++ b/test/src/java/org/jdom2/test/cases/TestElementFilterList.java @@ -52,7 +52,7 @@ public Element[] buildIllegalArgumentContent() { @Before public void detatchAll () { - // make sure all content is detatched before each test. + // make sure all content is detached before each test. for (Content c : buildSampleContent()) { c.detach(); } diff --git a/test/src/java/org/jdom2/test/cases/TestEntityRef.java b/test/src/java/org/jdom2/test/cases/TestEntityRef.java index 58816e97b..288a6eb58 100644 --- a/test/src/java/org/jdom2/test/cases/TestEntityRef.java +++ b/test/src/java/org/jdom2/test/cases/TestEntityRef.java @@ -124,7 +124,7 @@ public void setIllegals() { } catch (IllegalNameException ine) { // good } catch (Exception e) { - fail("Expeced IllegalNameException, but got " + e.getClass().getName()); + fail("Expected IllegalNameException, but got " + e.getClass().getName()); } try { @@ -133,7 +133,7 @@ public void setIllegals() { } catch (IllegalDataException ine) { // good } catch (Exception e) { - fail("Expeced IllegalNameException, but got " + e.getClass().getName()); + fail("Expected IllegalNameException, but got " + e.getClass().getName()); } try { diff --git a/test/src/java/org/jdom2/test/cases/TestVerifier.java b/test/src/java/org/jdom2/test/cases/TestVerifier.java index dd29127ff..e7e5d78c1 100644 --- a/test/src/java/org/jdom2/test/cases/TestVerifier.java +++ b/test/src/java/org/jdom2/test/cases/TestVerifier.java @@ -114,8 +114,8 @@ public void testCheckElementName() { assertNotNull("validated invalid name with :", Verifier.checkElementName(":abcd")); //invalid start characters - assertNotNull("validated invalid name with startin -", Verifier.checkElementName('-' + "test")); - assertNotNull("validated invalid name with startin :", Verifier.checkElementName(':' + "test")); + assertNotNull("validated invalid name with starting -", Verifier.checkElementName('-' + "test")); + assertNotNull("validated invalid name with starting :", Verifier.checkElementName(':' + "test")); //valid tests assertNull("invalidated valid name with starting _", Verifier.checkElementName('_' + "test")); @@ -150,9 +150,9 @@ public void testCheckAttributeName() { assertNotNull("validated invalid name with xml:space", Verifier.checkAttributeName("xml:space")); //invalid start characters - assertNotNull("validated invalid name with startin -", Verifier.checkAttributeName('-' + "test")); + assertNotNull("validated invalid name with starting -", Verifier.checkAttributeName('-' + "test")); assertNotNull("validated invalid name with xmlns", Verifier.checkAttributeName("xmlns")); - assertNotNull("validated invalid name with startin :", Verifier.checkAttributeName(':' + "test")); + assertNotNull("validated invalid name with starting :", Verifier.checkAttributeName(':' + "test")); //valid tests assertNull("invalidated valid name with starting _", Verifier.checkAttributeName('_' + "test")); @@ -255,8 +255,8 @@ public void testCheckNamespacePrefix() { assertNotNull("validated invalid name with :", Verifier.checkNamespacePrefix("test" + ':' + "local")); //invalid start characters - assertNotNull("validated invalid name with startin -", Verifier.checkNamespacePrefix('-' + "test")); - assertNotNull("validated invalid name with startin :", Verifier.checkNamespacePrefix(':' + "test")); + assertNotNull("validated invalid name with starting -", Verifier.checkNamespacePrefix('-' + "test")); + assertNotNull("validated invalid name with starting :", Verifier.checkNamespacePrefix(':' + "test")); assertNotNull("validated invalid name with starting digit", Verifier.checkNamespacePrefix("9")); assertNotNull("validated invalid name with starting $", Verifier.checkNamespacePrefix("$")); assertNotNull("validated invalid name with starting .", Verifier.checkNamespacePrefix(".")); @@ -309,7 +309,7 @@ public void testCheckNamespacePrefix() { @Test public void testCheckNamespaceURI() { //invalid start characters - assertNotNull("validated invalid URI with startin -", Verifier.checkNamespaceURI('-' + "test")); + assertNotNull("validated invalid URI with starting -", Verifier.checkNamespaceURI('-' + "test")); assertNotNull("validated invalid URI with starting digit", Verifier.checkNamespaceURI("9")); assertNotNull("validated invalid URI with starting $", Verifier.checkNamespaceURI("$")); @@ -328,7 +328,7 @@ public void testCheckNamespaceURI() { /** skip these tests until the time the checks are implemented assertNull("validated invalid URI with xmlns", Verifier.checkNamespaceURI("xmlns")); - assertNull("validated invalid URI with startin :", Verifier.checkNamespaceURI(':' + "test")); + assertNull("validated invalid URI with starting :", Verifier.checkNamespaceURI(':' + "test")); assertNull("validated invalid URI with starting .", Verifier.checkNamespaceURI(".")); assertNull("validated invalid URI with null", Verifier.checkNamespaceURI("test" + (char)0x0)); @@ -364,8 +364,8 @@ public void testCheckProcessingInstructionTarget() { assertNotNull("validated invalid name with xMl", Verifier.checkProcessingInstructionTarget("xMl")); //invalid start characters - assertNotNull("validated invalid name with startin -", Verifier.checkProcessingInstructionTarget('-' + "test")); - assertNotNull("validated invalid name with startin :", Verifier.checkProcessingInstructionTarget(':' + "test")); + assertNotNull("validated invalid name with starting -", Verifier.checkProcessingInstructionTarget('-' + "test")); + assertNotNull("validated invalid name with starting :", Verifier.checkProcessingInstructionTarget(':' + "test")); //valid tests assertNull("invalidated valid name with starting _", Verifier.checkProcessingInstructionTarget('_' + "test")); assertNull("invalidated valid name with _", Verifier.checkProcessingInstructionTarget("test" + '_')); diff --git a/test/src/java/org/jdom2/test/cases/filter/AbstractTestFilter.java b/test/src/java/org/jdom2/test/cases/filter/AbstractTestFilter.java index 59449c0b0..4f4f248f0 100644 --- a/test/src/java/org/jdom2/test/cases/filter/AbstractTestFilter.java +++ b/test/src/java/org/jdom2/test/cases/filter/AbstractTestFilter.java @@ -101,7 +101,7 @@ public AndCallBack(CallBack one, CallBack two) { @Override public boolean isValid(Object c) { // do not want to do short-circuit || logic. - // Make seperate statements + // Make separate statements boolean one = onecallback.isValid(c); boolean two = twocallback.isValid(c); return one && two; @@ -117,7 +117,7 @@ public OrCallBack(CallBack one, CallBack two) { @Override public boolean isValid(Object c) { // do not want to do short-circuit || logic. - // Make seperate statements + // Make separate statements boolean one = onecallback.isValid(c); boolean two = twocallback.isValid(c); return one || two; diff --git a/test/src/java/org/jdom2/test/cases/input/TestSAXBuilder.java b/test/src/java/org/jdom2/test/cases/input/TestSAXBuilder.java index a35a1b905..a484ed3fe 100644 --- a/test/src/java/org/jdom2/test/cases/input/TestSAXBuilder.java +++ b/test/src/java/org/jdom2/test/cases/input/TestSAXBuilder.java @@ -769,7 +769,7 @@ public void test_TCU__DTDComments() throws JDOMException, IOException { builder.setExpandEntities(false); Document doc = builder.build(file); - assertTrue("didnt' get internal subset comments correctly", doc.getDocType().getInternalSubset().indexOf("foo") > 0); + assertTrue("did not get internal subset comments correctly", doc.getDocType().getInternalSubset().indexOf("foo") > 0); //assertTrue("didn't get EntityRef for unexpanded attribute entities", // doc.getRootElement().getAttribute("test").getValue().indexOf("&simple") == 0); diff --git a/test/src/java/org/jdom2/test/cases/input/TestSAXHandler.java b/test/src/java/org/jdom2/test/cases/input/TestSAXHandler.java index 99085e8b3..6e77d929b 100644 --- a/test/src/java/org/jdom2/test/cases/input/TestSAXHandler.java +++ b/test/src/java/org/jdom2/test/cases/input/TestSAXHandler.java @@ -967,7 +967,7 @@ public void build(SAXHandler handler) throws SAXException { @Test public void testElementAttributesNameXMLNS() { - // invalid xmlns attibute. + // invalid xmlns attribute. final AttributesSingleOnly atts = new AttributesSingleOnly("", "xmlns", "xmlns", "CDATA", "val"); Element emt = checkHandlerElement(new Builder() { @Override @@ -988,7 +988,7 @@ public void build(SAXHandler handler) throws SAXException { @Test public void testElementAttributesPrefixXMLNS() { - // invalid xmlns attibute. + // invalid xmlns attribute. final AttributesSingleOnly atts = new AttributesSingleOnly("", "ns", "xmlns:ns", "CDATA", "uri"); Element emt = checkHandlerElement(new Builder() { @Override @@ -1504,7 +1504,7 @@ public void testIllegalGetCurrentElement() { handler.startDocument(); try { handler.getCurrentElement(); - fail ("Should not be able to append bad element strcuture."); + fail ("Should not be able to append bad element structure."); } catch (SAXException se) { // good/. } catch (Exception e) { diff --git a/test/src/java/org/jdom2/test/cases/output/TestDOMOutputter.java b/test/src/java/org/jdom2/test/cases/output/TestDOMOutputter.java index 14b865fd1..b57690061 100644 --- a/test/src/java/org/jdom2/test/cases/output/TestDOMOutputter.java +++ b/test/src/java/org/jdom2/test/cases/output/TestDOMOutputter.java @@ -368,9 +368,9 @@ public void testOutputAttribute() throws JDOMException { assertEquals("name", doma.getNodeName()); assertEquals("name", doma.getLocalName()); assertEquals("val", doma.getNodeValue()); - // Android can have "" values, xerces has null. Technically it is implementation dependant + // Android can have "" values, xerces has null. Technically it is implementation dependent assertTrue(null == doma.getPrefix() || "".equals(doma.getPrefix())); - // Android can have "" values, xerces has null. Technically it is implementation dependant + // Android can have "" values, xerces has null. Technically it is implementation dependent assertTrue(null == doma.getNamespaceURI() || "".equals(doma.getNamespaceURI())); assertTrue(domdoc != doma.getOwnerDocument()); diff --git a/test/src/java/org/jdom2/test/cases/output/TestSAXOutputter.java b/test/src/java/org/jdom2/test/cases/output/TestSAXOutputter.java index cd5acf2cc..4d547a0a9 100644 --- a/test/src/java/org/jdom2/test/cases/output/TestSAXOutputter.java +++ b/test/src/java/org/jdom2/test/cases/output/TestSAXOutputter.java @@ -764,7 +764,7 @@ public void setDocumentLocator(Locator loc) { if (loc instanceof JDOMLocator) { locator = (JDOMLocator)loc; } else { - fail ("We excpected the locator to be a JDOMLocator, not " + loc); + fail ("We expected the locator to be a JDOMLocator, not " + loc); } } @Override diff --git a/test/src/java/org/jdom2/test/cases/xpath/AbstractTestXPathCompiled.java b/test/src/java/org/jdom2/test/cases/xpath/AbstractTestXPathCompiled.java index bd75ac3d0..db102b2c9 100644 --- a/test/src/java/org/jdom2/test/cases/xpath/AbstractTestXPathCompiled.java +++ b/test/src/java/org/jdom2/test/cases/xpath/AbstractTestXPathCompiled.java @@ -396,7 +396,7 @@ private void checkComplexXPath(String xpath, Object context, Map public void testNullQuery() { try { getFactory().compile(null, Filters.element()); - fail("excpected NPE"); + fail("expected NPE"); } catch (NullPointerException noe) { // great } @@ -406,7 +406,7 @@ public void testNullQuery() { public void testNullFilter() { try { getFactory().compile("/", null); - fail("excpected NPE"); + fail("expected NPE"); } catch (NullPointerException noe) { // great } @@ -416,7 +416,7 @@ public void testNullFilter() { public void testNullNamespace() { try { getFactory().compile("/", Filters.element(), null, Namespace.NO_NAMESPACE, null, Namespace.XML_NAMESPACE); - fail("excpected NPE"); + fail("expected NPE"); } catch (NullPointerException noe) { // great } @@ -436,7 +436,7 @@ public void testNullVariableName() { vars.put(null, ""); vars.put("a", "b"); getFactory().compile("/", Filters.element(), vars); - fail("excpected NPE"); + fail("expected NPE"); } catch (NullPointerException noe) { // great } @@ -448,7 +448,7 @@ public void testDuplicatePrefix() { Namespace nsa = Namespace.getNamespace("pfx", "one"); Namespace nsb = Namespace.getNamespace("pfx", "two"); getFactory().compile("/", Filters.element(), null, Namespace.NO_NAMESPACE, nsa, Namespace.XML_NAMESPACE, nsb); - fail("excpected IAE"); + fail("expected IAE"); } catch (IllegalArgumentException noe) { // great } @@ -460,7 +460,7 @@ public void testRedefineNO_PREFIX() { Namespace nsa = Namespace.getNamespace("pfx", "one"); Namespace nsb = Namespace.getNamespace("", "two"); getFactory().compile("/", Filters.element(), null, Namespace.NO_NAMESPACE, nsa, Namespace.XML_NAMESPACE, nsb); - fail("excpected IAE"); + fail("expected IAE"); } catch (IllegalArgumentException noe) { // great } @@ -475,7 +475,7 @@ public void testDoubleSupplyNS() { @Test public void testRedeclareNoPrefixMessageDifferentToPrefix() { - // redeclare a namespace, and the defalt namespace. The Default versions should have a + // redeclare a namespace, and the default namespace. The Default versions should have a // different message Namespace nsa = Namespace.getNamespace("pfx", "one"); Namespace nsb = Namespace.getNamespace("pfx", "two"); @@ -487,7 +487,7 @@ public void testRedeclareNoPrefixMessageDifferentToPrefix() { try { // cannot redeclare "" namespace prefix. getFactory().compile("/", Filters.element(), null, Namespace.NO_NAMESPACE, nsd); - fail("excpected IAE"); + fail("expected IAE"); } catch (IllegalArgumentException iae) { ma = iae.getMessage(); } @@ -495,7 +495,7 @@ public void testRedeclareNoPrefixMessageDifferentToPrefix() { try { // cannot redeclare "pfx" namespace prefix. getFactory().compile("/", Filters.element(), null, nsa, nsb); - fail("excpected IAE"); + fail("expected IAE"); } catch (IllegalArgumentException iae) { mb = iae.getMessage(); } @@ -512,7 +512,7 @@ public void testDuplicateVariable() { Namespace nsa = Namespace.getNamespace("pfa", "ns"); Namespace nsb = Namespace.getNamespace("pfb", "ns"); getFactory().compile("/", Filters.element(), vars, Namespace.NO_NAMESPACE, nsa, Namespace.XML_NAMESPACE, nsb); - fail("excpected IAE"); + fail("expected IAE"); } catch (IllegalArgumentException noe) { // great } @@ -527,7 +527,7 @@ public void testBadVariablePrefix() { Namespace nsa = Namespace.getNamespace("pfa", "ns"); Namespace nsb = Namespace.getNamespace("pfb", "ns"); getFactory().compile("/", Filters.element(), vars, Namespace.NO_NAMESPACE, nsa, Namespace.XML_NAMESPACE, nsb); - fail("excpected IAE"); + fail("expected IAE"); } catch (IllegalArgumentException noe) { // great } @@ -542,7 +542,7 @@ public void testBadVariableName1() { Namespace nsa = Namespace.getNamespace("pfa", "ns"); Namespace nsb = Namespace.getNamespace("pfb", "ns"); getFactory().compile("/", Filters.element(), vars, Namespace.NO_NAMESPACE, nsa, Namespace.XML_NAMESPACE, nsb); - fail("excpected IAE"); + fail("expected IAE"); } catch (IllegalArgumentException noe) { // great } @@ -557,7 +557,7 @@ public void testBadVariableName2() { Namespace nsa = Namespace.getNamespace("pfa", "ns"); Namespace nsb = Namespace.getNamespace("pfb", "ns"); getFactory().compile("/", Filters.element(), vars, Namespace.NO_NAMESPACE, nsa, Namespace.XML_NAMESPACE, nsb); - fail("excpected IAE"); + fail("expected IAE"); } catch (IllegalArgumentException noe) { // great } @@ -590,7 +590,7 @@ public void testBadVariableNamespace() { Namespace nsa = Namespace.getNamespace("pfa", "ns"); Namespace nsb = Namespace.getNamespace("pfb", "ns"); getFactory().compile("/", Filters.element(), vars, Namespace.NO_NAMESPACE, nsa, Namespace.XML_NAMESPACE, nsb); - fail("excpected IAE"); + fail("expected IAE"); } catch (IllegalArgumentException noe) { // great } diff --git a/test/src/java/org/jdom2/test/util/AbstractTestList.java b/test/src/java/org/jdom2/test/util/AbstractTestList.java index b4344d74e..a7f5f9fdf 100644 --- a/test/src/java/org/jdom2/test/util/AbstractTestList.java +++ b/test/src/java/org/jdom2/test/util/AbstractTestList.java @@ -139,8 +139,8 @@ protected final T[] arrayRemove(T[] content, int index) { /** * Insert an element in to the content at the specified index. * @param content The base content to add to. - * @param index The position to insert (items from this position will be - * moved to the right). Using content.lenght will add to the end. + * @param index The position to insert (items from this position will be + * moved to the right). Using content.length will add to the end. * @param insert The value to insert * @return The amended content array */