jkesselm commented on code in PR #125: URL: https://github.com/apache/xalan-java/pull/125#discussion_r1400798156
########## serializer/src/main/java/org/apache/xml/serializer/Version.java: ########## @@ -20,33 +20,97 @@ */ package org.apache.xml.serializer; + +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 Serializer release. * <P>This class implements the upcoming standard of having - * org.apache.project-name.Version.getVersion() be a standard way - * to get version information.</P> + * org.apache.project-name.Version.getVersion() be a standard way + * to get version information.</P> * @xsl.usage general */ public final class Version { + private static final String POM_PROPERTIES_JAR = "org/apache/xml/serializer/version.properties"; + private static final String POM_PROPERTIES_FILE_SYSTEM = "serializer/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; + + private static boolean snapshot; Review Comment: Hm. Need to check where the interfaces are defined; our intent was to standardized them an allow plugging in a different serializer just as the XSLT processor has a select-ar-runtime interface, but that might not have happened. There's still the risk of out of sync jarfiles, but a hard dependency would certainly allow a minimal subclass with just the property name overridden. -- 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