Author: nbelaevski
Date: 2008-06-07 08:49:04 -0400 (Sat, 07 Jun 2008)
New Revision: 8948
Modified:
branches/3.1.x/framework/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java
branches/3.1.x/framework/impl/src/main/java/org/richfaces/VersionBean.java
Log:
http://jira.jboss.com/jira/browse/RF-3655
Modified: branches/3.1.x/framework/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java
===================================================================
--- branches/3.1.x/framework/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java 2008-06-07
12:39:49 UTC (rev 8947)
+++ branches/3.1.x/framework/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java 2008-06-07
12:49:04 UTC (rev 8948)
@@ -41,6 +41,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.richfaces.VersionBean;
+import org.richfaces.VersionBean.Version;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -67,10 +68,18 @@
static final String WEB_XML = "/WEB-INF/web.xml";
- public static final String RESOURCE_URI_PREFIX = "a4j_"
- + VersionBean.MAJOR_VERSION + "_" + VersionBean.MINOR_VERSION +
"_"
- + VersionBean.REVISION;
+ public static final String RESOURCE_URI_PREFIX;
+ static {
+ VersionBean versionBean = new VersionBean();
+ Version version = versionBean.getVersion();
+
+ //that's to prevent static compile-time linkage to constant values
+ RESOURCE_URI_PREFIX = "a4j_"
+ + version.getMajor() + "_" + version.getMinor() + "_"
+ + version.getRevision();
+ }
+
static final String RESOURCE_URI_PREFIX_WITH_SLASH = "/"
+ RESOURCE_URI_PREFIX;
Modified: branches/3.1.x/framework/impl/src/main/java/org/richfaces/VersionBean.java
===================================================================
--- branches/3.1.x/framework/impl/src/main/java/org/richfaces/VersionBean.java 2008-06-07
12:39:49 UTC (rev 8947)
+++ branches/3.1.x/framework/impl/src/main/java/org/richfaces/VersionBean.java 2008-06-07
12:49:04 UTC (rev 8948)
@@ -45,7 +45,7 @@
return VENDOR;
}
- public Object getVersion() {
+ public Version getVersion() {
return _version;
}
@@ -59,7 +59,7 @@
* @version $Revision$ $Date$
*
*/
- private static class Version {
+ public static class Version {
public static final String _versionInfo =
"v."+MAJOR_VERSION+"."+MINOR_VERSION+"."+REVISION+SCM_REVISION;