This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/xerces-j.git
The following commit(s) were added to refs/heads/main by this push:
new 4d7cec1ad [XERCESJ-1781] fix some Javadoc errors in
AbstractDateTimeDV.java (#57)
4d7cec1ad is described below
commit 4d7cec1ad99e5eac1e48e98015d7915d34b0c06e
Author: Samael <[email protected]>
AuthorDate: Thu Nov 20 11:53:14 2025 +0000
[XERCESJ-1781] fix some Javadoc errors in AbstractDateTimeDV.java (#57)
* [XERCESJ-1781] fix some Javadoc errors in AbstractDateTimeDV.java
* [XERCESJ-1781] fix some Javadoc errors in AbstractDateTimeDV.java
---
.../xerces/impl/dv/xs/AbstractDateTimeDV.java | 75 +++++++++++++---------
1 file changed, 43 insertions(+), 32 deletions(-)
diff --git a/src/org/apache/xerces/impl/dv/xs/AbstractDateTimeDV.java
b/src/org/apache/xerces/impl/dv/xs/AbstractDateTimeDV.java
index c1f078f89..37cdde8a1 100644
--- a/src/org/apache/xerces/impl/dv/xs/AbstractDateTimeDV.java
+++ b/src/org/apache/xerces/impl/dv/xs/AbstractDateTimeDV.java
@@ -99,7 +99,7 @@ public abstract class AbstractDateTimeDV extends
TypeValidator {
*
* @param date1 normalized date representation of the first value
* @param date2 normalized date representation of the second value
- * @param strict
+ * @param strict unused
* @return less, greater, less_equal, greater_equal, equal
*/
protected short compareDates(DateTimeData date1, DateTimeData date2,
boolean strict) {
@@ -177,8 +177,7 @@ public abstract class AbstractDateTimeDV extends
TypeValidator {
}
/**
- * Given normalized values, determines order-relation
- * between give date/time objects.
+ * Given normalized values, determines order-relation between two
date/time objects.
*
* @param date1 date/time object
* @param date2 date/time object
@@ -221,12 +220,13 @@ public abstract class AbstractDateTimeDV extends
TypeValidator {
}
/**
- * Parses time hh:mm:ss.sss and time zone if any
+ * Parses time hh:mm:ss.sss and time zone if any.
*
- * @param start
- * @param end
- * @param data
- * @exception RuntimeException
+ * @param buffer a time in the format <code>hh:mm:ss.sss</code>
+ * @param start the start position
+ * @param end the end position
+ * @param data the output from parsing the string
+ * @throws RuntimeException if an error occurs while parsing the string
*/
protected void getTime (String buffer, int start, int end,
DateTimeData data) throws RuntimeException{
@@ -266,11 +266,11 @@ public abstract class AbstractDateTimeDV extends
TypeValidator {
/**
* Parses date CCYY-MM-DD
*
- * @param buffer
+ * @param buffer a date in the format <code>CCYY-MM-DD</code>
* @param start start position
* @param end end position
- * @param date
- * @exception RuntimeException
+ * @param date the output from parsing the string
+ * @throws RuntimeException if an error occurs while parsing the string
*/
protected int getDate (String buffer, int start, int end, DateTimeData
date) throws RuntimeException{
@@ -285,13 +285,13 @@ public abstract class AbstractDateTimeDV extends
TypeValidator {
}
/**
- * Parses date CCYY-MM
+ * Parses date CCYY-MM.
*
- * @param buffer
+ * @param buffer a string in which a Year/Month value exists in the
format <code>CCYY-MM</code>
* @param start start position
* @param end end position
- * @param date
- * @exception RuntimeException
+ * @param date the output from parsing the string
+ * @throws RuntimeException if an error occurs while parsing the string
*/
protected int getYearMonth (String buffer, int start, int end,
DateTimeData date) throws RuntimeException{
@@ -324,9 +324,11 @@ public abstract class AbstractDateTimeDV extends
TypeValidator {
* Shared code from Date and YearMonth datatypes.
* Finds if time zone sign is present
*
- * @param end
- * @param date
- * @exception RuntimeException
+ * @param buffer a string in which a TimeZone value exists
+ * @param start start position
+ * @param end end position
+ * @param date the output from parsing the string
+ * @throws RuntimeException if an error occurs while parsing the string
*/
protected void parseTimeZone (String buffer, int start, int end,
DateTimeData date) throws RuntimeException{
@@ -345,9 +347,11 @@ public abstract class AbstractDateTimeDV extends
TypeValidator {
/**
* Parses time zone: 'Z' or {+,-} followed by hh:mm
*
- * @param data
- * @param sign
- * @exception RuntimeException
+ * @param buffer a string in which a TimeZone value exists
+ * @param data the output from parsing the string
+ * @param sign the index of the timezone's sign
+ * @param end the index of the timezone's end position
+ * @throws RuntimeException if an error occurs while parsing the string
*/
protected void getTimeZone (String buffer, DateTimeData data, int sign,
int end) throws RuntimeException{
data.utc=buffer.charAt(sign);
@@ -388,12 +392,13 @@ public abstract class AbstractDateTimeDV extends
TypeValidator {
/**
* Computes index of given char within StringBuffer
*
- * @param start
- * @param end
- * @param ch character to look for in StringBuffer
- * @return index of ch within StringBuffer
+ * @param buffer a string in which to search
+ * @param start start position
+ * @param end end position
+ * @param ch character to look for in StringBuffer
+ * @return index of ch within StringBuffer or -1 if not found
*/
- protected int indexOf (String buffer, int start, int end, char ch) {
+ protected int indexOf (String buffer, int start, int end, char ch) {
for ( int i=start;i<end;i++ ) {
if ( buffer.charAt(i) == ch ) {
return i;
@@ -403,17 +408,17 @@ public abstract class AbstractDateTimeDV extends
TypeValidator {
}
/**
- * Validates given date/time object accoring to W3C PR Schema
+ * Validates given date/time object according to W3C PR Schema
* [D.1 ISO 8601 Conventions]
*
- * @param data
+ * @param data the datetime to validate
*/
protected void validateDateTime (DateTimeData data) {
//REVISIT: should we throw an exception for not valid dates
// or reporting an error message should be sufficient?
- /**
+ /*
* XML Schema 1.1 - RQ-123: Allow year 0000 in date related
types.
*/
if (!Constants.SCHEMA_1_1_SUPPORT && data.year==0 ) {
@@ -480,8 +485,9 @@ public abstract class AbstractDateTimeDV extends
TypeValidator {
/**
* Return index of UTC char: 'Z', '+', '-'
*
- * @param start
- * @param end
+ * @param buffer a string in which to search
+ * @param start start position
+ * @param end end position
* @return index of the UTC character that was found
*/
protected int findUTCSign (String buffer, int start, int end) {
@@ -497,7 +503,12 @@ public abstract class AbstractDateTimeDV extends
TypeValidator {
}
/**
- * Returns <code>true</code> if the character at start is 'Z', '+' or '-'.
+ * Returns <code>true</code> if the character at start is 'Z', '+', or '-'.
+ *
+ * @param buffer a string in which to search
+ * @param start start position
+ * @param end end position
+ * @return true if the character at start is 'Z', '+', or '-'
*/
protected final boolean isNextCharUTCSign(String buffer, int start, int
end) {
if (start < end) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]