curcuru 01/03/15 14:25:13
Modified: test/java/src/org/apache/qetest QetestUtils.java
Log:
Update getRunID per PDick request to match Xalan-C output;
remove unneeded ctor
Revision Changes Path
1.4 +15 -13
xml-xalan/test/java/src/org/apache/qetest/QetestUtils.java
Index: QetestUtils.java
===================================================================
RCS file:
/home/cvs/xml-xalan/test/java/src/org/apache/qetest/QetestUtils.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- QetestUtils.java 2001/03/13 19:16:03 1.3
+++ QetestUtils.java 2001/03/15 22:25:11 1.4
@@ -64,19 +64,25 @@
* Static utility class for both general-purpose testing methods
* and a few XML-specific methods.
* @author [EMAIL PROTECTED]
- * @version $Id: QetestUtils.java,v 1.3 2001/03/13 19:16:03 curcuru Exp $
+ * @version $Id: QetestUtils.java,v 1.4 2001/03/15 22:25:11 curcuru Exp $
*/
-public class QetestUtils
+public abstract class QetestUtils
{
+ // abstract class cannot be instantiated
/**
* Utility method to translate a String filename to URL.
+ *
* Note: This method is not necessarily proven to get the
* correct URL for every possible kind of filename; it should
* be improved. It handles the most common cases that we've
* encountered when running Conformance tests on Xalan.
* Also note, this method does not handle other non-file:
* flavors of URLs at all.
+ *
+ * If the name is null, return null.
+ * If the name starts with file:///, we just return that.
+ * Otherwise we attempt (cheaply) to convert to a file:/// URL.
*
* @param String local path\filename of a file
* @return a file:/// URL, or null if error
@@ -136,9 +142,11 @@
* @param String classname FQCN or partially specified classname
* that you wish to load
* @param String[] rootPackages a list of packages to search
- * for the classname specified in array order
+ * for the classname specified in array order; if null then
+ * we don't search any additional packages
* @param String defaultClassname a default known-good FQCN to
* return if the classname was not found
+ *
* @return Class object asked for if one found by combining
* clazz with one of the rootPackages; if none, a Class of
* defaultClassname; or null if an error occoured
@@ -200,25 +208,19 @@
* differences in results and timing data from one run of
* a test to another.
*
- * Current format: MMMdd-hhmm[;baseId]
+ * Current format: MMddHHmm[;baseId]
* where baseId is not used if null.
*
* @param String Id base to start with
- * @return String Id to use; normally will include a timestamp
+ *
+ * @return String Id to use; will include a timestamp
*/
public static String createRunId(String baseId)
{
- java.text.SimpleDateFormat formatter = new
java.text.SimpleDateFormat ("MMMdd-hhmm");
+ java.text.SimpleDateFormat formatter = new
java.text.SimpleDateFormat ("MMddHHmm");
if (null != baseId)
return formatter.format(new java.util.Date())+ ";" + baseId;
else
return formatter.format(new java.util.Date());
}
-
-
- /**
- * Constructor is private on purpose; this class
- * provides static utility methods only.
- */
- private QetestUtils() { /* no-op */ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]