Skip to content

Commit 56fa34a

Browse files
committed
Fix typos in Javadoc and exception messages
1 parent 868105b commit 56fa34a

File tree

8 files changed

+31
-31
lines changed

8 files changed

+31
-31
lines changed

src/main/java/org/apache/commons/jxpath/CompiledExpression.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public interface CompiledExpression {
4545
* <p>
4646
* Will throw an exception if one of the following conditions occurs:
4747
* <ul>
48-
* <li>Elements of the xpath aleady exist, by the path does not in fact describe an existing property
48+
* <li>Elements of the XPath aleady exist, by the path does not in fact describe an existing property
4949
* <li>The AbstractFactory fails to create an instance for an intermediate element.
5050
* <li>The property is not writable (no public, non-static set method)
5151
* </ul>
@@ -57,7 +57,7 @@ public interface CompiledExpression {
5757
Pointer createPathAndSetValue(JXPathContext context, Object value);
5858

5959
/**
60-
* Traverses the xpath and returns a Pointer. A Pointer provides easy access to a property. If the xpath matches no properties in the graph, the pointer
60+
* Traverses the XPath and returns a Pointer. A Pointer provides easy access to a property. If the XPath matches no properties in the graph, the pointer
6161
* will be null.
6262
*
6363
* @param context base
@@ -67,7 +67,7 @@ public interface CompiledExpression {
6767
Pointer getPointer(JXPathContext context, String xpath);
6868

6969
/**
70-
* Evaluates the xpath and returns the resulting object. Primitive types are wrapped into objects.
70+
* Evaluates the XPath and returns the resulting object. Primitive types are wrapped into objects.
7171
*
7272
* @param context to evaluate
7373
* @return Object
@@ -84,7 +84,7 @@ public interface CompiledExpression {
8484
Object getValue(JXPathContext context, Class requiredType);
8585

8686
/**
87-
* Traverses the xpath and returns a Iterator of all results found for the path. If the xpath matches no properties in the graph, the Iterator will not be
87+
* Traverses the XPath and returns a Iterator of all results found for the path. If the XPath matches no properties in the graph, the Iterator will not be
8888
* null.
8989
*
9090
* @param context base
@@ -93,7 +93,7 @@ public interface CompiledExpression {
9393
Iterator iterate(JXPathContext context);
9494

9595
/**
96-
* Traverses the xpath and returns an Iterator of Pointers. A Pointer provides easy access to a property. If the xpath matches no properties in the graph,
96+
* Traverses the XPath and returns an Iterator of Pointers. A Pointer provides easy access to a property. If the XPath matches no properties in the graph,
9797
* the Iterator be empty, but not null.
9898
*
9999
* @param context to iterate
@@ -118,7 +118,7 @@ public interface CompiledExpression {
118118
/**
119119
* Modifies the value of the property described by the supplied xpath. Will throw an exception if one of the following conditions occurs:
120120
* <ul>
121-
* <li>The xpath does not in fact describe an existing property
121+
* <li>The XPath does not in fact describe an existing property
122122
* <li>The property is not writable (no public, non-static set method)
123123
* </ul>
124124
*

src/main/java/org/apache/commons/jxpath/JXPathContext.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
* <h2>JXPath Interprets XPath Syntax on Java Object Graphs</h2>
3939
*
40-
* JXPath uses an intuitive interpretation of the xpath syntax in the context of Java object graphs. Here are some examples:
40+
* JXPath uses an intuitive interpretation of the XPath syntax in the context of Java object graphs. Here are some examples:
4141
*
4242
* <h3>Example 1: JavaBean Property Access</h3>
4343
*
@@ -83,7 +83,7 @@
8383
*
8484
* In this case XPath is used to access a property of a nested bean.
8585
* <p>
86-
* A property identified by the xpath does not have to be a "leaf" property. For instance, we can extract the whole Address object in above example:
86+
* A property identified by the XPath does not have to be a "leaf" property. For instance, we can extract the whole Address object in above example:
8787
* </p>
8888
*
8989
* <pre>
@@ -467,7 +467,7 @@ protected JXPathContext(final JXPathContext parentContext, final Object contextB
467467
* <p>
468468
* Will throw an exception if one of the following conditions occurs:
469469
* <ul>
470-
* <li>Elements of the xpath aleady exist, but the path does not in fact describe an existing property
470+
* <li>Elements of the XPath aleady exist, but the path does not in fact describe an existing property
471471
* <li>The AbstractFactory fails to create an instance for an intermediate element.
472472
* <li>The property is not writable (no public, non-static set method)
473473
* </ul>
@@ -621,9 +621,9 @@ public JXPathContext getParentContext() {
621621
}
622622

623623
/**
624-
* Traverses the xpath and returns a Pointer. A Pointer provides easy access to a property.
624+
* Traverses the XPath and returns a Pointer. A Pointer provides easy access to a property.
625625
* <p>
626-
* If the xpath <a href='#matches_no_property_in_the_graph'>matches no properties in the graph</a> the behavior depends on the value that has been
626+
* If the XPath <a href='#matches_no_property_in_the_graph'>matches no properties in the graph</a> the behavior depends on the value that has been
627627
* configured with {@link #setLenient(boolean)}:
628628
* </p>
629629
* <ul>
@@ -687,7 +687,7 @@ public String getPrefix(final String namespaceURI) {
687687
public abstract JXPathContext getRelativeContext(Pointer pointer);
688688

689689
/**
690-
* Evaluates the xpath and returns the resulting object. Primitive types are wrapped into objects.
690+
* Evaluates the XPath and returns the resulting object. Primitive types are wrapped into objects.
691691
*
692692
* @param xpath to evaluate
693693
* @return Object found
@@ -730,7 +730,7 @@ public synchronized boolean isLenient() {
730730
}
731731

732732
/**
733-
* Traverses the xpath and returns an Iterator of all results found for the path. If the xpath matches no properties in the graph, the Iterator will be
733+
* Traverses the XPath and returns an Iterator of all results found for the path. If the XPath matches no properties in the graph, the Iterator will be
734734
* empty, but not null.
735735
*
736736
* @param <E> the type of elements returned by the iterator.
@@ -740,7 +740,7 @@ public synchronized boolean isLenient() {
740740
public abstract <E> Iterator<E> iterate(String xpath);
741741

742742
/**
743-
* Traverses the xpath and returns an Iterator of Pointers. A Pointer provides easy access to a property. If the xpath matches no properties in the graph,
743+
* Traverses the XPath and returns an Iterator of Pointers. A Pointer provides easy access to a property. If the XPath matches no properties in the graph,
744744
* the Iterator be empty, but not null.
745745
*
746746
* @param xpath to iterate
@@ -898,7 +898,7 @@ public void setNamespaceContextPointer(final Pointer namespaceContextPointer) {
898898
/**
899899
* Modifies the value of the property described by the supplied xpath. Will throw an exception if one of the following conditions occurs:
900900
* <ul>
901-
* <li>The xpath does not in fact describe an existing property
901+
* <li>The XPath does not in fact describe an existing property
902902
* <li>The property is not writable (no public, non-static set method)
903903
* </ul>
904904
*

src/main/java/org/apache/commons/jxpath/ri/Compiler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* Since objects returned by Compiler methods are passed as arguments to other Compiler methods, the descriptions of these methods use virtual types. There are
2525
* four virtual object types: EXPRESSION, QNAME, STEP and NODE_TEST.
2626
* <p>
27-
* The following example illustrates this notion. This sequence compiles the xpath "foo[round(1 div 2)]/text()": <blockquote>
27+
* The following example illustrates this notion. This sequence compiles the XPath "foo[round(1 div 2)]/text()": <blockquote>
2828
*
2929
* <pre>
3030
* Object qname1 = compiler.qname(null, "foo")

src/main/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ public Pointer createPath(final String xpath, final Expression expr) {
328328
}
329329
return ((NodePointer) pointer).createPath(this);
330330
} catch (final Throwable ex) {
331-
throw new JXPathException("Exception trying to create xpath " + xpath, ex);
331+
throw new JXPathException("Exception trying to create XPath " + xpath, ex);
332332
}
333333
}
334334

@@ -344,7 +344,7 @@ public Pointer createPathAndSetValue(final String xpath, final Expression expr,
344344
try {
345345
return setValue(xpath, expr, value, true);
346346
} catch (final Throwable ex) {
347-
throw new JXPathException("Exception trying to create xpath " + xpath, ex);
347+
throw new JXPathException("Exception trying to create XPath " + xpath, ex);
348348
}
349349
}
350350

@@ -488,7 +488,7 @@ public JXPathContext getRelativeContext(final Pointer pointer) {
488488
}
489489

490490
/**
491-
* Traverses the xpath and returns the resulting object. Primitive types are wrapped into objects.
491+
* Traverses the XPath and returns the resulting object. Primitive types are wrapped into objects.
492492
*
493493
* @param xpath expression
494494
* @return Object found
@@ -606,7 +606,7 @@ public NodePointer getVariablePointer(final QName qName) {
606606
}
607607

608608
/**
609-
* Traverses the xpath and returns a Iterator of all results found for the path. If the xpath matches no properties in the graph, the Iterator will not be
609+
* Traverses the XPath and returns a Iterator of all results found for the path. If the XPath matches no properties in the graph, the Iterator will not be
610610
* null.
611611
*
612612
* @param xpath expression
@@ -618,7 +618,7 @@ public Iterator iterate(final String xpath) {
618618
}
619619

620620
/**
621-
* Traverses the xpath and returns a Iterator of all results found for the path. If the xpath matches no properties in the graph, the Iterator will not be
621+
* Traverses the XPath and returns a Iterator of all results found for the path. If the XPath matches no properties in the graph, the Iterator will not be
622622
* null.
623623
*
624624
* @param xpath expression
@@ -630,7 +630,7 @@ public Iterator iterate(final String xpath, final Expression expr) {
630630
}
631631

632632
/**
633-
* Traverses the xpath and returns an Iterator of Pointers. A Pointer provides easy access to a property. If the xpath matches no properties in the graph,
633+
* Traverses the XPath and returns an Iterator of Pointers. A Pointer provides easy access to a property. If the XPath matches no properties in the graph,
634634
* the Iterator be empty, but not null.
635635
*
636636
* @param xpath expression
@@ -642,7 +642,7 @@ public Iterator<Pointer> iteratePointers(final String xpath) {
642642
}
643643

644644
/**
645-
* Traverses the xpath and returns an Iterator of Pointers. A Pointer provides easy access to a property. If the xpath matches no properties in the graph,
645+
* Traverses the XPath and returns an Iterator of Pointers. A Pointer provides easy access to a property. If the XPath matches no properties in the graph,
646646
* the Iterator be empty, but not null.
647647
*
648648
* @param xpath expression
@@ -711,7 +711,7 @@ public void removePath(final String xpath, final Expression expr) {
711711
pointer.remove();
712712
}
713713
} catch (final Throwable ex) {
714-
throw new JXPathException("Exception trying to remove xpath " + xpath, ex);
714+
throw new JXPathException("Exception trying to remove XPath " + xpath, ex);
715715
}
716716
}
717717

@@ -734,7 +734,7 @@ public void setNamespaceContextPointer(final Pointer pointer) {
734734
}
735735

736736
/**
737-
* Sets the value of xpath to value.
737+
* Sets the value of XPath to value.
738738
*
739739
* @param xpath path
740740
* @param expr compiled Expression
@@ -744,7 +744,7 @@ public void setValue(final String xpath, final Expression expr, final Object val
744744
try {
745745
setValue(xpath, expr, value, false);
746746
} catch (final Throwable ex) {
747-
throw new JXPathException("Exception trying to set value with xpath " + xpath, ex);
747+
throw new JXPathException("Exception trying to set value with XPath " + xpath, ex);
748748
}
749749
}
750750

src/main/java/org/apache/commons/jxpath/ri/compiler/Expression.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
/**
3232
* Common superclass for several types of nodes in the parse tree. Provides APIs for optimization of evaluation of expressions. Specifically, an expression only
33-
* needs to executed once during the evaluation of an xpath if that expression is context-independent. Expression.isContextDependent() provides that hint.
33+
* needs to executed once during the evaluation of an XPath if that expression is context-independent. Expression.isContextDependent() provides that hint.
3434
*/
3535
public abstract class Expression {
3636

src/main/java/org/apache/commons/jxpath/ri/model/NodePointer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ protected NodePointer(final NodePointer parent, final Locale locale) {
188188
/**
189189
* Returns an XPath that maps to this Pointer.
190190
*
191-
* @return String xpath expression
191+
* @return String XPath expression
192192
*/
193193
@Override
194194
public String asPath() {

src/site/xdoc/users-guide.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ String fName = (String)context.getValue("firstName");
218218
<subsection name="Lenient Mode">
219219
<p>
220220
The <code>context.getValue(xpath)</code> method throws
221-
an exception if the supplied xpath does not map to an
221+
an exception if the supplied XPath does not map to an
222222
existing property. This constraint can be relaxed by
223223
calling <code>context.setLenient(true)</code>. In the
224224
lenient mode the method merely returns null if the path
@@ -743,7 +743,7 @@ String fName = (String)context.getValue("firstName");
743743
<section name="Exceptions During XPath Evaluation">
744744
<p>
745745
Exceptions thrown by accessor methods are treated differently depending
746-
on the evaluated xpath and the particular method used to do the
746+
on the evaluated XPath and the particular method used to do the
747747
evaluation.
748748
</p>
749749
<p>

src/test/java/org/apache/commons/jxpath/ri/JXPathCompiledExpressionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ private void assertXPathExpression(final String xpath, final Class expectedClass
5555
}
5656

5757
/**
58-
* Compiles the xpath into an Expression, checks the expression class, converts the expression to string and checks that the string matches the expected
58+
* Compiles the XPath into an Expression, checks the expression class, converts the expression to string and checks that the string matches the expected
5959
* one.
6060
*/
6161
private void assertXPathExpression(final String xpath, final Class expectedClass, final String expected) {

0 commit comments

Comments
 (0)