This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-jxpath.git
The following commit(s) were added to refs/heads/master by this push: new f3b3025 Fix Javadoc links and Javadoc errors f3b3025 is described below commit f3b3025026b13927b7a0cff9be66c1220886a696 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Tue Oct 18 12:10:28 2022 -0400 Fix Javadoc links and Javadoc errors --- pom.xml | 17 +++++++++++++- .../org/apache/commons/jxpath/JXPathContext.java | 3 +-- .../org/apache/commons/jxpath/ri/EvalContext.java | 2 +- .../commons/jxpath/ri/model/NodePointer.java | 2 +- .../commons/jxpath/ri/parser/ParseException.java | 27 +++++++++++----------- .../commons/jxpath/ri/parser/SimpleCharStream.java | 7 ++++-- .../org/apache/commons/jxpath/ri/parser/Token.java | 20 ++++++++-------- .../commons/jxpath/ri/parser/TokenMgrError.java | 25 +++++++++++--------- .../commons/jxpath/util/ClassLoaderUtil.java | 6 ++--- 9 files changed, 66 insertions(+), 43 deletions(-) diff --git a/pom.xml b/pom.xml index 00bd90e..20ef903 100644 --- a/pom.xml +++ b/pom.xml @@ -102,7 +102,7 @@ </properties> <build> - <defaultGoal>clean apache-rat:check package japicmp:cmp</defaultGoal> + <defaultGoal>clean apache-rat:check package japicmp:cmp javadoc:javadoc</defaultGoal> <plugins> <plugin> <groupId>org.apache.rat</groupId> @@ -142,6 +142,21 @@ </ignorePathsToDelete> </configuration> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <configuration> + <linksource>true</linksource> + <links> + <link>${commons.javadoc8.java.link}</link> + <link>${commons.javadoc.javaee5.link}</link> + <link>https://commons.apache.org/proper/commons-beanutils/apidocs</link> + <link>https://commons.apache.org/proper/commons-lang/apidocs</link> + <!-- http://www.jdom.org/docs/apidocs/ is not a secure link --> + <link>https://javadoc.io/doc/org.jdom/jdom/1.1</link> + </links> + </configuration> + </plugin> </plugins> </build> <dependencyManagement> diff --git a/src/main/java/org/apache/commons/jxpath/JXPathContext.java b/src/main/java/org/apache/commons/jxpath/JXPathContext.java index 9a27b0e..fe22e28 100644 --- a/src/main/java/org/apache/commons/jxpath/JXPathContext.java +++ b/src/main/java/org/apache/commons/jxpath/JXPathContext.java @@ -92,11 +92,10 @@ import org.apache.commons.jxpath.util.KeyManagerUtils; * <p> * 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: - * + * </p> * <pre> * Address addr = (Address)context.getValue("homeAddress"); * </pre> - * </p> * * <h3>Example 3: Collection Subscripts</h3> * JXPath can extract elements from arrays and collections. diff --git a/src/main/java/org/apache/commons/jxpath/ri/EvalContext.java b/src/main/java/org/apache/commons/jxpath/ri/EvalContext.java index 85ec269..8239fbf 100644 --- a/src/main/java/org/apache/commons/jxpath/ri/EvalContext.java +++ b/src/main/java/org/apache/commons/jxpath/ri/EvalContext.java @@ -160,7 +160,7 @@ public abstract class EvalContext implements ExpressionContext, Iterator { /** * Operation is not supported - * @throws UnsupportedOperationException + * @throws UnsupportedOperationException Always thrown. */ public void remove() { throw new UnsupportedOperationException( diff --git a/src/main/java/org/apache/commons/jxpath/ri/model/NodePointer.java b/src/main/java/org/apache/commons/jxpath/ri/model/NodePointer.java index fefc55a..2612bf3 100644 --- a/src/main/java/org/apache/commons/jxpath/ri/model/NodePointer.java +++ b/src/main/java/org/apache/commons/jxpath/ri/model/NodePointer.java @@ -917,7 +917,7 @@ public abstract class NodePointer implements Pointer { * Verify the structure of a given NodePointer. * @param nodePointer to check * @return nodePointer - * @throws JXPathNotFoundException + * @throws JXPathNotFoundException Thrown when there is no value at the NodePointer. */ public static NodePointer verify(NodePointer nodePointer) { if (!nodePointer.isActual()) { diff --git a/src/main/java/org/apache/commons/jxpath/ri/parser/ParseException.java b/src/main/java/org/apache/commons/jxpath/ri/parser/ParseException.java index 0444606..dbb7463 100644 --- a/src/main/java/org/apache/commons/jxpath/ri/parser/ParseException.java +++ b/src/main/java/org/apache/commons/jxpath/ri/parser/ParseException.java @@ -29,19 +29,17 @@ package org.apache.commons.jxpath.ri.parser; */ public class ParseException extends Exception { - /** - * This constructor is used by the method "generateParseException" - * in the generated parser. Calling this constructor generates - * a new object of this type with the fields "currentToken", - * "expectedTokenSequences", and "tokenImage" set. The boolean - * flag "specialConstructor" is also set to true to indicate that - * this constructor was used to create this object. - * This constructor calls its super class with the empty string - * to force the "toString" method of parent class "Throwable" to - * print the error message in the form: - * ParseException: <result of getMessage> - */ - public ParseException(Token currentTokenVal, + /** + * This constructor is used by the method "generateParseException" in the generated parser. Calling this constructor generates a new object of this type + * with the fields "currentToken", "expectedTokenSequences", and "tokenImage" set. The boolean flag "specialConstructor" is also set to true to indicate + * that this constructor was used to create this object. This constructor calls its super class with the empty string to force the "toString" method of + * parent class "Throwable" to print the error message in the form: ParseException: "result of getMessage" + * + * @param currentTokenVal TODO + * @param expectedTokenSequencesVal TODO + * @param tokenImageVal TODO + */ + public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal ) @@ -160,6 +158,9 @@ public class ParseException extends Exception { * Used to convert raw characters to their escaped version * when these raw version cannot be used as part of an ASCII * string literal. + * + * @param str raw characters. + * @return escaped version of the input. */ protected String add_escapes(String str) { StringBuffer retval = new StringBuffer(); diff --git a/src/main/java/org/apache/commons/jxpath/ri/parser/SimpleCharStream.java b/src/main/java/org/apache/commons/jxpath/ri/parser/SimpleCharStream.java index 30b448c..63fb867 100644 --- a/src/main/java/org/apache/commons/jxpath/ri/parser/SimpleCharStream.java +++ b/src/main/java/org/apache/commons/jxpath/ri/parser/SimpleCharStream.java @@ -212,18 +212,18 @@ public class SimpleCharStream /** * @deprecated + * @return the end column. * @see #getEndColumn */ - public int getColumn() { return bufcolumn[bufpos]; } /** * @deprecated + * @return the line number. * @see #getEndLine */ - public int getLine() { return bufline[bufpos]; } @@ -369,6 +369,9 @@ public class SimpleCharStream /** * Method to adjust line and column numbers for the start of a token.<BR> + * + * @param newLine TODO + * @param newCol TODO */ public void adjustBeginLineColumn(int newLine, int newCol) { diff --git a/src/main/java/org/apache/commons/jxpath/ri/parser/Token.java b/src/main/java/org/apache/commons/jxpath/ri/parser/Token.java index 59e6205..53dc6d5 100644 --- a/src/main/java/org/apache/commons/jxpath/ri/parser/Token.java +++ b/src/main/java/org/apache/commons/jxpath/ri/parser/Token.java @@ -75,16 +75,18 @@ public class Token { } /** - * Returns a new Token object, by default. However, if you want, you - * can create and return subclass objects based on the value of ofKind. - * Simply add the cases to the switch for all those special cases. - * For example, if you have a subclass of Token called IDToken that - * you want to create if ofKind is ID, simlpy add something like : - * + * Returns a new Token object, by default. However, if you want, you can create and return subclass objects based on the value of ofKind. Simply add the cases + * to the switch for all those special cases. For example, if you have a subclass of Token called IDToken that you want to create if ofKind is ID, simlpy add + * something like : + * + * <pre> * case MyParserConstants.ID : return new IDToken(); - * - * to the following switch statement. Then you can cast matchedToken - * variable to the appropriate type and use it in your lexical actions. + * </pre> + * + * to the following switch statement. Then you can cast matchedToken variable to the appropriate type and use it in your lexical actions. + * + * @param ofKind TODO + * @return TODO */ public static final Token newToken(int ofKind) { diff --git a/src/main/java/org/apache/commons/jxpath/ri/parser/TokenMgrError.java b/src/main/java/org/apache/commons/jxpath/ri/parser/TokenMgrError.java index 19b03c2..a6d59f5 100644 --- a/src/main/java/org/apache/commons/jxpath/ri/parser/TokenMgrError.java +++ b/src/main/java/org/apache/commons/jxpath/ri/parser/TokenMgrError.java @@ -54,8 +54,10 @@ public class TokenMgrError extends Error int errorCode; /** - * Replaces unprintable characters by their espaced (or unicode escaped) - * equivalents in the given string + * Replaces unprintable characters by their escaped (or Unicode escaped) equivalents in the given string + * + * @param str TODO + * @return TODO */ public static final String addEscapes(String str) { StringBuffer retval = new StringBuffer(); @@ -103,16 +105,17 @@ public class TokenMgrError extends Error } /** - * Returns a detailed message for the Error when it is thrown by the - * token manager to indicate a lexical error. - * Parameters : - * EOFSeen : indicates if EOF caused the lexicl error - * curLexState : lexical state in which this error occurred - * errorLine : line number when the error occurred - * errorColumn : column number when the error occurred - * errorAfter : prefix that was seen before this error occurred - * curchar : the offending character + * Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical error. + * * Note: You can customize the lexical error message by modifying this method. + * + * @param EOFSeen indicates if EOF caused the lexicl error + * @param lexState lexical state in which this error occurred + * @param errorLine line number when the error occurred + * @param errorColumn column number when the error occurred + * @param errorAfter prefix that was seen before this error occurred + * @param curChar the offending character + * @return TODO */ protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { return("Lexical error at line " + diff --git a/src/main/java/org/apache/commons/jxpath/util/ClassLoaderUtil.java b/src/main/java/org/apache/commons/jxpath/util/ClassLoaderUtil.java index 8409730..131d2e3 100644 --- a/src/main/java/org/apache/commons/jxpath/util/ClassLoaderUtil.java +++ b/src/main/java/org/apache/commons/jxpath/util/ClassLoaderUtil.java @@ -20,13 +20,13 @@ import java.util.HashMap; import java.util.Map; /** - * Port of class loading methods from <code>org.apache.commons.lang.ClassUtils</code> from + * Port of class loading methods from <code>org.apache.commons.lang3.ClassUtils</code> from * the Apache Commons Lang Component. Some adjustments made to remove dependency on - * <code>org.apache.commons.lang.StringUtils</code>. Also modified to fall back on the + * <code>org.apache.commons.lang3.StringUtils</code>. Also modified to fall back on the * current class loader when an attempt to load a class with the context class loader * results in a <code>java.lang.ClassNotFoundException</code>. * - * @see org.apache.commons.lang.ClassUtils + * See org.apache.commons.lang3.ClassUtils */ public class ClassLoaderUtil { /**