kriegaex commented on code in PR #125:
URL: https://github.com/apache/xalan-java/pull/125#discussion_r1401409125


##########
xalan/src/main/java/org/apache/xalan/Version.java:
##########
@@ -20,36 +20,99 @@
  */
 package org.apache.xalan;
 
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
 /**
  * Administrative class to keep track of the version number of
  * the Xalan release.
  * <P>This class implements the upcoming standard of having
- * org.apache.project-name.Version.getVersion() be a standard way 
- * to get version information.  This class will replace the older 
+ * org.apache.project-name.Version.getVersion() be a standard way
+ * to get version information.  This class will replace the older
  * org.apache.xalan.processor.Version class.</P>
- * <P>See also: org/apache/xalan/res/XSLTInfo.properties for 
+ * <P>See also: org/apache/xalan/res/XSLTInfo.properties for
  * information about the version of the XSLT spec we support.</P>
  * @xsl.usage general
  */
 public class Version
 {
+  private static final String POM_PROPERTIES_JAR = 
"org/apache/xalan/version.properties";
+  private static final String POM_PROPERTIES_FILE_SYSTEM = 
"xalan/target/classes/" + POM_PROPERTIES_JAR;
+  private static final String VERSION_NUMBER_PATTERN = 
"^(\\d+)[.](\\d+)[.](D)?(\\d+)(-SNAPSHOT)?$";
+  private static final String NO_VERSION = "0.0.0";
+
+  private static String version = NO_VERSION;
+  private static int majorVersionNum;
+  private static int releaseVersionNum;
+  private static int maintenanceVersionNum;
+  private static int developmentVersionNum;

Review Comment:
   I thought about it and decided not to inline it. Thanks for your input. I am 
also at this stage not going to write any tests, simply because this project 
does not contain any tests and it is way beyond the scope of this PR to 
introduce them. Remember, this is a PR to be merges into another PR which has 
the main purpose to convert the Ant build to Maven. I do not want to burden 
that PR by even more unrelated changes. The current test suite lives in a 
separate project, in which we would have to create shadow PRs in shadow 
branches to sync the tests to the branches here. Moreover, currently the 
classes I am changing here are untested in _xalan-test_.
   
   Don't get me wrong, I am all in for test automation. I even teach classes 
about it. But like I said elsewhere, integrating tests here is scheduled to 
come after the Maven cutover. It has not even been discussed if the tests are 
to be migrated like they are implemented now, with the home-brew test framework 
they seem to use, or migrated to something like JUnit 5 Jupiter or Spock.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@xalan.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@xalan.apache.org
For additional commands, e-mail: dev-h...@xalan.apache.org

Reply via email to