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: *